Have you ever wondered how to make a video game asset from start to finish? This tutorial covers the creation of fully destructible crates using only the freely available tools Blender, Krita, and Unreal Engine.
Step 1 – Make a Crate With Blender
We start by creating the crate mesh in Blender. We do this by slightly insetting all 6 faces of a cube. The new faces in the center of each side have to be slightly extruded inwards after that.
The crate has be hollow to support the destruction effects within Unreal Engine. Therefore we create a 2nd cube and move it inside our crate. The cube has to be scaled down to be slightly smaller than our crate. We can then use a Boolean modifier to remove the insides of the crate.
Uniform meshes can look pretty boring. I recommend you to add imperfections to the mesh by creating a couple of loop cuts and moving some vertices around using proportional editing. This gives the mesh a bit of character which works great in a low-poly environment.
Open up the UV-Editing screen and add a new image with a size of 256×256. Save that image to a file called ‘CrateTex.png’. Select the entire mesh and export the UV-Layout to different file. Create and name a material. Assign it to your crate. Link the base color of the material as a image texture to the newly created image. If you switch the shading mode of your viewport to material preview, your box should appear all black – just like the created texture.
Step 2 – Use Krita To Make a Texture
Import the UV-Layout into Krita with a canvas size of 256×256. Create a new layer beneath the UV-Layout and fill the background with a darker brown. Select the square areas in the center and paint them in a lighter tone. Feel free to add some details like a text saying ‘FRAGILE’ or paint an arrow pointing up.
Step 3 – Create a Destruction Effect In Unreal Editor
Create a new First-Person blueprint project in Unreal Editor. Import the created FBX and the texture by simply dragging the corresponding icons into the editor.
Click on the imported static mesh and click on ‘Create Destructible Mesh’.
Place the box in the level by dragging the actor into the viewport. Shoot at it.
Step 4 – Make It More Interesting
position crates in different sizes and rotations around the level
add particle and sound effects when a crates are destroyed
create explosive barrels that are capable of destroying surrounding crates
Learning how to create simple models with Blender that you can actually use for game development might seem impossible to a lot of people, especially to programmers who don’t feel like they are artistically inclined. However, after +50h of practice, I found myself having the confidence to create simple game assets myself. Here is how I got started.
I stumbled upon a couple of very interesting Blender tutorials by Grant Abbitt on Youtube. He teaches very simple techniques for absolute beginners and his videos feel more or less like a mixture between painting tutorials a la Bob Ross and Lego instructions. These Beginner Exercises are very easy to follow but often ask you to try things out for yourself first before continuing with detailed commentary.
After finishing the first four beginner exercises, I started to look into creating an actually usable asset. This is when I jumped to the Low Poly Well Tutorial. This tutorial consists of three parts and yielded a very decent result. I especially liked how this tutorial challenged you to create some of the easier stuff yourself. This gets you into the right mindset by forcing you to think and plan ahead when modeling.
After finishing the well tutorial, I wanted to move on to something bigger – something that I could export to Unreal Engine, something I could animate and show off. I wanted to create a product that people would like and enjoy. The ideal guide to support that goal was the Sea Shack Tutorial. The tutorial consists of twelve parts but the actual geometry was modelled in the first six. The construction of the shack is briefly explained but you are left on your own after modeling the lower platform. The creation of twelve easy objects in the scene is skipped too. However, the shack and the other minor models should be pretty easy to recreate with the previous tutorials in mind.
Getting Your Assets Game Ready
In order to make the assets available in Unreal Editor I had to export the scene as an FBX file that can be easily imported. Joining all elements of the scene together enables you to easily transfer the whole scene layout as a single static mesh to Unreal Editor. Make sure to name all the materials you are using because those names are used to create material assets in Unreal Editor during import. Most material assets need at least a little tuning when it comes to shininess. Cloth materials require back-face culling to be deactivated as both sides of the mesh need to be rendered. The recreation of the water material needs most of your attention though.
After the initial import of the scene with all components joined together I removed the fish meshes from the Blender scene and exported a single fish mesh separately. I wrapped the fish mesh in a fish actor that is animated via Blueprints. The fish actor was then placed, scaled and rotated multiple times to replace all previously existing meshes. You need to do this for every additional element like the seaweed or the flag that you want to see animated.
While I’m personally really happy with the result I do think that the scene and I might benefit from additional optimization:
Understanding computer graphics is hard. It is even harder to figure out where to start. This guide aims to provide a top-level understanding of common terms and processes that make pictures happen. The examples are implemented using Blender and Unreal Editor and do not require any programming or art skills.
Vertices are an important building block of computer graphics. A vertex is a single point in a virtual space that can be implemented in multiple different ways. The most basic version of a vertex in a 3d space consists only of the values X, Y, Z that represent its position. Vertices are commonly used to define lists of triangles that represent a 3d mesh because triangles can be easily rendered by GPU programs called shader.
Triangles have a front-face and a back-face. Usually only triangles facing the player are rendered as this almost halves the number of triangles that have to be rendered on screen. This technique is called back-face culling and leverages the assumption that you shouldn’t be able to see the back-faces of solid 3D objects.
The first common extension of vertices are a set of texture coordinates usually referred to as UV-coordinates and are used for a process that is called UV-mapping. The two values u and v are ranging from 0 to 1. They reference a point in the 2d space of an image with (0.5, 0.5) representing the center. If you create a triangle in 3d space with 3 distinct UV-coordinates you can visualize that triangle in the textures 2d space. The UV-coordinates for each rendered pixel of the triangle are interpolated and used to look up a specific pixel from a texture in a process called texture-sampling.
The combination of UV-mapping and texture-sampling can also be used to implement normal-maps to create more detailed models without using more vertices. Normal maps are used to ‘bend light with math’. This creates an illusion of bumps and dents that are missing from the mesh.
UV-Mapping can also be used to implement texture-masks to enable color customization. Masking a texture is similar to setting up the texture itself. You assign texture coordinates to the 3d model and paint the areas you want to mask. The mask acts as a switch between the texture and a dynamically specified color on each rendered pixel. A common RGBA texture mask comes with 4 switches that enable you to blend and combine a total of 5 textures.
Another common extension of vertices is the addition of a vertex color. A vertex color is usually represented by 1-4 values but can be even higher depending on the use case. Vertex color is used to mix and blend textures on terrains or walls that would otherwise look very stale. This is achieved by associating each value of the vertex color with a different texture and by blending accordingly. This effect works better with models that have lot of vertices as vertex coloring with very simple meshes does not allow for enough details.
A Quick Comparison
– no additional texture required – quality depends on vertex density – information stored in vertices – designed to create endless variations – used for level design
– information stored in texture – independent of underlying mesh – typically one mask per object – designed for dynamic coloring – used for gameplay features
Vertex Coloring and Texture Masking both implement texture blending but have different use cases.
This was just a quick peak into the world of rendering techniques. Let me know what you want to see next.