Texture splatting demo

This demo was added to my demo collection in 2017 to celebrate the new demo page system, moving to a more convenient page editing solution.

Splatting (that is multitexturing with a blend map) is a special case of multi-texturing, where a special “map” texture is used to specify which texture should be used in each part of the object. The most straight-forward way to achieve this is to use the RGB channels, and up to three textures, but it is quite possible to handle more.

In this demo, I use the following RGB map:


which maps onto a small terrain like this:


which then controls the blending of three textures like this:


Note tha areas that are not pure R, G or B!

All demos in one archive, now updated to C++:


Old versions:

Basic version, using RGB:


Extended to 4 colors, using black:


Extended to 5 colors, using alpha:


Finally, the crazy 8 channel version - which has some problems at the edges which makes it harder to design with but it works under some limitations.


Updated 2022. Later, 2024, see above.

This page is maintained by Ingemar Ragnemalm.