Ok, there’s some point at which a complex material’s shader network starts looking really ugly. In our case, this is that point. Warning - the incoming screenshots will be VERY, VERY messy. I’ll do my best to explain what’s going on there - not really complicated, actually. I’ll post the Grass layer again; we get the other layers in a similar way:
We had 6 outputs in our material function: Albedo Small/Large, Roughness Small/Large, Normal Small/Large. So we just lerp our Small/Large pairs together using the high contrast macro variation mask. Now we connect the Albedo’s lerp output to another lerp node, connect the alpha to the distance fade mask, the B output - to the average color. I used the last lerp (and plugged the Base Color into Specular) to match the colors of the landscape and the grass. If you don’t have the same problem, you can skip it.
Repeat for the other two layers, reuse parametric nodes. We’re not fading the normals here as, unlike the average color, the flat normal is the same for all of them and can be done after blending.
Not to overburden the screenshot with text, I’ll color code the inputs - R for Rock, G for Grass, B for Pebble:
So, first we blend the Grass (G) maps with the Pebble (B) maps using the Dirt (B) mask we got in the beginning. Then, we blend the result with the Cliff (R) maps using the Cliff (R) mask. We still need the Grass (G) mask for grass output.
Now, let’s finalize the texture outputs and plug them into our material inputs:
The LayerBlend nodes are not used right now; I’ll write about using them when I learn how to remove foliage when painting, in our case, the Road layer. The Global Normal is a big 4k normal map I got from WorldMachine; I’m using it to make the HeightMap look nicer.
So, all we have to do to wrap up our material is to get the grass output working!
You have to specify the Landscape Grass Type asset to be used with the Grass layer. It’s easy to create and edit one - if you need a tutorial on that one too, ask in comments.
Thanks for reading this tutorial, hope it helped you. If you have requests/comments/additions to the tutorial, you’re welcome to add them in comments. If you use the material in your project, a screenshot added to this topic would be appreciated. Have fun.