5
$\begingroup$

Is there a way to apply a map, mask, or material by an angle threshold? I have done this in C4D years ago but unfortunately no reference to share.

For example, on a mountain, I want to apply snow on parts that are flatter while on steeper parts I want to apply the mountain texture.

Thanks, Stefan

Quick test and result after I got the answer and exactly what I wanted!: enter image description here

$\endgroup$

2 Answers 2

4
$\begingroup$

You can use the Input > Geometry node, plug its Normal output socket into a Converter > Separate XYZ node in order to determine the angle. You can also plug a Mapping node between the Geometry and the Separate XYZ if you want to tilt the angle:

enter image description here

Use a b&w ColorRamp if you want to use the Geometry node as a factor between two textures:

enter image description here

$\endgroup$
6
$\begingroup$

You could take the dot-product of the normal of the surface with the unit Z vector, as a measure of the angle with Z.

It's cos(the angle with Z), if you want to arccos it, for the actual angle, in radians.

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .