This tutorial was written by the amazing Timothy Dries and appeared in issue 114 of 3D Artist. Subscribe today and never miss an issue!
If you are inspired and passionate about abandoned buildings and urban exploration, you will love this tutorial. In it, we are going to take a dive inside the world of making textures that can then be used inside Unreal Engine, focusing on the creation of height maps and alphas that will be used to generate a texture. We will be examining some editing possibilities, in addition to creating a material. This all leads to eventually exporting the texture to be used in a game.
We use ZBrush, Substance Designer, Knald (although using your favourite baker is fine) and Unreal Engine 4. A word of warning – due to the extensive topics we need to cover, some details have to be skimmed over, so some prior knowledge about the programs is assumed.
Step 01 – Blockout in ZBrush
Let’s start out in ZBrush with a basic cube or sphere, whichever is best for the shape you are creating. Keep the focus on the larger shapes first, start out with the Move tool and just keep dragging out different angles to create some variation. Once we have some nice shapes going, we can start looking into refining the mesh. The first step in doing this is to convert this shape into a DynaMesh, which is going to give us more resolution to work with.
Step 02 – Refine the sculpts
Now that we have a good shape base, we can start to refine the shapes a bit more. The brushes that are particularly useful in this aspect are Clay Tubes and Trim Dynamic, but please feel free to use whichever brush you are comfortable with. It is important to not overthink your actions on this step; keep it loose and simple and work up the detail in iterations. Avoiding the temptation to focus on one area at a time helps to create some nice dynamic variation.
Step 03 – Add additional surface details
As soon as the shapes are looking decent, we can perform the last step of adding some minor surface details. It is these that will definitely help add some micro variation in the final texture, especially the normal map. To achieve these surface details, go into the Noise command, which calls up a separate dialog. From here we can adjust settings such as the scale and what part of the mesh it is going to affect. There is also the option to use a mask to paint in some localised noise, but we aren’t going to do that in this tutorial; the only thing we need to worry about is adjusting the scale and curve of the noise.
Step 04 – Make variations in ZBrush
We now have a finalised mesh to work with! But before it can be used in Substance Designer, it still needs some additional tweaks and different meshes so we can make a more varied texture. In the example here you can see that there are some bricks, different types of tiles, and variations of rocks/stones. The key here is to look at the type of place you are making, and to find a good reference image so that you can examine what has been used as materials. Then you can try to incorporate these inside your texture.
Step 05 – Time to bake
Once we have some additional variations sculpted inside ZBrush, we can start looking at how to extract the information from the meshes we created. This step is actually fairly simple though, just grab your favourite baking software (we used Knald but please feel free to use whatever you are comfortable with), make a plane that encompasses the model in terms of dimensions, and then let the baking commence! The only concern that we need to keep in mind is that the cage from the low-poly object has to be big enough so that it can encompass the high-poly model.
Step 06 – Get a variety of angles when baking
We have the information of one side of the meshes now, but it seems such a waste to only grab that one side and never even look at the other side that we spent time carefully sculpting. That can be fixed by creating some additional planes at different angles to the meshes, so we can capture that information as well. It’s good to get in the habit of making a folder that you can use to store all of these different maps and assets. That way, whenever you find yourself needing to create some other textures, just quickly grab them from the relevant folder.
Step 07 – Import into Substance Designer
After all that baking we are going to do something more fun now; let’s open up Substance Designer and create a new project. We are using a base that we use for all our projects, which basically has an unchanged level node linked to all the different outputs so they don’t have to be set up every time. Now we can look at importing all the different textures we just made. This is simply a case of dragging them inside the material in the Detail panel on the left side. That should create a folder called ‘Resources’.
Step 08 – Achieve random patterns with the Tile Sampler
Now we can finally use our beloved textures inside this program. We start out with a Tile Sampler. First off, let’s set the pattern it uses to Pattern Input instead of Square. This enables us to drag in one of our textures in the first input slot on the left side of the Tile Sampler. If you find that you want to use more than one input, you have to increase the number of inputs inside the Tile Sampler node. Keep in mind that we probably need to change the scale of the pattern as well, depending on the bake.
Step 09 – Adjust and mix
Once the initial pattern is set up, we can have a look at all the different parameters. You can play around with these settings as you see fit, but we do suggest going with small values on Scale, Offset and Rotation. Unless you are going for something specific, this can destroy the believability of the texture. A cool option to use is the Color section; this creates height variations on the texture. Now that we have a setup for one, we can go on to create additional setups for different meshes or scales that we want in the texture.
Step 10 – Add a background to the texture
With an initial texture to start with, we immediately notice that the background is missing, so let’s address that. There are multiple possibilities for dealing with this but let’s keep it simple – we’ll add a blend node that uses the height map, along with some additional contrast as an alpha value. Now we can freely add a background texture in the background slot of the blend without touching the texture we created before. It’s best to also connect this to the final output.
Step 11 – Roughness and normal map
Once we finalise the height map, let’s add some material response in the other maps. The normal map is the easiest one; we can just use a Height to Normal node as it does a really good job of converting a height map into a normal map. Let’s look at the roughness map next. It’s good to start out with a Gradient Map as a base, which enables you to set colour values depending on the Height value of the texture. To create additional variation, overlay different noises as well.
Step 12 – Albedo and AO map
This is the same as the roughness map really, let’s use a Gradient Map but we’ll do something different here. Inside the Gradient Editor you can see we can pick gradient, but this doesn’t let you pick single colours. This is great if you have a nice photo reference – you can directly drag it over that image and it will pick a gradient, which we can adjust manually if we want to. Another quick map to experiment with is the Ambient Occlusion map. For this, we can work with an Ambient Occlusion node using the height.
Step 13 – Export the texture to Unreal Engine
Let’s open up Unreal Engine now! This tutorial uses Unreal Engine 4.16 for reference. There are multiple ways of exporting textures to Unreal Engine, the first option is by using SBAR files. These files are generated by Substance and require the Substance plug-in that can be found on the Unreal Engine marketplace. These SBAR files can be modified inside Unreal on the fly, or we can just use the traditional way of exporting the maps as separate files (or channel packed) and dragging them into the engine or clicking Import and going through that route.
Step 14 – Set up material inside Unreal
Let’s create a basic material now. Right-click in the content browser and select Material. This will create a new material that we can go into if we just double-click the material itself. Next we drag in all of our textures inside the material and connect them to the Material node in the correct connections. It is this simple to set up a material but of course, it is possible to add a lot to this material, depending on what is needed for your personal project.
Step 15 – Additions in Unreal
The features in Unreal that we could potentially include in this tutorial are things such as POM (Parallax Occlusion Mapping), which simulates the depth of a texture using a height map; or we could also look into having colours that can be changed on the fly when blended with the height map to break up the tiling even more if needed. But for this example we are going to look into Vertex Paint, because this is going to be the most useful to us.
Step 16 – Vertex Paint in Unreal
Moving onto this is going to require you to add additional vertices on your mesh, especially if you have something like a wall, but then we can start blending between different texture sets, which is really useful when creating a destroyed or abandoned environment. If we weren’t doing this, the tiling on the walls would make it really obvious that we had just used one material.
Step 17 – Show off your work
As a final step we can add lights and reflections, because we don’t want to destroy all of our beautiful work with a presentation that doesn’t emphasise the correct aspects in our material and makes all of our work that we did before this step partially obsolete. This won’t be an in-depth look at how to light an environment, but we have used a dynamic light together with Light Propagation Volumes. This gives some real-time global illumination.