Bump map: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 16: Line 16:
# The '''blue''' channel defines height (Z-axis)
# The '''blue''' channel defines height (Z-axis)
#:0 = deepest
#:0 = deepest
#:127 = maximum depth capable of receiving light
#:128 = maximum depth capable of receiving dynamic light (it's a bad idea to go under this)
#:255 = at the material's surface
#:255 = at the material's surface



Revision as of 06:29, 10 July 2008

A material's albedo (left) compared to its bump map.
The above material in-game.

A bump map is an RGB image that can be used to simulate a three-dimensional surface through a process known as normal mapping.

Each color channel in a bump map has a meaning:

  1. The red channel defines horizontal facing (X-axis)
    0 = left
    128 = forward (facing viewer)
    255 = right
  2. The green channel defines vertical facing (Y-axis)
    0 = up
    128 = forward (facing viewer)
    255 = down
  3. The blue channel defines height (Z-axis)
    0 = deepest
    128 = maximum depth capable of receiving dynamic light (it's a bad idea to go under this)
    255 = at the material's surface

The three channels between them allow the engine to calculate a normal vector for every pixel, allowing it to generate shadows and highlights on a two-dimensional surface.

A bump map is largely useless for really flat surfaces like smooth concrete or metal, but even rough concrete sometimes has enough depth to it to make one worthwhile.

See also

Template:Otherlang:en Template:Otherlang:en:jp