Question: Material that is dependent on slope

Has anyone used material nodes or something else before to achieve the effect of having a color/texture only on surfaces with a min/max slope? Is it even possible?

I thought of having one material node as the base material and a second that has an alpha that is dependent on the Z value of the normal vector, but how in **** do I actually set this up? All my tries yield nothing…

Regards

Hamu

hi, it can be done with nodes.
there is information here
& more here

Thanx for the input, I did have a look at both threads… I came up with my own solution (which is kind of a blend of the two posts plus another one)…

  1. Move all existing lights into a new lighting group and set all existing materials to use this lighting group exclusively
  2. Add a new sun light (straigth down)
  3. Add a new white non specular material that only reacts to this new sun (another lighting group)
  4. Use the color of this material to drive the mixing of the two materials that I want to have mixed depending on slope (using a math multiplier in between to tweak it some)

Blend: http://www.dumbledor.net/blender/slopemat.blend
Picture (Result): http://www.dumbledor.net/blender/slopemat-result.png
Picture (Node Setup): http://www.dumbledor.net/blender/slopemat-nodes.png

Cheers

Hamu