Landscape material

Hello,
(I am not sure if this is the right forum if it is not please tell me where to reopen the topic, I’m new in UE4)
I am trying to make an Automatic Landscape material that can also use layer blend and paint by hand.
I was able to make each option separately but not combined.
If someone could direct me to a guild or tutorial of this subject that would be great :slight_smile:

edit: I have found something nvm :slight_smile:

I recommend this as a good starting point for landscape materials: Landscape Material Tutorial Part 1 (Unreal Engine 4) - YouTube

Generally the automated layer adds too much overhead to the shader complexity.

I have my material running in this way.

Auto layer - if you fill this layer you get the automated base.
Separate layers - coloring these over the auto layer destroys performance.

Once you are done painting over the auto layer, delete the auto layer.
result is usually a somewhat fast landscape material. Depending on shader complexity and tile size that was chosen anyway.

While I no longer use the layer blends that come with landscape as their performance is incredibly bad, you can probably just copy and paste (provided you aren’t using 4.24 or that 4.24 shader paste bug was fixed otherwise you’ll have to deal with a lot of re-wiring) your auto material into a material function, out put it to different pins, and do the same thing one normally does for a single layer.

You can then call the material function within the landscape shader and assign it to the auto layer you simply add to the list.

You may want to change the order of them. Again, haven’t played with those landscape layer nodes since 4.21 when I realized just how bad their performance was over simple add/subtracts.
I would suggest having the Auto Layer as the starting point / first entry, the other layers following it. However this may not matter one bit…

So you’re suggesting is to paint by hand all the Landscape after i put the auto material and then delete the auto material to increase performance?

Essentially yes. The auto material eats up a lot of ms due to computations - especially with slopes.
Using it as a visual base to repaint is painful, but eliminating all the computations required for an auto material end up saving a lot of ms.

You do or may trade off for more draw calls I’m not entirely sure.
However the ms from stat unit increased significantly between the two versions.
one with painted layers vs one with just 1 auto layer.

and if you already know that you will add extra stuff here and thear to the auto Layer like I was using the layers flat out instead was a no brainer…

Also, I have noticed that any time you have 8 plus layers on a single landscape tile localized performance is degraded.

if I could I would just bake out the material and use static meshes for the landscape too. In fact, I likely will once the project is finalized.