Michael Gerard did a breakdown of his Abandoned Train scene made with UE4, Megascans, and SpeedTree: moss creation, Cover System, PP Material, and more.
Lately, I’ve been experimenting and before Abandoned Train, I made two projects: Forest and Foggy Forest. The goal of the first one was to create visual effects only with the post-process material, and for the second – to work with volumetric fog. I wanted to know how far it is possible to go with this feature and where is the line between useful and useless.
When I started Abandoned Train, I was really inspired by FarCry New Dawn and my first motivation was to recreate this “pinky” visual aspect, like in the game. But I changed my mind when I thought about the moss. In the end, the main goals for this scene were to put everything I have learned in the last few months and work with moss.
A lot of assets were not created by me, for example, train and railroads come from a pack. Rocks, mushrooms, sticks, and foliage atlases come from Megascans library. I only created all ground foliage models and some trees.
I never know key elements in advance and rather work with feelings and ideas. I lay out the foundation to get a global idea and refine it as I go along with details, specific assets or textures. I never restrict myself to one thing only, that’s probably why I’m going in all directions when I work on a scene. I really love colors and diversity and combine fresh grass with dry plants, dead wood, big rocks with small stones. With this in mind, I create my scenes, trying to get the most “living” forest as possible. Even if I take some liberties like vegetation types not in the right biome.
Cover system in UE4 is a function that’s not too hard to create. It is based on Normal map and I called it “F_Cover_Logic”
To get the perfect result, I needed to improve it with a lot of other material functions. I often work with material functions because it makes the material cleaner and easier to understand.
Next screens show you all the functions I created for the Cover system. The most important node is “F_MossCover” and even if it looks really complicated at first, it’s not so scary.
First part is a classic “Tilling” control. Bump function allows me to give more depth to the textures. Splitters are here just to separate categories, they’re not essential.
Textures are classic, too. I use one called “RDAO” which is just Roughness (R), Displacement (G), and Ambient Occlusion (B) combined.
To control the normal intensity more accurately, I separate the red and green channels in multiply A input, both are connected to a Scalar Parameter (B input). Blue channel isn’t used, so it can go directly in the second Append.
The “Fuzzy Shading” is an Unreal native node which gives us the “fuzzy” aspect, perfect for moss.
Specular is generated by the red channel of Albedo texture. It goes through a function named “F_SpecularCorrection” to give a better specular result with Fresnel area only visible when you’re facing the sun or a light source (it’s more realistic).
Roughness is generated with the Red channel of my RDAO texture. If you don’t have RDAO, you can use the blue channel of your Albedo and invert it with a OneMinus node.
Ambien Occlusion goes through a 3PointLevel to give me more control over greyscale.
And to finish, a constant set to 0 is plugged to “Metallic” input.
I decided to use a Fade system which is widely used for landscape materials. This allows you to generate a different texture scale depending on a specific distance.
To start, I created this fade function, nothing too complicated. This function retrieves the position of the camera in relation to its position in the world and will be divided by the distance.
F_FarDistance allows you to separate the near elements from the far ones. The “Near” is in A input, “Far” is in B and our previous function (F_DistanceFade) is in Alpha. Two Scalar inputs are added to control the distance.
And here’s our “CoverFade” which allows us to play with parameters in our instanced materials. We put scalar parameters in all the inputs. Each Scalar is used for both “F_MossCover” except for “Tilling” where two different parameters are required (Near/Far).
Moss Cover Implementation
Here is how to implement the “Cover” system in the material. The material used is not really important because the implementation is always the same.
We start by creating a “Make Material Attributes” and connect all elements used in our material (Base Color, Metallic, Specular, etc.)
We need to activate “Material Attributes” now. To do it, click on the final node or the background grid and check the box named “Use Material Attributes”.
Here you can see how the final implementation looks like. Nothing too hard, is it?
During the test, we can see that the moss applies to our rock well. It follows its rotation as desired and we can control it via Vertex Painting (Weights).
The Cover function was really useful but it lacked some relief for me, so I decided to create some meshes with Megascans atlases.
To make this kind of meshes I use SpeedTree only. I didn’t need to create specific meshes in a different 3D software solution, so I generated them in SpeedTree. This feature is a big time saver.
Placement is pretty simple, and most of the work was done for the “Set01” only. For all the others, it’s just duplication and change of parameters like Start Angle, Position, and Boundaries First/Last.
Megascans & Mixer
I knew from the beginning that the most important texture would be the one with roots, so I focused on it. To be honest, I didn’t have much to do in Mixer, a scan was already available in the library and fit my goals perfectly. I just added another scan to accentuate the effect of the roots and my texture was done.
However, I spent a lot of time retouching my displacement. The tessellation had a key role in this scene, so I made sure not to put it aside. After many adjustments on Photoshop, I managed to get a result that was satisfactory to me, even if some areas were too bright.
I worked with a lot of Megascans objects in this scene and a common point of all of them was the material.
It’s a little hard to read because I didn’t have time to put everything in the functions, but I’ll give you as much detail as I can.
To begin with, we see there is a bump function: this function is exactly the same as the one used in the moss function. Then come the textures, two of which are combined. The “CRS” contains the Cavity (R), Roughness (G), and Specular (B). FuzzyMap (R) is for objects containing moss, then Height (G) for tessellation and Ambient Occlusion (B). For Megascans models, the Ambient Occlusion is present in the blue channel of the normal map. That’s why I no longer use the AO of my combined texture.
Some models have a cavity map, it can be very useful for adding detail. I make the cavity go through a 3PointLevels to be able to control the intensity of the grayscale.
It should be noted that the material I am showing here is used for absolutely all Megascans models, except for the vegetation. Mushrooms also use this material which is why it has Subsurface.
As for the fuzzy shading, here it’s the same. We get the normal of our object as well as its color base, pass everything through the function and the alpha gets the information from our Fuzzy Texture.
Finally, I run BaseColor through a Vector Parameter in order to be able to control the Brightness/Color of my asset.
The specular and roughness are quite classic: I just get the Blue channel from my CRS (or the Red channel from my Albedo) and pass it through a Multiply. The same goes for roughness.
The Normal works the same way as for the moss material.
This part allows you to add the textures of details that are sometimes present in Megascans objects. I get my Normal Intensity system back, pass it through the “DetailTexturing” node to which I add two scalar parameters to control the intensity and size of my detail texture and finish by adding my texture in the “DetaiNormal” input.
The opacity mask is classic, I just get the Alpha from my Albedo.
The displacement is a little boosted here, so the tessellation is accentuated and is much more visible.
Here, the Ambient Occlusion is retrieved from the blue channel of the normal map since this is where it is found in Megascans assets.
And finally here is the Material Master. On the left, we find the function that has just been created. The “F_DistanceTessellation” function has the same principle as the fade of our moss. It allows you to manage distances and decide whether to display tessellation or not.
SpeedTree In Unreal
The main advantage of SpeedTree for me is its speed. Almost everything can be done without the need for third-party software, especially the ground vegetation. I also do it more out of habit than out of real necessity because I really like it. It’s so easy to create concrete things in it that I use it every time I have the opportunity. Moreover, it is easy to manage the ambient occlusion, Atlas or LODs and the wind generated in SpeedTree in Unreal.
I believe the secret is in the placement of the elements. It is controlled chaos which can be easily managed in Unreal with “Procedural Foliage” feature.
This feature is not enabled by default so you have to switch it on: go to Edit>Editor Preferences>Experimental and tick the box “Procedural Foliage”.
Here is the ProceduralFoliageVolume (PFV) for the placement of my spruces. You can see that the offered options are quite limited. The first part concerns the size of our volume, and the second part concerns the Foliage Spawner where we will inform the objects to be spawned, the type of actor where we want to spawn our vegetation and finally the “Resimulate” button which allows us to spawn everything.
The Foliage Spawner is nothing more than a library of Foliage Types.
This is typical foliage of one of the spruces used in the scene. This is where we control the placement of objects. The “Placement” and “Instance Settings” sections are the same as for the “Paint Foliage” tool. The first one allows us to control the offset of our objects, alignment based on the normal, random rotation, the degree at which our vegetation can be placed (maximum and minimum position in the world). And the second lets us control the Cull Distance and collisions or affect indirect lighting.
The second section, Procedural, is much more interesting since we control the spawn of our objects exactly through it. The distance between objects of the same category (Collision Radius) and the distance from the “fade” area (Shade Radius) can be controlled here.
In the “Clustering” we will determine the pass number (Num Steps) for the spawn as well as the density of objects per pass (Seeds Per Step).
Finally, I choose the minimum and maximum size (Procedural Scale).
Here is a result of the previous parameters in a 10×10 area:
For the placement of my vegetation, I use Landscape Grass Types put in my landscape material.
There is one native feature in Unreal which I don’t see many artists using in their works. This is the “Shadow Contact Length”. It allows you to obtain ultra-precise shadows that are very close to objects, which is perfect for rendering. To obtain this option, simply select the LightSource of your scene.
Another technique used in this scene is a Post-Process material that makes the image much sharper.
PP Material Sharp
I also used Color Gradings (LUT) which is the fastest way to get great coloring. To be able to combine several of them, I do not hesitate to add a few Post-Process materials that only contain LUTs.
CubeMap (HDRi) Creation
The real secret for this kind of light is the Cubemap (HDRi). Thanks to the Ansel plugin natively present in Unreal (but disabled by default), it is quite simple to create a Cubemap of our own scene. Here’s how to do it (for NVIDIA users only):
- First, you must activate the plugin for our project. Select Edit>Plugins. The project will then tell you that it must restart. Before doing so, we will make sure that it is activated on our PC.
- Go to the following root “C:Program FilesNVIDIA CorporationAnselTools” and launch “NvCameraConfiguration.exe”.
- The most important thing here is to assign a destination folder where your screenshots will be saved. Make sure that the status is “Enable” and click on “Save”.
- Before we restart our project, we must perform one last action. We will make sure that Ansel can save its captures without worrying its size. To do this, launch the command prompt (CMD) and copy/paste this line: “C:Program FilesNVIDIA CorporationAnselToolsNvCameraEnable.exe” whitelisting-everything
If the operation went well, it should send you back to the line. You can now restart your project.
To access the plugin, you should launch your project in “Standalone Game”. Once the game is launched, press Alt+F2 (default) and F3 to switch to “Lit” mode.
Select the Capture Type 360 and click on “Capture”. It should take a series of images and return to this window when finished (the capture is in French, but it doesn’t matter). You must now go to your folder where you saved the captures and find your screen.
But it is not a Cubemap yet. To convert it, just send it to Photoshop, change to 32-bit mode and save it in “Radiance” format.
Now that our Cubemap is created, all we have to do is import it into Unreal.
As you can see, the image is quite blurry which is not very serious for us since we only want to recover the general light. But if you want to use it as a reflection, you can increase the resolution (Maximum Texture Size). You can also adjust the brightness of your image.
We must assign our Cubemap to two elements: the first is the Global PostProcess and the second is the SkyLight.
The final rendering is not playable at all. Many features have been pushed by console command to get the final look. The tessellation has been increased to 75 in the config files, planar reflection is set to 100% on Screen Percentage, the LODs are all 0 (foliage.LODDistanceScale 30000), the fog has also been refined (r.VolumetricFog.GridPixelSize 8 AND r.VolumetricFog.GridSizeZ 64), and the percentage resolution is 300% (r.ScreenPercentage 300).
For the playable version (1920×1080 – +60fps[1080ti]) I lowered the tessellation to 15, deleted the planar reflection, configured the LODs, left the volumetric fog and the resolution percentage by default.
Here’s a small video to see how it looks in a playable version (60 fps):
I really think of creating a complete Udemy course about the scene creation with Mixer, SpeedTree, 3ds Max, Photoshop, and Unreal Engine, and it might be available in a few months (the price should be around $20).