logo80lv
Articlesclick_arrow
Research
Talentsclick_arrow
Events
Workshops
Aboutclick_arrow
profile_loginLogIn

Studying Vegetation Production with Ducrocq Hugo

Ducrocq Hugo did a breakdown of his Swamp Vegetation project and covered the production of realistic vegetation in Substance Designer, SpeedTree, and Megascans.

About Swamp Vegetation Project

This project came to be as a part of my Game Art studies. Our teacher asked us to create a whole indoors/outdoors scene. Because I had recently played Hunt Showdown and it inspired me a whole lot, I settled on a swamp environment based on what I saw in that game.

My goal with this project was to make it an exercise in foliage, trying to exploit its full potential. During the project, I realized how complex it is to make vegetation look right. This is why I made this small “vegetation scene” apart from my main environment in order to better develop my foliage, understand the way I would need to place it, and how I would keep it coherent and readable in my main scene.

Swamp Vegetation

Inspiration

Hunt Showdown is a PVP/PVE Co-op Game, in which vegetation is ubiquitous. The game takes place in an ominous-looking swamp where foliage can be seen everywhere.

The Hunt Team has managed to create vegetation that is coherent, legible, natural, and that above all serves the gameplay. This is what I wanted to convey in my project: legibility and the language of form through vegetation.

Setting Up Textures

To achieve realistic vegetation you have to choose how you will obtain your textures, depending on your time, and whether you wish to make your own materials or not. You may simply use vegetation scans such as those you can find on Megascans; this gives you access to high-quality textures and does save a lot of time, but may not be suitable for your needs. You can also use Photoshop (in a rather straightforward way) to create your own texture, or you may choose to use Substance Designer, which offers you the possibility to iterate quickly but takes a lot of time to set up.

I chose to mix techniques: I wished to learn both how to make vegetation with Substance Designer and how to integrate vegetation from Megascans correctly.

To me, one of the most important aspects of vegetation, and how one keeps control over it inside UE4, is the correct use of Shaders. Indeed, the most problematic thing when you mix scans and procedural textures is the gap between the different textures. Thankfully, this can be largely compensated with a proper Master Material.

Here is the Master Material for the foliage. There are several parameters that allow adjusting the different passes of the shader, such as its roughness, color, SSS or normal.

1 of 2

The shader is not very complex in itself. I use simple scalar parameters and multiply colors to adjust everything.

Whatever engine you are choosing to use, I advise you to switch between Lit and Unlit mode in the viewport, and even go further by checking the Roughness or the Normal. This will give you several perspectives on what you are doing and is the best way to achieve good results.

Visualization allows you to check that everything is uniform and that nothing is too contrasted.

Looking at Megascans, I found plants that suited my needs on many different atlases. To save a lot of texture space, I imported these in SpeedTree and recomposed them into a single atlas. This is a simple technique that allows me to better optimize my workflow and my scene.

I then created some materials and imported the maps from Megascans. Note that I put the desired roughness settings on my specular, disregarding the viewport rendering of SpeedTree. This is so that the maps are exported correctly. Be careful to set all colors white, otherwise, the result will be slightly distorted.

I then go to the meshes section and edit a new mesh: here the mesh’s polycount doesn’t matter as you will only export textures.

Note: for the branch, I set the skin to "spine only" so that the branch is not visible. For the trunk, you can simply press H to hide the node. 

Then, I set my viewport to the top view to capture my new atlases.

In the viewport parameters, I set the resolution to 4k and displayed the rendering square.

Then I went to the direct settings of the viewport and switched to “opacity mode” in order to have a better view of my atlases. I simpled placed my atlases by selecting my branch and pressing W to move it in the viewport. 

Caution! Do not paste the atlases too close to the edges of the textures or too close to each other! 

All I had to do now is to create my new atlas. I went to "File" (F10) where I could set the maps that would be exported and their resolutions. I made sure that they were in 4k resolution, and that the maps have no color other than pure white (set as “multiply”), otherwise, it distorts the Megascans maps and rework may be necessary.

1 of 2

Once the atlas is done, I reimported it in Substance Designer and plugged it into a simple generator that I made. It allowed me to blur the padding around the plants, adjust the SSS or roughness, and pack the maps for UE4.

Also, thanks to Substance Designer’s last update, I could use the “Scatter” node which scatters atlases that it recognizes automatically. For example, the ground foliage or the lichen decals on the trunk are made using Megascan atlases that I scattered in Substance Designer thanks to this node. This allowed me to obtain several variations of the same atlas very quickly.

Examples of variations made quickly with Megascan assets and the Scatter node from Substance Designer:

If you are interested in this, I strongly advise you to go and see the work of Jobye-Kyle Karmaker and particularly his conference on the modular approach to vegetation in video games. He shares his experience and advice which have been very valuable to me!

Moss Shader

To achieve this moss shader, I knew I wanted to use vertex painting in order to always keep precise control over it, rather than create moss that would only go on top of objects. The latter would not have been suitable for this project.

Here is the moss shader. It may not be optimized for the usage in video games at the moment; I wanted to understand how to use a custom shader and make the most out of it for a small scene like this one.

In my moss shader, I used the "HeightLerp" node which allows creating an alpha according to the height of a texture. I then combined it with the "MatLayerBlendStandar" node which allows blending materials according to a given alpha.

I won't detail the whole shader here, because several points are repeated, but the main things to know are that I have a base material and secondary materials: in the base material I input the alpha of the MSK texture and the heightmap in order to use it in my "Height Lerp" node, then I connected one of the vertex colors to the height lerp node. Then, I mixed the two materials.

I repeated this operation 3 times so that I could add moss, change the roughness, and add mud (or other material ), all of this thanks to the 3 vertex color RGB channels.

Then, to make sure the mask is applied more realistically, I added a custom RGB Mask from Substance Designer with a black and white mask in each layer, with 3 different masks: one for foam, one for roughness, and one for mud. I multiplied this mask with the alpha output of the "Height Lerp" node.

Here is the difference between two blends, with and without a custom mask:

Finally, UE4 has a node called "Fuzzy Shading" which allowed me to create a particular fresnel and create a moss effect on the edges of the texture. I just plugged it into the albedo at the very end. I recommend this node to everyone who wants to make moss in UE4 because it is quite realistic and can be tweaked.

As for the other settings, there's nothing complicated: I went from a simple scalar parameter to a multiply parameter to adjust tiling and contrast. Here are the final shader parameters:

SpeedTree Potential

I discovered SpeedTree a few months ago and immediately saw the potential power of this software in production. I advise you to check out SpeedTree's official youtube channel where several well-made tutorials are listed.

With SpeedTree, you can create trees, of course, but also as I showed earlier, create atlases or recombine them, create small plants, shrubs, bushes, etc. All my plants have been created in SpeedTree:

Be careful though, SpeedTree is software with lots of different settings and sometimes it can be better for simple assets to be made using a classic 3D program rather than to fight with all of SpeedTree settings for hours (which I did!).

I won't go into detail on how to create vegetation in SpeedTree as it involves a lot of parameters and SpeedTree's tutorials will be much clearer than I am. To me, the most important thing to do when starting out is to look for a lot of references and play around with the different options in the software. Nothing is more important than discovering by yourself in order to better understand the inner workflow of the software and develop your own tricks. In SpeedTree, there are several methods for working. The first and most important is to procedurally create foliage and then thanks to SpeedTree's "Node" tool, manually manage leaves and branches in order to build an interesting shape, give it meaning and realism, and break its “procedural” look.

Generator example mode:

To further break the “procedural” look, you can tweak the curves of each setting and the variation offset with the "+/-" buttons. This will allow adding more variation in each setting.

You can also add different types of forces to your foliage: they add movement and a natural effect to the plants. Each force can be tweaked with global settings or individually on each element it is applied to.

Here is an example of a classic directional force that I exaggerated for the demonstration:

Finally, if you want to give more importance to some elements, you can convert the node to "Hand Drawn" mode in order to control it with bezier curves.

Here is an example of one of my trees that uses the Hand Drawn mode:

Palm Leaf Generator

Deciding to create a simple palm leaf texture in Substance Designer, I ended up exposing so many settings that I created a “Palm Leaf Generator” which was much more suitable for my needs.

A piece of advice when you start a project is that you should set yourself a clear and precise objective with small intermediary goals so that you don't get lost in your work and stay efficient.

Let's get to the heart of the matter: first and as I said earlier in the article, references are your best tool by far to achieve a realistic texture. I advise you to have a photographic reference opened constantly on your screen. You should see your reference like a GPS. 

From this basis, you have to create variations, analyze your references and find patterns that repeat themselves, shapes that work, colors that look alike, etc. For example, for this texture, I relied both on my photo references and on a high-quality Megascans texture.

Here is the general graph, each part corresponds to an element of the leaf. As you can see, the graph is not well arranged; I didn't arrange it before writing this article to show how important it is to be well-organized before starting a large project in Substance Designer. 

I almost only use simple node combos. Remember that if you generate 12 4K procedural leaves, the computer will have to load them 12 times in different ways, which can be very costly.

For the base shape, I used only a simple deformed poly that I also beveled to create the middle line.

Then, I immediately created the damaged sides of the leaf and entered them in a switch parameter to let me decide whether they are damaged or not. The process was very simple; I blurred the basic shape that I just subtracted from a shape reduced to create an outline, and this outline served as a mask for my tile sampler. The long and finished shapes generated by the tile sampler would be deposited at the edges of the leaf, creating this damaged effect once subtracted from the basic shape.

I repeat this operation once again but with a gradient instead, in order to have stronger damage on the upper and/or lower end of the leaf.

Then, I added the center line and the first pass of height on the leaf and warped it to add character to it.

I also added grunge on the height that I will use later in the color. For that, I mixed several grunges with a brush pattern that I mixed in a tile sampler. Then, I applied it to the leaf.

After that, I added the first color base by mixing 2-3 colors maximum and blended them with simple masks like AO, curvature or noise.

To achieve the dry aspect of the leaf, I used the "Axial Gradient" node, which allowed me to create a gradient with a point that I move manually. Once the generator is exported in another graph, the point is always accessible, which allowed me to manually generate the distance at which the leaf dries!

Creating the dry aspect in itself is nothing too complicated. Once the gradient is generated, it is multiplied with several grunges and blended with brown color.

Here is an example of how I control the dry part of the leaf (accelerated to 1K for performance!):

Finally, to create those yellow stains, I simply generated a tile sampler with a general mask and a stretched sphere to generate the stains. To that, I add a second layer of stains generated by a simple dirt generator that is already included in Substance Designer. I exposed the parameters of these nodes to get enough control over these yellow marks.

Here is an example of the yellow stains generation on the leaf:

Here are all parameters you can change on the leaves and a breakdown gif from scratch to the final result:

Then, I created a new graph in which I made different leaves, assembling their different parameters in an atlas thanks to material blends, before exporting them in SpeedTree. Note that if your computer is not powerful enough but you still want to export in 4k, charge graphs progressively and be very patient!

Once in SpeedTree, I just needed to build my atlas with a Branch and a Frond. An advantage of SpeedTree is that you can cut out each leaf and choose its proportions in the palm. For the Materials, you just need to adjust their Weights.

Then, for the dried sheets, one can play around with other parameters like Noise, or as I showed above, move each leaf by hand thanks to the SpeedTree "node" mode, the goal being to obtain interesting complementary atlases, from shape to color.

Here it is! When I was done, I just had to export my new atlases as explained above in the article and add the heart of the Palm in Substance Designer or Photoshop. Then these atlases could be used to generate palms!

Feedback

To me, the hardest challenge of this project was to succeed in creating convincing and realistic plants with interesting shapes, which could potentially be used in production.

As a student, I find it important to make sure I use new tools and learn new things all the time during each project, otherwise it wouldn’t bring new experiences or make me grow. 

Here, I wanted to approach the treatment of the plants through SpeedTree, Substance Designer and Megascans, the goal being to experiment and see what works/what doesn't work, what could be improved in order to then create my own workflow and go much faster. 

To me, it is crucial to be able to develop one’s own workflow or to adapt an existing one, because it allows working professionally in a team at a studio.

Thank you for reading! It was a great pleasure to write a second article for 80.lv (the first one covers my Civilization VI Fan Art made in Substance Designer and can be found here).

By the way, I am looking for an internship from June 2020 - if you are in a position to offer it and are interested in my work, please feel free to contact me!

Ducrocq Hugo, 3D Artist

Interview conducted by Kirill Tokarev

Keep reading

You may find this article interesting

Join discussion

Comments 0

    You might also like

    We need your consent

    We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more