Need example on SlopeMask and other ways to texture huge tiled landscape

Hi all,

I’d like to texture a huge landscape in UE4 as I would in WorldMachine, based on height and/or slope selection.

I searched in the docs but cannot find clear explanations on how to do… I looked at the “Stylized rendering” but I miss some info.

I saw too, there’s a ‘new’ node called “SlopeMask”, I suppose to use on slope selection, but I did not find any example or how-to use it.

So I have some questions :

1/ How can I select a height range to apply some texture or colour on ? (ie I want the terrain between 10m and 50m to be sand texture, and the terrain between 50m and 200m to be grass texture, etc…)

2/ Same question based on slope selection

3/ How to combine the height and slope selection (ie: slopes between 30° and 45° within the height range 10m-100m or vice-versa)

4/ Is there a way to specify a min/max value for each of these (slopes, heights)

Any help/guidance (with examples if possible) would be appreciated

Cheers

PS - Sorry for my bad english, I hope nevertheless be clear

1.There is node called Absolute World Position, which then you can specify the height using the Vector 3 Value’s Z part.
2.Not sure, haven’t used that. But from the example I’m seeing now, yes.
3.Not sure what you want, but there is many ways to blend two textures, the most common one is to blend using Linear Interpolation, i.e. Lerp.
4.Clamp, which can limit the range where the Input goes, but that wouldn’t help you choosing specific values from your Input, just restricting them to within a range.

I’ll chime in on the SlopeMask part of the question.

The SlopeMask can take the input of a node call the VertexNormalWS. The output of the SlopeMask should go into the Alpha input of a Lerp function, with your two textures as the A and B inputs. The output of the Lerp can be sent directly to the Base Color input of the material. I’ve included a screenshot to show how it’s basically hooked up.

1 Like