How to create the illusion of depth using bump mapping

In computer graphics, bump mapping refers to adding details to a three-dimensional object (3D) without affecting its geometry, resulting in fewer polygons and speeding up the rendering process. This technique employs bump maps to give a three-dimensional object an illusion of depth by manipulating how light reflects off its surface.

Bump map

A bump map is a grayscale image that provides surface detail information and is applied to an image to simulate depth. The stored values indicate the detailed surface’s height relative to the image’s flat surface. Brighter areas on the map raise the detailed surface, while darker regions cause it to sink. This manipulation of surface normals based on the grayscale values creates the illusion of depth.

Implementation

There are several tools to create and edit bump maps, such as Photoshop 3D and Blender, but the basic procedure of each of the software is as follows:

  1. Obtaining the bump map: First, we need a bump map image to add the desired detail.

  2. Converting the flat image to 3D: Next, we map the base image to a 3D surface since modification of surface normals is required.

  3. Applying bump mapping: We perturb the surface normals of the 3D mesh using the bump map. The bump map values determine the displacement for each pixel, simulating surface details and depth.

  4. Adjusting the intensity: The effect of the bump mapping can be adjusted by changing the intensity of the bump map.

The following images highlight the above workflow.

Bump map
1 of 3

Working example

Here is the output after the bump mapping is applied. We can click and drag the sphere to inspect it and zoom in on the scene.

Tradeoffs

  • Because the original geometry of the object is not altered, this technique does not introduce a change in physical interactions such as deformation or collision.

  • This technique is limited to adding small perturbations to objects. For more significant perturbations, displacement mapping is employed, which requires manipulation of the actual geometry.

Alternative

Displacement mapping involves altering the geometry of a 3D object by displacing its vertices. It is more resource-intensive than bump mapping because it involves complex displacement calculations for each vertex and huge memory overhead to store high-resolution displacement maps.

Conclusion

Overall, bump mapping is a powerful technique that brings depth, texture, and realism to computer-generated imagery. However, it is advisable to consider the alternative approach of displacement mapping for large-scale depth effects.

Quiz

Test your understanding of bump mapping

Q

Which statement is true?

A)

Bump mapping entails a higher computational overhead than displacement mapping.

B)

Any amount of depth can be simulated by bump mapping.

C)

Bump mapping does not alter the geometry of the 3D object.

D)

Bump mapping is a deep-learning model to add depth to 3D objects.

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved