Explanation of the system

My system uses a very standard technique called detail texturing. This technique works by "combining" the base texture (i.e. colormap) with a much higher resolution detail texture, which is tiled. The formula I decided to use for combining the two maps is simply base * detail * 2. There are others, but I found that this one is easiest to work with and gives the most pleasing results.

Here's an image that shows how the blending formula works:

The above formula only deals with two textures, so what appens at the boundaries? i.e. what happens between two different triangles with different textures? Here is how that's handled: Each vertex of the mesh is assigned a single detail texture. During the rendering process, triangles that have vertices with different detail textures are drawn first, using the base texture only. After that, each "layer" (group of triangles with the same detail texture) is rendered individually, with transparency. The transparency of each vertex is 100% if it uses the detail texture associated with the current layer, 0% otherwise. Triangles with all 3 vertices having a transparency of 0% are not rendered. The video card will automatically interpolate the vertex transparency smoothly across the triangle, creating a nice blending effect. Any seams in the blending are filled with the base layer which was rendered first.

Here's an illustration of the rendering process:

And here's what it looks like in action: