Game Development Reference
Color (Diffuse) Map
Diffuse & Normal Map
Diffuse Map Texture
Normal Map Texture
Fig 1.14 A soldier mesh with and
without a color map and normal map.
reflected off the surface of the artwork. When all of the light is reflected, we
see white. When none of the light is reflected, we see black. The resulting
color of a mixture of primaries is caused by some of the light being absorbed
by the pigment. This is called a subtractive color model, as the pigments
subtract some of the original light source before reflecting the remainder.
The light from a digital display follows an additive color model. The display
emits different colors by combining the primary sources of red, green, and blue
light. For this reason, color is represented in computer graphics as a three or
four numbered value in the format (red, green, blue, alpha). In some formats,
the alpha value is not used, making color a three value representation.
Alpha represents the transparency of a color. When a surface has a color
applied with an alpha of 0, it is fully transparent; when it has a value of 1 it is
totally opaque. A value of 0.5 makes it partially transparent. Values for red,
green, and blue also range between 0 and 1, where 0 indicates none of the
color and 1 all of the color. Imagine the values indicate a dial for each colored
lamp. When set to 0 the lamp is off and when set to 1 it is at full strength—any
values in between give partial brightness. For example, a color value of (1,0,0,1)
will give the color red. A color value of (1,1,0,1) will give the color yellow.
The easy way to look up values for a color is to use the color picker included
with most software including MS Word and Adobe Photoshop. The color
picker from Adobe Photoshop is shown in Figure 1.15 .