Blending 3 Layers

I want to randomly blend 3 terrain layers automatically. Meaning when I paint my landscape I want layer 1 to be the dominating layer but once in a while I want small patches with layer 2 and other small patches with layer 3 just to break the pattern. So not a constant blend between the layers but an occasionally and random blend. How to do this? I’m figuring I need to make a new layer with all 3 layers with some blend function?

No one knows?

Yeah but the key thing is that it should not blend constantly but instead create random spots of e.g. mud in a grassy terrain…

Hi, you could create 3 different Material Functions (For example: grass, gravel and rock), then you can blend them together in a new Material using the Mat Layer Blend node. This node has just 2 input for the materials and another for the alpha so to blend 3 materials together you should use 2 Mat Layer Blend node, in the first blend 2 materials and in the second you can blend the output of the first node with the third material.

Ok, I had left out this things… At the moment I really can’t remember if there’s a way to do this in the material… But I would do it this way… You can create some textures of mud spots of different size and shapes, then you can make some decals out of them and then you can create a blueprint that spawn the decals randomly on the terrain. You can also set some editable variables that allow you to change the amount of the spots, the size and so on. There is also the way to spawn the mud spots just in the grass areas.

Ok sound interesting so how is this done? :slight_smile: thank you for your replies btw

I found something more interesting for you! The method I proposed is nice, but to be honest is not the better way to do what you need… I used this method to spawn procedural hose in the world… and if you want I could explain it to you later. But for the mud spot I found something better… Do you know the Landscape Grass Output node? Usually it’s used to spawn grass on the Landscape but if you replace the grass mesh with something else you could spawn what you want…
Let’s start… At first you need to create the landscape material, after that right click in the material end search for Landscape Grass Output… as you’ll could see this node need an input… you can plug a texture output into the Landscape Grass node… Easy… But you need another thing… Right click on the Content Browser and under Misc menu you’ll could find Landscape Grass Type. Create and open it… it’s an array and you can add to it all the elements you want… Tray to add one element and take a look at the parameters, you can select the mesh to spawn… As I said before you can spawn what you want, so create a plane with the mud texture and an alpha for transparency and add it to the array. Then go back in the landscape material and click on the Grass Output it asks for a Grass Type… Select the Grass Type you created before and its done. If you want in the grass type you can change the density the scale and other interesting parameters. Let me know if it helps!

That is actually an interesting idea… but 2 things though so grass maps only spawns at a set distance from the player as he moves around so you wouldn’t see it far away (that is maybe a durable trade off) and wouldn’t it hurt the performance compared to a normal painted landscape with those textures spawning in all the time?

The distance is determined by the LODs settings… If you set a different LOD for your object you can decrease or increase the spawn distance… You can create more LODs for different distances… For example you can set a first LOD for the closer objects that enable the shadows, the normals, the highest level of polygon and so on… then you can create another LOD for the farther objects that disable this parameters so it will be less expensive for the CPU… Certainly it’s most expensive than a simple painted landscape… But I don’t think that it’s possible to do it directly in the material… Also the method I proposed before is expensive for the CPU… An other solution could be to place the decals manually where you want… It allows you to have a better control on the the position the scale and so on… When I make a Landscape I do it this way… At first I create an Auto Landscape material that applies different materials based on height, so I mix this auto material with other textures so I can choose to paint other material on the base material and create variations and then, if I need to do something particoular (for example a puddle), I do this with the Decals… If you are interested I could show you some screenshot of the result.

Alright thank you for all your help man… I think I’m forced to do most of this manually after all since I need to save as much performance as I can on this giant landscape… and yes please post some screenshots in this thread would love to see how that looks :slight_smile:

Here’s some screenshots… In the Img_01 it’s applied the basic material with no contamination so it set the 3 materials automatically… In the Img_02 I replaced the basic material with a snow material… In the Img_03 I used a cobblestone material mixed with a gravel material to create a pathway with some variations… Then I correct the “errors” of the auto material… It applied the grass material under the water plane so I replaced it with a dirt material as you can see in the Img_04… It’s a nice way to play with the landscape but it’s also a lot expensive for the CPU… Every time you change something in the original materials it needs to recalculate all the textures. Anyway if you need some help just ask for… I’m looking for someone want cooperate to a project… I saw that you’re vary motivated… So let me know if you are interested and contact me privately… Here’s my e-mail address: jackburnmad@gmail.com

Thanks again for your help :slight_smile: Knee deep in projects so can’t undertake anymore but thank you for the invite though.