I wanted to make a Material, that changes automaticly on steep parts of the landscape. I worked with a german Tutorial (Link).

For me the result seems randomly. I tried changing the values of the rotation on the mapping-node. x:-45 and y:180 seems to work for one side of the valley. (should I also try the location and scale values?)

What do I do wrong?



It looks fine to me..

enter image description here

However I like to use a separate RGB node to separate out the Z part of the normal for this kind of effect.

If you connect the normal output of the texture coordinate node straight into the color input of a an emission shader, you'll see that there that the three "channels" (X,Y,Z) get mapped to RGB. So faces pointing towards positive Z are blue, positive Y green, and positive X red. (faces pointing in between will be additive combinations of those colors, such as pink, yellow, white, etc.)

enter image description here

If you separate out the blue component, you are left with a map of faces pointing upwards (along the Z):

enter image description here

By feeding that into a color ramp node to fine-tune the blending, then using that to mix between shaders/textures as in the tutorial, you get a result like this:

enter image description here

In the above screenshot I also applied the scale and add some loopcuts to the terrain object to make the mesh density more even, reducing the "stretched" look.

  • $\begingroup$ Can you please explain, what you did here? Does Normal-Vektors have color information? I can't follow. $\endgroup$ – Thomas131 Aug 19 '14 at 19:22
  • $\begingroup$ And thanks for making the answer more clearly twice! $\endgroup$ – Thomas131 Aug 19 '14 at 19:57
  • $\begingroup$ How did you get rid of the different color on both sides of the valley? $\endgroup$ – Thomas131 Aug 19 '14 at 20:28
  • $\begingroup$ @Thomas131 Everything I did is in the answer.. Did the node setup from the last screenshot not work? $\endgroup$ – gandalf3 Aug 19 '14 at 20:36
  • 1
    $\begingroup$ Thomas131, it's not that normal vectors represent color; they are numbers and if those numbers are used to control the power levels of the pixels on your computer screen then you will see color. Normals are really surface directions. $\endgroup$ – MarcClintDion Aug 19 '14 at 20:55

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.