2
$\begingroup$

I would like to apply/blend a shader based on the direction a face is pointing. So basically, if the colors of the axes are used, a cube would look like this:

enter image description here

Ideally, also the negative and positive direction should be taken into account. That way the shader on the face pointing in the Z+ direction can be different from the one pointing in the Z- direction.

$\endgroup$

2 Answers 2

6
$\begingroup$

You can do something like this by plugging the "True Normal" output of the Geometry node into a Diffuse/Emission shader.

Although it is a vector output, it will give you a colour for each face depending upon its normal.

$\endgroup$
1
  • $\begingroup$ Thanks. Using an RGB split I can make it work. I'll post the solution as soon as I got it working as expected. $\endgroup$
    – wout
    Commented Mar 30, 2017 at 17:42
3
$\begingroup$

As it turns out you only have to make the normal direction absolute:

Normals to RGB

$\endgroup$

You must log in to answer this question.

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