

Detail texture color matching

Add Comment! By David Rosen on December 16th, 2009

One common problem with detail textures is that they can change the overall color of the terrain. For example, let's say we have a patch of terrain that's supposed to be a light brown color like this:

If we simply apply the closest detail maps, we can change the color substantially. For example, here the closest matches are greenish or dark brown, giving us a patchy, saturated look that we don't want. This looks especially weird on the distant hills to the right:

Most games, including those using Unreal Engine 3 or Gamebryo, require the artists to compensate for this by carefully tweaking each detail texture to make sure it matches the target terrain color. Other games, such as Crysis, use desaturated detail textures so that they don't affect the terrain color. Here's the terrain using a greyscale texture:

The desaturated texture successfully preserves the original color, but loses a lot of the visual interest of the colorful detail textures. In Overgrowth, we have a third option: automatically tinting detail textures on a per-texel basis to match the detail textures to the terrain. We start by creating a 'tint map' by dividing the terrain color by the average detail map color. Below you can see the terrain color on the left, the average detail map color in the middle, and the tint map on the right.

To render the final terrain color, we just multiply the detail texture color with the tint map. Here we have the detail maps on the left, the tint map in the center, and the combination on the right. Note how the two detail textures now seamlessly combine!

Below is a comparison of the greyscale method on the left, and our tinting method on the right. I think our method retains both the intended look of the terrain as well as the visual interest of the detail texture.

I'm very happy with this technique because it saves development time while also looking better! Can you think of any other ways we can make the detail textures fit together better? Also, can you think of any other applications for this technique?