2

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.

wout
  • 1,186
  • 3
  • 11
  • 26

2 Answers2

6

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.

Lewis
  • 1,310
  • 1
  • 13
  • 26
  • Thanks. Using an RGB split I can make it work. I'll post the solution as soon as I got it working as expected. – wout Mar 30 '17 at 17:42
3

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

Normals to RGB

wout
  • 1,186
  • 3
  • 11
  • 26