Call of Duty: Texturing
- 1 Material
- 2 Color maps
- 3 Normal maps
- 4 Detail maps
- 5 Specular maps
- 6 Example
- 7 Supported image formats
- 8 See also
In older games, a single image qualified as a texture and all that was required was that you simply drop the corresponding image into a specific folder. The general concept is to use material which in turn use multiple images, each representing a different property of a surface. This makes texturing more work than it was in the past, but it also gives much more power and flexibility to the developers.
Color maps in COD represent the diffuse reflection and color of a surface. In other words they define the color and intensity of light reflected back when it strikes a surface.
The goal when creating a diffuse map is to draw a color map and darken areas where light would be absorbed. For instance, the cracks in a brick wall absorb more light than they reflect back.
The example to the right demonstrates this as the bricks themselves are a greyish value and the cracks between them almost black.
No surface reflects light back at the same intensity it's recieved. In that respect, it's a good idea to darken your diffuse maps appropriately. Generally, the smoother a surface is the less light is diffused and the brighter your diffuse map can be.
Color maps are added to material by use of the Asset Manager.
Normal maps define the slope or normals of a surface. In other words, they alter the direction a surface appears to be facing.
The normal for each pixel is defined by storing spacial X,Y,Z transformation data in the R,G,B channels. The example to the right demonstrates this.
There are two methods to create normal maps.
- Render a normal map from 3D geometry
- Convert a height map into a normal map
Normal bump maps are added to material by use of the Asset Manager.
See here if you want to get the source image back.
Detail maps are basically like normal maps, they can be used to give a texture a more realistic depth. They represent a material surface structure, like the rough surface irregularities of rust or stone.
Detail maps can be significant smaller than their corresponding color map. The tiling – how many times it should repeat in vertical and horizontal direction relative to the color map – can be set in Asset Manager (x scale and y scale).
Specular maps in CoD represent the specular intensity and color of highlights on a surface. In other words they define the "shinyness" and color of specular reflections.
A specular map in CoD is actually made up of two textures:
- Specular color map - the reflection color (RGB)
- Cosine power map - the reflection amount / glossiness (Grayscale)
Asset Manager merges both to a single IWI, indicated by an ampersand & in the name. The power map becomes an alpha channel and is merged together with the color map to a RGB+A texture.
The brighter the color map is, the more shine is applied to the final material.
The goal when creating a cosine map is to fill the image with a solid value to represent the general specularity of the surface and then darken areas where weathering would occur.
The example at right has a mistake; the face of a brick would recieve less wear and tear than the edges and should therefore be more specular. Note that the cracks themselves have little to no specularity at all.
Color applied to a specular color map tints the color of highlights. Bricks are made out of a sand like material and as such would reflect slightly variable tints. This too is present in the example to the right.
Specular maps are added to material shaders by use of the Asset Manager. Note that Asset Manager will reject DDS files as input, use 24bit TGA instead (24bit: RGB, 32bit: RBA+Alpha).
If you want to get both source images back, see here.
Bump maps can be modified into a good starting point for a specular map.
This comparison shows the differences of
- Color map,
- Specular color map and
- Cosine power map
using the example of CoD4's Golden Desert Eagles:
Supported image formats
The COD engine supports the following image formats:
Details on each format and it's quirks can be found by following the links above.
See the Asset Manager page for how to automatically compress all your assets for distribution.
DDS files, and their MIP Maps, can be edited.
If one is not using ATI's The Compressonator, local maps can be prepared for compression manually. Simply copy the red channel to the alpha channel. Then delete the old red channel (to save space). The advantage to interpriting local maps in this manner, we can presume, is due to the alpha channel's higher quality. In DXT5 each 4x4 (16) pixel block is encoded with 64 bits of RGB color data, and 64 bits of alpha data. Since a local map primarily consists of only 2 channels (horizontal, usually red, and vertical, usually green), we're effectively splitting the two channels evenly across the compression scheme.
General image editing applications
Seamless texture creation tools
- The Resynthesizer - GIMP Plugin
- Filter Forge - Photoshop Plugin
- Map Zone
- Texture Maker
Height and normal maps