Terrain Development Guide
Chapter 3: Optional Terrain Development
Detail Textures
The appearance of textures can be greatly improved, especially at low altitude, through the use of detail textures.
Two types of detail textures can be used:


1. Bump Map Detail Textures
In this type of detail texture you are essentially adding a light-map to the texture tile in order to generate the appearance of a roughened surface. The example above is the result of such a map. The colors of the base texture tile are not changed, only darkened or lightened per the light-map placed on it.
Bump map detail textures are simple 256 color grey-scale images. When the map is overlaid on the base texture each pixel in the map produces a darkening or lightening process to occur on the pixel of the base texture. Pixel/color values greater than 128 (going towards white) cause the underlying texture pixel to lighten and values less than 128 (going towards black) cause that pixel to darken.
An example of a bump map is provided below:

Hint:
Good bump maps can come from natural textures (like photographs) or, as in the case of many graphic editors, they can be created artificially through software.
2. Color Maps
Instead of lightening/darkening the base texture, color maps alter the color of the underlying texture. In many cases, these maps essentially overwrite the original base texture. Color maps can be used to put small, high resolution textures onto a base texture. For example, the forest textures (see later) could have detailed leaves replace the existing lesser resolution textures.
An example of a color map type detail texture is shown below:

This kind of detail texture tends to be more difficult to apply.
To add detail textures to your terrain, first you need to assign a scale value (detail_scale) to the detail textures in the header block of each layer defined in the Terrain Descriptor File where you want them applied:
#####################
# Base Ecology #
#####################
[Layer 1]
map = ecology.map
scale = 0.25
detail_scale = 2
height = 0
blend = 1
num_textures = 92
Through detail_scale you are telling the terrain engine how you want the size of the detail texture to relate to the base texture they modify. In the example above, the terrain engine has been instructed that all the detail textures in the ecology layer will be half the length of the underlying base texture. This means that the terrain engine will fill each base texture that has a detail texture assigned to it with four copies of that detail texture. The figure below illustrates this point:

Meanwhile, a scale of 3 would replicate the detail texture within the base texture 9 times (3x3), a scale of 4 would replicate the detail texture 16 times (4x4). The larger the scale value, the smaller the features in the detail texture will appear. If you want a bump map to give the appearance of man-sized bumps in the terrain, use a value of 2. If you want that same bump map to give the appearance of gravel on a road, use a value of 20 instead. In most cases, the optimum value to use for scale is obtained through trial-and-error and can vary wildly based on desired appearance.
Detail textures are assigned in the same data block of the Terrain Descriptor File as the textures they will modify. A snippet of this is given as an example:
[Layer 1 Texture 10]
value = 86
texture = _ecology/grassland.tga
detail = _detail/detail_bumpy2.tga
rotation = 0
detail_rotation = 0
In this example, the base texture, grassland.tga, is to have a detail texture, detail_bumpy2.tga, applied to it each time it is drawn on the terrain.
Detail_rotation allows you to rotate the detail texture before it is applied.
|