22 August 2021

Old Freight Car – Prop Breakdown – Aleksandr Silantev

aleksandr-silantev-artstation-2-scaled

Hello everyone, my name is Aleksandr Silantev, Iā€™m a self-taught 3D artist, currently, I am working as an archviz artist. Games have always been my passion and after years of working in archviz I decided to try myself in game development as an environment\props artist.

I have a lot of experience in 3d, but I had to learn new software and techniques for the production of game assets. The goal of the whole project is to learn new software and pipelines and, in one go, make fan art based on one of my favorite games and a great source of inspiration S.T.A.L.K.E.R. Shadow of Chernobyl.

As the main reference, I took the Cordon location from the original game and started to remodel the bridge asset.

During the production of this asset, my goal was to better understand the process of the Face Weighted Normals and RGB masks pipeline.
I got a lot of good feedback when I published this work, also many people asked to do a mini-tutorial on this pipeline, so with the help of GamesArtist, I am happy to share the details of this work.

First, I want to provide links to materials that I relied on in my work:

Face weighted normals on Polycount
Ryan Manning – UE4 – 4.19 Layered Materials Setup
Paragon Character Texturing Pipeline | Unreal Dev Day Montreal 2017 | Unreal Engine

A little warning, since I’m new to UE4 i will gladly listen to your comments if i could do my job better next time!

Reference search

With this item, everything is relatively simple, we are looking for photographs, drawings, any materials that will be useful to us in our work, we take everything and more)

(it’s not a secret that PureRef is an industry-standard for working with references)

5_Reference

Highpoly modeling

My main software for modeling and UV is Blender3D.

First of all, I made a high-poly model, but now, based on my experience, I want to make the next asset the other way around, first low-poly. Not all high-poly elements were needed for the final baking.
In general, the carriage is a relatively simple asset to model, with many simple shapes and repeating elements. For most of the objects, I used the usual Subdivision modeling. The combination of Bevel and Subdivision modifiers allows you to get smoothed shapes without overloading the original mesh with unnecessary polygons, and geometry without modifiers can be easily adapted for low-poly.

From all part chassis and suspension system were most difficult challenge. Little bit of sculpting for edge damage.

12_Highpoly

Lowpoly

Face Weighted Normals implies that the object does not have a unique normal map, so that the shading on the model looks correct, you need to chamfer the edges and align the vertex normals, this increases the polycount, so sometimes such models are called Midpoly
The final polycount is around 50k triangles. As part of the training, I tried not to limit myself too much by poly limits, but next time I will try to make a more optimized asset using this pipeline.

After the modeling is completed, we can proceed to aligning the normals

In Blender, you can align normals both manually and using the Weighted Normals modifier, it automatically aligns the normals, but it does not always work as needed, there is also the Y.A.V.N.E plugin. but last time it was updated two years ago, I have not tried to work with it.

18_Normals

The menu for working with normals is called with Alt + N in edit mode.

We begin the alignment process, for reliability, you can copy any polygon on the model that looks in the right direction and use it as a reference for the rest of the normals.
Sometimes the copied polygon may have distorted normals, align them using the Average – Face Area command.

19_Normals

Next, select the normals that we want to align and at the end select our sample, use the Set From Faces command and the normals from the sample are transferred to the selected polygons.

We carry out this procedure with all the necessary models.

19_Normals

It’s important to know

Before aligning the normals, check if they are turned out correctly on the model using the Face Orientation display.

23_Normals

It is also better to align the normals when you are already sure that no further changes will be made to the model, otherwise, with any change in the topology, it will be necessary to align the normals anew each time.

Normals break off during mirroring operations in edit mode.

UV Unwraping

After finishing the modeling and aligning the normals, move on to UV mapping and preparing the model for baking.
To do this, I create a separate scene in which only the unique elements of the car remain. Some objects are located at a distance to make it easier to control baking Ambient Occlusion

24_UV

Correct naming of objects avoids most of the problems that arise during the baking stage.
Unwrap each part separately, I use the usual U-Unwrap command. I fix various irregularities and stretch marks on the sweep using the free Tex Tools add-on, in general it has a large arsenal of tools, I highly recommend it.

25_UV

After the UV shells are unfolded and aligned, I use the Texel Density add-on to set the same texel to all shells, the Tex Tool also has this functionality, but it seemed to me that Texel Density works faster.

It should be noted that the texel varies depending on the visibility of the details, for example, the bottom of the car has a lower texel since it is constantly in the shadow and out of the field of vision of the conventional player.

26_UV

Let’s move on to packing all shells into one atlas, for this I use the UVPackmaster 2 addon, the addon is paid but definitely worth the money.
I packed several elements manually, since the orientation of the shells was important to me, and left everything else to the conscience of the addon using the Pack To Others function.

27_UV

Baking

Here we need to make a remark, in such a pipeline we can work without highpoly, just bake lowpoly on itself, this is enough for the generators to work, but in order not to manually draw any rust around the bolts, I still use a highpoly model to bake detail on AO and Curvature maps.

Working with masks

First of all, we need to create three custom channels that will be responsible for RGB channels.
To do this, go to Texture Set Settings, click on + and add User channels, for convenience we call them R, G, B.

Create a dummy Fill Layer in it, leave only our RGB channels and set them to zero values, this layer should always be at the very bottom, it will give a black background to our masks.
Well, then we just create layers in which we will draw our masks. Create a Fill Layer, leave it with the Base Color, it will not affect anything, it is only needed for visual identification of channels, for convenience, colors are assigned according to the channels R – red G – green B – blue.

Set the value for the user channel to 1 or any number greater than 0, with this slider you can additionally adjust the mask strength.

Actually, this is the basis, then we just draw/generate our masks. For example, my green channel is responsible for rust. Create a Black Mask for it, turn on the imagination and start creating!

32_RGB

You can create as many Fill Layers as you like, mix them in various ways, and generally work with ordinary materials.

The only thing to keep in mind is that within one texture you have 3 channels and therefore you can mix only 3 materials.

You can create another 4th channel that will be packed in alpha (RGBA), but this is not recommended due to the limitations of texture compression with the alpha channel in UE4.

And this is how our green channel looks like. Where the white color will appear our rust material, and where black will be all the lower layers.

If you do not want to look at this colored mess while working on masks, you can drop in Base Color the textures of those materials that you will have in the final scene, I did this at first, but then I gave it up so as not to simply inflate the weight of the files and speed up calculations for Painter.

On masks, it is not necessary to draw in detail all smudges, dirt, etc. because the resolution of the mask itself will be low, we will raise the detail by mixing other textures to the mask inside UE4
After the work on the masks is finished, you need to export them correctly.

To do this, go to File \ Export Textures \ Output Templates, click on the + and create your own export preset. Select R + G + B drag our channels User0/1/2 to the slots and use the Gray Channel mode

36_RGB

Then we export in a convenient format, the work in Painter is finished.P.S. Why not just paint the red / blue / green texture in one pass and pull out the channels in UE4? You can do this, but then we will not be able to properly turn off layers in materials.

Vertex Color was painted in Blender.

R – Highlights wooden parts
G – Creates gradients
B – Highlights dark dirty metal

UE4 Shader setup

39_Material_Layers

All unique Quixel content in this scene

First of all, we enable the Layered Materials function in the project settings so that the whole system works. You can just as easily use the Material Function system, but Layers seems to be more compact.
Actually, we will need to create a Master Material, Material Layers and Layer Blends functions for blending layers.

Master Material

Create a regular material, switch it to Material Attributes mode, connect the Material Attribute Layers node to it, the master material is ready.

After the Master Material is ready, we need to create layers, Material Layers.

40_Material_Layers

Each layer itself is a primitive PBR shader, the simpler the layers the better for overall performance.
For each type of material, we create our own Material Layer, thus forming a library for our project. After the layers are created, we need to either create the Layer Blend function or use the built-in ones. Layer Blend is the tool that will blend our layers.
The basic setting looks like this, we take our RGB texture from the paint and run it through the Channel Mask Parameter (allows you to further select the desired channels) and use it as the Alpha parameter.

43_Material_Layers

Modifying the function a little

Using the Grunge texture, we blend it with our RGB texture and add parameters to control the transitions between layers.
Grunge texture due to strong tiling allows you to mask the low-resolution RGB texture.

44_Material_Layers

We also add parameters to control the contrast and tiling of the Grunge texture.

You can choose any grunge texture from the Megascans collection or any other texture you deem suitable.

Below – RGB mask 1024х1024 and RGB mask 1024х1024 blended with tiling grunge 512×512

45_Material_Layers

After the Layer Blend is ready, create an instance copy of our Master Material and begin to collect our layers in it in the Layer Parameters section.

In the Background layer, I have a material in which wood and paint are mixed, all other layers are laid on top of it.
In the layer settings, we display the parameters that we assigned to the layer when creating the shader. We also have a choice of RGB masks.
The settings for adjusting the strength of the mask influence that we created in the Blend Layer. And the last choice of the channel from which the mask will be taken.

49_Material_Layers

Things to Consider

Using this system, within one RGB texture, you can mix one base Background material and only 3 layers. If you need more layers, you need to make several RGB textures.
At first, I was going to use two RGB sets, but after analyzing the model, I realized that I could get by with one. One of the materials used in the car is the rusty, oily dark metal typical of the lower parts of all cars. In order not to waste the texture channel on this layer, I used the blue Vertex Color channel. Fill the entire bottom part with it and a little over the top to add gradients to the roof.

As a Layer Blend used the ready-made function LayerBlend_Vertex_Color.

50_Material_Layers

You can also use the same channels for different materials, for example, the red channel of my RGB texture determines where the paint will peel off the wood.
In addition, I decided that I would use it to make abrasions and damage on the metal. To do this, I created a separate Blend Layer in which the red Vertex Color channel is subtracted from the mask so that damage on the metal is not revealed on the tree As a result, metal damage does not affect the wood.

Images below:

Red channel from RGB texture
Subtracting wood walls with Vertex Color
Result

The problems I faced

The material structure of my asset implies that I have layers with wood, metal and on both layers, there is a layer with paint material on top.

The problem is that there should be a very pronounced normal map on the wood, if we apply it only on a layer with the material of the wood, then the paint on top will not have normals, if we apply the normal map to the paint as well, then it will appear on the metal, I did not want to make different paint materials for wood and metal and to bloat the already heavy shader. The goal was to control the paint within one layer.

The solution, use the red vertex channel as the Blend Angle Corrected Normals mask and the tree normal map only appears where we need it.

Images below:

Normal Map only on wood material, under the paint the effect is almost invisible.
Normal Map overlaid on wood and paint material, effect also on metal parts.
Normal Map is masked by Vertex color and works only on the wood.

 

Paint Material

The material itself is simple, customization is achieved through sequential mixing of colors through Lepr nodes, Grunge textures are used as alpha.

61_Material_Layers

Gradients are drawn in the green Vertex color channel, they are blended with the Grunge texture.

63_Material_Layers

The wood is blended through the red channel of the RGB texture and blended using the Height lerp function.

65_Material_Layers

We use the Vetrex Color red channel again to separate the wood from the metal.
Random planks are highlighted with a brighter color on the mask to diversify the manifestation of the tree.

66_Material_Layers

Using contrast and Power nodes, we adjust the blending of the wood, more detailed blending tutorials via Height lerp are easy to find on YouTube.

Additional material mixing options

In addition to RGB masks and Vertex color, we can also use other options. For example, create a Layer Blend that will track the position of our object.

68_Material_Layers

Decals

Images below:

Normal map for Decals
Decals for signs and inscriptions
Normal Decals Material
Decals planes

Graffiti set from Sad Smile Collective

Presentation

From the very beginning, I decided that I would use ray tracing, so all the light in the scene is dynamic.
There are 3 light sources in the scene in total. The fill light is an HDRI Backdrop with a map from the HDRIHaven website, additional Directional Light without shadows to enhance silhouettes, main Directional Light for shadows.

Images below

A simple diorama is used for the background, I wanted to maximize the focus on the asset itself
To prevent the car from just standing on the ground, I took the railway track from my scene with the bridge.

Post-processing slightly increased contrast and saturation.

78_Render

I tried not to get too involved in post processing to keep my asset neutral.
After that, I just placed the cameras and took screenshots through the built-in tool in 2x resolution, added a little sharp in Photoshop and that’s it, the work is done)

Conclusion

While working on the asset, I significantly improved my skills, but there are still many things that can be done better and more optimized.
If you have any tips, I would love to hear them in the comments. I hope for someone this article will be useful I express my gratitude to the CG Allies community for feedback and help during work I would also like to express my gratitude to GamesArtist for this opportunity, you are doing a great job.

Thank you all very much, take care of yourself, create, develop, live and enjoy.

As for me, game industry, I’m on my way šŸ˜€

79_Final