Bump Map Comparison: Dot Product VS Embossing
Copyright S. Fenney.
 This page gives a simple comparison of two commonly used bump mapping methods:
It tries to show that embossing, although a useful fallback position when no other hardware supported method is available, is significantly worse than the dot product technique with respect to the quality of the image.

These tests use a single 'bumpy' quadrilateral  which is illuminated with a single parallel light, that is subsequently is moved into various positions.


The Source "Height Map"

For both systems, the bumps are generated from the following height map....
 



 


This image was chosen because it has bumps of varying scale - both in height and width - and also contains both natural and synthetic 'bumps'. The light parts of the map are interpreted as high parts, and the dark as low. Note that this means that the 'pebbles' in this image will look 'different' in the final image.

The embossing method uses the height map almost directly, while with the dot product method, it is converted into a more convenient format.



 
"Perpendicular case"

Embossing (texture displacement 0 texels)

Dot Product (perpendicular)

The first comparison illustrates the case where the light is perpendicular to the surface. With the embossing method, a perpendicular light requires a zero displacement, which results in a complete absence of bumps, which is clearly incorrect. The edges of the bumps should still be visible, as shown in the dot product method.



 
"Off perpendicular"

Embossing (texture displacement 1,1 texels)

Dot Product
This situation produces acceptable results with the embossing method. I would guess that the software would have to detect the previous perpendicular case, and displace it anyway so that the bumps don't completely vanish. Note that although the small bumps look good, the wide bumps are virtually invisible. (Again please note that the light angle isn't 'matched' between the two methods. I didn't have time to mess about with it)



 
"Increasing light angle"

Embossing (texture displacement 2,2 texels)

Dot Product
The embossing method still looks 'ok'.



 
"Still greater light angle"

Embossing (texture displacement 4,4 texels)

Dot Product

At this point, the embossing method goes haywire - once the texture displacement gets greater than the width of the small bumps, we begin to get these double vision effects, although now we are at least beginning to see the larger bumps.



 
"Grazing light direction"

Embossing (texture displacement 8,8 texels)

Dot Product

This is an attempt to simulate the light approaching at a 'grazing' angle. The embossed version is awful, but the dot product method still works quite nicely.



Notes:
  1.  I haven't tried to exactly match the angles between the two methods, mainly because there is no real way to do this with displacement mapping anyway!

  2.  
  3. The embossed method will look about 1/2 as bright as the dot product method. I have considered the possibility of scaling up the result (assuming such a function was available on a graphics accelerator), but that would mean that some intensity levels would be clipped.

  4.  
  5. SGI recommend that the embossing displacement is limited to texel offsets that are in the range [-1.0, 1.0]. This does stop the double vision problems, but it does mean that large bumps are very difficult to see. It seems to me, that using a displacement of  (ax, ay) texels, where  a<1,  |x|<1, and |y|<1, will just produce a less intense version of an (x,y) displacement.

  6.  
  7. Embossing also requires two  texture evaluations per pixel vs. one for the dot product method.

  8.  
  9. The examples have been applied to a white polygon in order to make the bump mapping process obvious. In normal practice, the bump map would be used to shade a textured polygon.

  10.  
  11. I haven't proof read this very thoroughly, so please forgive any typos. (Thanks to Jezz and James Morrisey for pointing out a few.)
  12. If I get time, I'll do a version where the light direction/displacement is not constant across the entire quadrilateral.

Back to Home Page



Last Updated: 1tst Sept 2000