Using Altitude and Slope for Landscapes

The idea of altitude is use the height of an object to control the application of other IFW2 shaders. This makes it useful for texturing landscapes and allows different parts of a landscape to have different textures. This tutorial introduces the altitude shader and allows a canyon type of landscape to have different shaders on the sides of the canyon and the floor. In addition, this tutorial uses the Slope shader to add dust collection to the canyon floor and greenery to its upper slopes.

Step One
For this tutorial we need to create a landscape scene. I used terragen to create a landscape object. This was loaded into lightwave, the camera positioned, the scene lit and a textured sky added. I used IFW2 textures for that too! The basic scene can be viewed in the image on the left.

Step Two
The first thing to do is add of overall mottled color to the landscape. Here, we are going to use some fractal noise so add the IFW2_Noise shader and select fBm. Set the bump height to 0.0 and make Color 1 a dark brown and Color 2 a sandy color. The results can be seen on the left hand image.

Step Three
Now we are going to use the Altitude shader to make the floor of the canyon darker than the sides. So, add the IFW2_SpecialFX shader and select Altitude. The next thing to do is set up the blend points for the altitude. The easiest way to do this is make Color 1 red and Color 2 green. Then go to the layout and estimate the height of the landscape and the heights for the blends. Finally bring up a viper preview and adjust parameters 6, 7, 8 and 9 to generate the extract blend function based on the height of the canyon walls. This is shown an the left hand image, notice that a bit of noise was added to break up the blend and add some detail.

Step Four
Now we have the blend of the Altitude function set up we want to add some color and mix it with the underlying fBm texture set up in step two. This will darken the floor of the canyon. On the Altitude shader change Color 1 to a sandy color and Color 2 to a darker brown color. Then to mix this color blend with the underlying fBm texture make Alpha 1 something like 30% and Alpha 2 50%. Finally, enable the Layer check box under the Affect tab to mix this layer with the underlying layer. You should end up with an image similar to the one shown on the left.

Step Five
Next we want to add some bumps to the canyon. Want we are after is rocky sides to the canyon with a stoney looking floor. The idea is to use an Altitude shader to blend from Dented bumps on the floor to MultiFractal bumps on the sides. The first thing to do is set up the another Altitude blend. The easiest way to do this is copy and paste the altitude blend used in step four. However, once copied, disable the Affect Layer check box, disable all of the colors, set Alpha 1 to 100% and Alpha 2 to 0%. We have now set up an alpha map based on the altitude. Next, add Dented followed by MultiFractal, both are IFW2_Noise shaders. For the Dented shader make the bump height positive and check the Material Layer check box found under the Bump tab. This tells the shader to control its application using the previous layer's alpha map, in our case the Altitude shader. You will also need to enable the Material Layer check box for the MultiFractal shader, also. The result can be seen on the left hand image.

Step Six
In order to pick up some of the detail on the canyon we are now going to add the Slope shader from IFW2_SpecialFX. What we want to achieve is a lightening on one surface side to simulate the accumulation of dust. So make Color 1 a dark brownish color and Color 2 a sandy color. Then disable the application of Color 1. As the default slope is a function that blends from surfaces at 90 degrees to the sky to surfaces that face to the sky. Play about with the settings to set up an angle for the slope the gives an accumulation of dust on the best side. You should end up with an image similar to the one shown on the left.

Step Seven
Now we want to add some greenery to upwards facing surfaces but only those higher up in the canyon. Again, we need to start with the Altitude shader. Set the colors up to be a blend from red to green and adjust the heights to give up a blend from the top to the bottom, just like the image shown on the left. To complete, set the Alpha 1 to 100%, Alpha 2 to 0% and disable all of the colors. This sets up an alpha map that can be used to control the application of the greenery.

Step Eight
The next bit is hard to explain. Basically, we want the alpha map created in step seven to control the application of another instance of Slope with in turn controls the application of a green Bozo texture (i.e. our greenery). This will mean that the green bozo texture will end up only being applied to surfaces pointing up at the top of the canyon. In this step we will only do the Slope bit. Now, remember that a material map is created with a alpha map material which in our case is the Altitude texture from step seven and two materials. We want the second material to be Slope so its function and alpha map can be passed on but we still need first material. As this does not modify the object in anyway anything can be used so add Linear from IFW2_Gradient. Make sure its Material Map Layer check box is enabled and that all its color, alpha and bump value are disabled. Then add Slope from IFW2_SpecialFX and check its Material Map Layer check box. Again you may want to set the color to red and green to check how its being applied, as per the image on the left. Finally, we want to pass this texture on as an alpha map so set Alpha 1 to 0% and Alpha 2 to 100% with Blend 1 at 0% and Blend 2 100%.

Step Nine
The last job to do is create a nice greenery kind of texture so add Bozo from IFW2_Noise and make a noisy green and dark green grass kind of texture. Then to make sure that the green stuff only appears on the top on slopes that point up check the Material Map Layer check box so that the Bozo texture uses the alpha map created in step eight. The final image is shown below:

And Finally
OK, so this might not be the greatest landscape of all time but hopefully it shows some of the principles involved in using Altitude and Slope for texturing landscapes. With any luck, someone with much better artist skills can use these techniques to shown just what can be done........Please let me know.

Home Order About Pricing Mail Home Home Back