Terrain texturing: triplanar projection

Triplanar texture projection on the terrain system As promised, I now added some texturing to the terrain. Nothing much interesting here, but it looks quite better now. The texturing is pretty straight-forward though; texture repetition is visible, blending between textures is soft and doesn't use noise perturbation, etc. I'm now working on a proper integration of the terrain rendering shaders into the engine. I also need to make them suitable with the deferred renderer.

Smooth transition between grass and rock Rough transition between grass and rock

On the right you can see different texture blending transitions. The way to achieve this is pretty simple. Let weights be a two-dimensional vector where each of its component is the blending factor for respectively the grass and the rock. The sum of weights' components is always 1 so that the image is never lightened or darkened. Making the transition more rough simply consist of taking a power of weights (divided by weights.x + weights.y to keep it between 0 and 1).

There are more screenshots in the media page.

Posted by Yno on 2012-04-07 00:39