# How to display textures at a certain angle?

let’s say I have 3 textures, I need one to be displayed with an angle of 0-10 degrees, 2nd 10-45, and 3rd more than 45 degrees, the problem is that I don’t break well in graphs, tell me how to set such a condition in graphs?

What is your angle relative to? The camera? The world up direction?

1 Like

sorry, I put the question a little wrong, it concerns the terrain, that is, to have one texture on a flat surface and if it is a slope or an almost sheer wall, then another texture…

What you need to use is called a slope mask. You can create one like the screen shot below. The A and B values going into the Inverse Lerp control the angle of the mask. Low numbers (between 0 and 1) will give you a low angle and high numbers will give you a high angle. The distance between the A and B numbers control how smooth the blend is. So the closer together A and B are (like if A is 0.5 and B is 0.51) the shaper your mask edge will be, and the further apart they are, the smoother the blend will be. Then you saturate the result and pass that into the T value of a Lerp node. And then use can use that Lerp node to blend your textures as shown.

If you need to do it again for another texture, take the result of this and make another mask (the first 4 nodes on the left - Normal Vector, Split, Inverse Lerp, Saturate). Pass the below into a Lerp node as the first texture, make a new texture for the second one, and pass in your second mask as the T. I can give you another screen shot of the whole thing if this description is too vague.

1 Like

thank you very much, but can you tell me more - is it possible to somehow set the input value 0-90 with nodes so that it then goes to 0-1?
I mean so that you can set the angle not from 0 to 1, but from 0 to 90 …

The Remap Node can be used to convert a range of values to another range, so if you want to put in values between 0 and 90, but you want the result to be between 0 to 1 - that’s what the Remap node is for. So this example builds on the one above - using the Remap node to convert degrees to the 0 to 1 range before passing the values into the Inverse Lerp node. I’ve also added a second mask and a third texture - so this is blending from the first to the second texture between 10 and 11 degrees, and then blending from the second to the third texture between 45 and 46 degrees.