In this tutorial, we will see how to set a Stencil texture so that the shader shows either one of two shaders:

  • a "snow" texture on surfaces that are mostly horizontal
  • a "rock" texture on surfaces that are mostly vertical

Of course, the Stencil texture will control to which extent each texture applies to the surfaces according to the slopes, and the gradient between them.

I will not cover the snow and rock textures ; you are free to use any Image texture or any procedural texture. For this example, I used a Clouds texture for the snow and a Voronoi - Minkovsky texture for the rocks, both with Colorband enabled. At a distance, it is good enough for the purpose of this tutorial.

In the Shading menu F5, Material buttons, display the Texture panel. You have ten chanels available for textures. In the first one, put your 'vertical' texture (e.g. Rocks). On the second one, you will set your Stencil texture. And in the third one, you will have your 'horizontal' texture (e.g. Snow).

Setting the gradient texture

Basically the stencil would be a Blend texture. Activate the Colorband in the Colors tab, and set the color of the first cursor to black color (don"t forget to set Alpha to 1.000). The second cursor should be set to white color. Then add two cursor in between, the one on the left being black, like the first one, and the one on the right being white, like the last one. In the Blende type, do not forget to choose a type of Blend (Linear is just fine) and to press the Flip XY button so that the gradient is 'vertical'.

You now have, from left to right, cursors 0, 1, 2 and 3. 1 and 2 will help with controlling the gradient and, thus, both the transition from snow to rocks, and how much dominant each texture is.

Some comments:

  • The more close the cursors 1 and 2 are, the more sharp will be the transition between the snow and rock textures
  • The more cursor 1 is on the right, the more the vertical texture will be dominant
  • The more cursor 2 is on the left, the more the horizontal texture will be dominant
  • Both textures can only be dominant at the same time is the transition is very sharp

It is easy to view on a render how the stencil will apply: the black areas will show the vertical surfaces and the white areas the horizontal surfaces.

Focus on the stencil

As usual, in the Map To tab, activate the Stencil and No RGB buttons. You might find that the Neg button is useful also if you have to switch between the horizontal and vertical textures, if you paid no attention to their order in the texture chanels list.

All the voodoo magic is in fact done in the Map Input tab. You will just have to make sure that the Nor coordinates are taken into accound instead of the regular Orco. Is it really as simple as that??? Well, indeed, it is.

Well, you just have to sculpt and texturize your own landscapes, now!