How Bump Mapping Works Print E-mail
Written by Tuan "Solace" Nguyen
Saturday, June 10, 2000
Article Index
How Bump Mapping Works
Limitations
Advantages of EMBM
Per Pixel Shading
 

  Advantages of EMBM

The advantages of Environment Mapped Bump Mapping as supported by DirectX 6 and the Matrox G400 are presented in more detail in table 1. Highlights listed in the table include:

-- Environment Mapped Bump Mapping can accommodate multiple light sources in one pass, and reflective environment mapping on the same bump, because all of these additions become part of the environment that is being mapped on the bump.

-- In addition, the bump map does not have to change from frame to frame. Unlike the multi-pass alpha technique, Environment Mapped Bump Mapping is per pixel rather than per polygon. This technique is non-restrictive and therefore is much easier for developers to implement.

-- Environment Mapped Bump Mapping can also be used to simulate animated bumps such as reflective waves on a water surface, as shown in figure 8. When running this scene, the waves move with exceptional fluidity and realism. Surprisingly, this frame contains only four triangles, and yet the movement of the waves is as smooth as video. This effect is obtained by perturbing or distorting the environment, using a dynamic or animated bump map while applying it to the texture.

The effect in the following image is produced using a procedural approach to bump mapping. The water texture is created procedurally using a dynamic bump map (wave effect) along with the reflective environment (the texture for the mountain). There is no pre-assigned texture for the water in this case. In other words, bump mapping can be applied to a procedurally-created texture for a wide range of compelling effects.



The above image illustrates a texture map (left image) and the actual bump map (right image).



Multi-pass Alpha (Emboss) Environment Mapped Bump Mapping
Multi-pass alpha is limited to only simulating bumps on textured 3D objects. Procedural bump mapping or environmental bump mapping cannot be simulated. Environment Mapped Bump Mapping can simulate static, dynamic and procedural bump mapping. Furthermore, these bumps can be applied to textured 3D objects or whole environments.
Multi-pass alpha cannot be used for distortion effects on the environment as this technique cannot use an environment map. Therefore, effects such as waves and turbulence cannot be simulated. Since Environment Mapped Bump Mapping uses an environment map, it can use the bump map to simulate distortion effects on the environment. Figure 8 shows one example of how this can be used to simulate waves with full reflection effects. The type of effects that can be simulated with Environment Mapped Bump Mapping are limited only by the creativity and imagination of the developer as this technique offers enough flexibility to be used in numerous ways.
Since different hardware supports different techniques for multi-pass alpha, results will vary significantly depending on the hardware. Images will likely look different from what the application developer intended. Since this feature is part of a standard API, the resulting images will always look similar to what the application developer intended on all supporting hardware. The only differences will result from how well the feature is implemented (quality).
Since different hardware supports different techniques for multi-pass alpha, the application developer needs to support and/or tweak for all these different techniques. This includes tweaking of both artwork and code-path for all cases. Application developers program bumps using the standard DirectX 6 calls, independent of hardware.
Range of bumps is restricted due to hardware limitations (e.g. some hardware does not support subtraction). Range of bumps is largely unlimited.
UV shifts that simulate the bump are calculated on a per-vertex basis; therefore, the height/depth of the bump can vary only linearly over the triangle surface. Bumps are calculated on a per-pixel basis. Therefore, the height/depth of the bump can vary over a triangle and thereby result in a more realistic image.
The CPU calculates UV shifts. Therefore, multi-pass alpha is CPU dependent. All the per-pixel calculations are done on the graphics hardware.
For the multi-pass alpha technique to look acceptable, the UV shifts would have to be done on many points on the surface to approximate the right shift (direction of shadow) that a light would cast from each specified position. For this to happen, the models would have to have a lot of vertices, thereby increasing the complexity of the artwork and geometry, and reducing performance. Since the bump map is applied to the surface on a perpixel basis, the technique looks good regardless of the number of vertices. Furthermore, each calculation is done in hardware so the load on the CPU is minimal
The technique breaks down quickly when the light hits a vertex from a wide angle. This is because the UVs can be shifted only so much without disrupting the illusion (figure 6). Since Environment Mapped Bump Mapping does not use shifts to simulate bumps, there are no such limitations.
Since shifts are calculated based on the relation of the light source to the target surface, the bump illusion would not be visible if the light source was perpendicular to the surface (the UV shift would be 0). Environment Mapped Bump Mapping does not rely on shifts and therefore, there is no such limitation.
Multi-pass alpha uses diffuse lighting only Specular lighting effects are available with Environment Mapped Bump Mapping.
With the multi-pass alpha technique, only one light source can be supported. Furthermore, this source must be monochrome. To accommodate additional light sources, extra passes per light source are required. Environment Mapped Bumped Mapping uses an environment map to calculate the bump. This environment map can contain multiple light sources without requiring any additional passes. Furthermore, the light sources can be polychromatic.

Here are some screenshots of images rendered by Matrox's G400 Max card contrasting EMBM off and on.

EMBM Off:


EMBM On:


Click on the following images for a full scale version: