1
$\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$
4
$\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$
  • $\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 Mar 30 '17 at 17:42
1
$\begingroup$

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

Normals to RGB

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.