Terrain Texturing with Texture Splatting

The old way to do splatting was to assign a texture for each triangle/quad in the terrain and then let GPU create the fading between the different textures. The following link is to one of the most famous descriptions of such an technique:

http://cbloom.com/3d/techdocs/splatting.txt

The drawback with the method is that is uses fillrate a lot as each triangle is drawn multiple times to archive the fade. Therefore new methods with shaders or multitexturing is to prefer.

Many games uses nowadays alpha maps together with terrain textures to do splatting. The alpha map decides where the texture should be splatted to the terrain. For each texture that should be used on the terrain, one texture channel is needed for the alpha map. The size of this texture determines the quality/resolution of the transitions between different types of textures on the terrain. Below is and example of a such alpha map and how it looks like in a game.

To the left is the textures used, notice how low resolution they are allowed to have. To the right is one of the alpha maps (for the dark grass).  

Alpha Map Texture Splatting

Render of the terrain with splatting in jMonkeyEngine:

Splatting in jMonkeyEngine

In the following link is a comparision of using a single large texture to cover the whole terrain versus using splatting of a few small textures.

http://mikescodeblog.blogspot.com/2007/11/3d-landscape-rendering-with-texture.html 

The game Sid Meier’s Railroads uses a kind of splatting that is either vertex or quad based. Their maps consist of a single texture where each pixel in the texture has a colour that is connected to a specific terrain texture. This allows for a large amount of different textures for the terrain in the same map, but limits the type of fading between different textures.

Example of how a map could look like in RailRoads

Here’s a screenshot of how the maps in the game Supreme Commander are created. The game uses splatting and can only handle five different textures. One is the base texture and fills up where no other texture are. The rest of the four texturelayers requires alpha maps and they are saved in a single RGBA texture. The shot below shows how beautiful splatting can be when implemented correctly. The water is only height dependent and is therefore not splatted.

Alpha Map creation for Supreme Commander

The source of the image is the following tutorial of how to make maps for Supreme Commander:
http://supcom.wikia.com/wiki/Height-_/_Texturemaps_with_image_editing_tools

Be Sociable, Share!

One thought on “Terrain Texturing with Texture Splatting

Comments are closed.