Download

10 layer Materials for Landscape

Hello.

This is me begging for anyone to help me with setting up my materials… I have been at it for nearly 5 weeks and still no clue what is happening.
I have watched over a dozen videos over and over and each one of them does something different for similar things.

I have 10 layers.

Sand
Grass
Dirt
Forest Dirt
Mud
Moss
Cliff Rock
Cliff Rock Moss
Gravel
Snow

I want to give Tessellation to 3 of my layers (Rocks and Gravel)
I want to assign 3 or 4 of my materials (Grass,Cliff and gravel) to automatically be applied as I draw with my sculpt tools.
I want the other 7 layers to be available to me to paint specific sections of my landscape… like drawing a muddy forest.

I have looked at tutorials and read documentation that tackles each of these issues separately but each time I follow one to complete one of the conditions… the first tutorial nullify the steps of the second tutorial as the other guy does it in completely different way for specifically what he wants.
Can someone please help me understand what I need to do to achieve my goal?

Thank you.

You are limited to max 16 textures at any material, including material for landscapes, so it is hard to achieve this. To improve it, any information for roughness, mettalic, ambient occlusion and height (used in conjunction with tesselation) could be packed into a single texture since this info is just grayscale, so you could expend at maximum 3 textures per layer (diffuse, normal and the packed one). It is hard to believe you can go without at least diffuse and normal for any work, but I might be wrong… using 2 textures brings you down to 7 layers top (some functions from library will take 1 or 2 textures out from your pool). Are you painting into regular landscape or a mesh simulating a landscape?

not if they are set to Shared :wink:
(doesn’t mean the performance will live up to it)

Thats right, good recall.

What Chosker meant is that you need to set your texture sample nodes in the field Sample Source: to Shared. There is similar setting for render targets aswell. Not sure if your issues are coming from this anyway. Could you share your current material setup?

Thank you so much for your help.
So I copied the contents of the material as I heard that simply copy-pasting the text document into a materials file would automatically share my material setup.
Please let me know if you prefer another way of sharing my material file.

Here is the text file in question which should show my whole setup except the final connections I made to the landscape itself… not sure why it can’t connect that last bit anyway I attached a picture of how I did it.
Sorry if my way of doing this is unorthodox. First time.
Landscape Materials Trial.zip (135 KB)

Thank you again for your help :smiley:

The look seems fine, just remember to mark those texture samplers as shared or your material will not compile because of the limit of 16 textures per material. Second, is the tesselation part. Let try to explain without having to put pictures in the post. The height information inside the alpha channel of each texture you want to use for displacement has their values going from 0-1. The displacement receiving anything zero multiplied by the vertex will be interpreted as plain, meaning ground level for landscape material… so, you want to have areas where heightmap equals zero to be sunking in the ground level, so you will increase the displacement feel. You fix this, getting you heightmap value and using it as alpha for a lerp node and for A and B values you use a negative number for A and a positive number for B, the resulting lerp you multiply by the vertex. If you understood this last part, you need now to understand how you displace together two materials, being one on top of the other just means adding the displacement value of the top one to the value of the bottom one. You might want to control the amount added with an scalar, so you can increase the height for the moss to the cliff height being the base value.

I hope I was clear enough. English is not my main language, and the text might seem unappropriate for reading than listening if spoken.

Cheers!

Ok I will try to do that. I will also try to research what the difference is between the texture and a texture sampler…

So you are saying 0 to 1 is the height. Where is zero is the lowest level… the ground level.
Ok. But what about these things? That’s how the tutorial said I had to do it.
https://i.imgur.com/zlV4QcR.png

The values circled in red change from 1 to 5… So I am kind of confused on what I have to do.

I don’t really. understand this bit, here is the section for the tessellation issue I talked about. I can only give tesselation to only one of them… not two.
I though maybe adding a lerp would help me have at least two tesselation but I don’t know which one to pick!
https://i.imgur.com/mJmOYFM.jpg

Yes I need to learn about this, I have followed some guides and each person does it differently.
Sometimes they do it in Material Functions or in Materials itself. It is all very confusing but it gets worse for me.
In every video all these guys have so many types of textures for different things like
Base, Metallic, Specular, Roughness, Normals, Ambient Occlusion…

I DONT! At most I will have Base and Normals sometimes they are not even textures, I had to use substances from substance share which seems I could use but I don’t know if it will work properly. As seen below:
https://imgur.com/81qzgHl

In the end I followed the tutorial’s layer blend and set up my stuff like this:
https://i.imgur.com/PFDpiW8.jpg

I am just so confused… everyone does it differently and I have not even made this process automatic I tried following this video but how can I add tesselation and 8 or 10 layers… he only does his tutorial with just a few layers.https://youtube.com/watch?v=FMKq_CV4DkI

Your english was very good but I am afraid you are over estimating me.
The material system is one of the hardest things I have to learn it seems… each tutorial does it differently with different components with little explanation as to why.
Its all so confusing.

Thats the problem with tutorials… they only show the materials and expend no time to explain why they do the way they do.

One part at a time:

1-from the setup you have chosen to do your material for landscape painting, based on your material nodes, are the “height blend” type and not the “weight blend” type
2-the picture tesselation shows how to better set tesselation for a material. For it to work, the node called Texture Sample which will point to your texture, must have the Diffuse at channels RGB and the Height information at (A)lpha.

the negative value fed into the A input for the Lerp node, will allow the dark areas in the heightmap, to show as moving the surface down the ground level.

the value fed to the Tesselation multiplier will have its value based on the distance your camera is current at, so the nearest will have higher tesselation value and the far it is a lower value, this helps with performance. Know that tesselation active into a material for a large surface might cause performance drop.

3- the setup above works for one texture,not considering multiple textures, being each one for a different painting layer. Once you understand how the part above works for one layer, lets get to how it should be for 2 layers

4-To mix different height layers, as I have told, you need to add them, taking care that you dont create height aberration, so control the height multiplying them by a scalar value, like the picture below. It works and might there other ways, this is the simple one.

5-the picture below, show what appears at left when you click on a Texture Sample node. The field called Sampler Source, which has the value: “from texture asset”, should be clicked and have it value changed to Shared. There are two options for Shared, try both and study the differences.

6 - finally, the material for landscape is really not as simple as it should be, but any other material is hard enough depending on its application. It is a step-by-step learning. I would start doing few layers, maximum 3 and adding one by one once I have the 3 layer done nicely. Doing this way you can also optimize the most your material before adding more layers, otherwise, each change needs to be added later for the other layers, which makes the whole process very tiresome.

7 - You can’t just pick a material from substance source to use without taking a look at it first and see if it is assembled with what you need. The whole material will not work if the alpha channed from the main texture generated inside the substance does not contain the height information. You need to check if that texture output at substance designer is assembled this way.