Mapping a soil on a vertical cliff
Basic texture mapping will exhibit stretching when a texture gets mapped onto a vertical cliff. This can be seen below:
Soil mapping uses a ground UV basis, so when the height difference becomes too high between two texels, the soil appears stretched. The steeper the slope the more the stretching artifacts. NDunes has two options to overcome these problems. These have been quickly reviewed in the Getting Started book in the Refining a terrain page. Let's detail them.
The first option we have is to turn on the lateral displacement mapping. When the vertical arrow is pressed in the soil bar of the landscape, the direction of the soil texture mapping is set to match the slope defined by the first level soil. The results are much better:
However, the stretching of the texture map is still visible, even if the result is more pleasant. We have another option that we can activate which is tri-planar texture mapping:
When activated, the texture gets mapped as if it were mapped on the faces of a cube. The consequence is that the texture stretching disappears. However, rounding artifacts can appear at cube edges, so when the vertically mapped face is at 45 degrees from the terrain axis system. But all together, the result is again one step more pleasant.
Note that lateral displacement can be used along with tiles to break texture patterns. However tri-planar mapping will not work with texture tiling.
Adding snow | Normal maps and normal bending |