Material Layer Change per Terrain Slope

may be covered somewhere but I am unable to find it anywhere… I have a multiple layered material (Grass, Pebbles, Rock)for my terrain and I want to automatically change the layer used for whatever the slope of the terrain is. If I have a flat plane up to 10 degrees I want grass, a steep cliff (46-90 degrees) I want rock, and anything around 11-45 degrees I want pebbles… I found a youtube video without sound but cant understand a thing on how it was accomplished. Does need to be done with blueprints or is there a layer parameter that can be changed? The Desert Rally Race map is a perfect example though I am unable to pick the blueprint apart because I am a noob to UE4!

Thanks

Read page, section: Rock and Grass Blending: .unrealengine.com/latest/INT/Resources/Showcases/Stylized/Landscape/index.html
That should cover your needs.

Also check out short tutorial:

Perfect Thanks!

Does anyone know how to keep my cliff rocks to remain horizontal all the way around?

should do it:

.unrealengine.com/latest/INT/Engine/Rendering/Materials/Functions/Reference/Texturing/index.html#worldcoordinate3way

Try setting up a rotator node with a parameter and tweak the sides until they look right- way you can use the same texture.

EDIT- didn’t realize it used texture objects I’m not sure how to rotate them, if anyone knows how I’d love to know as well.

After I posted I kinda found a fix but it is not automatic and not exactly what I want… I copied and rotated the texture with a rotate modifier and added it as a layer so now I have a regular and a 90 degree rotated one so I can just switch between the two and paint them on… But I am still looking at a better solution. It looks as thought the vehicle game example has the solution but I cannot pick it apart enough since the material is too advanced for me!

Use the rotator node instead of adding more textures.

I would still love to find out how to rotate Texture Objects.

Well, you can’t rotate a texture object because there is no coordinate information. The texture needs to be sampled in order to use any sort of modified texcoords.

In other words, you need to edit the material function in question to add the option of rotating textures.

You can use a WorldALignedTexture node to have your rock texture mapped sideways.

Sorry, I know is an old post but I have the same problem and can’t find any solution. I need my cliff texture to remain vertical everywhere there’s a cliff.

Hello, search for triplanar coordinates mapping