Beginner’s Bump & Displacement Mapping (Revised)

November 26th, 2006

BlenderArt Magazine Issue #7Bump mapping and displacement mapping are two special techniques for making an object appear to have a rough or irregular surface.

What is bump mapping?
Bump mapping takes a grayscale image and reads the light and dark information to simulate an irregular surface. When you render an object with a bump-mapped material, lighter (whiter) areas of the map appear to be raised, and darker (blacker) areas appear to be lowered. Note that bump mapping does not modify the geometry, only the normals.

The bumps are a simulation created by perturbing face normals before the object is rendered. Therefore, bumps don’t appear on the silhouette of bump-mapped objects. Bump mapping is useful for adding detail to an object without increasing the poly count.

What is displacement mapping?
Displacement mapping is very similar to bump mapping, where a two dimensional image’s grayscale information is used to change the appearance of a three dimensional object. Lighter tones create raised bumps and darker tones create lowered indentations. Unlike bump mapping, which only affects the object’s texture, displacement maps affect the object’s geometry, forming bumps and indentations according to the displacement map’s properties. These deformed models are rendered exactly the same as without a displacement map, therefore casting shadows and acting the exact same as if you manually displaced the model in Edit mode. In order to create a smooth, realistic displacement effect, the mesh needs an extremely large amount of faces. This high resolution object can be very demanding to your computer’s resources, but if used correctly, the photo-realistic render will be worth it. As computers are becoming more and more powerful, displacement mapping may soon be able to render at speeds necessary for a reasonable game engine. However, the current technology does not meet the heavy processing requirement.

Regular TextureBump MapDisplacement Map

Before you start
Both techniques are very fast and easy to do in Blender, even if you are new to Blender’s texturing tools. Please note that displacement maps are not displayed in the 3D view port. Bump maps can display a basic preview with shading [Shift+Z] turned on.

Bump mapping in Blender
For this tutorial I will use one of Blender’s many generated textures, “Musgrave”. Feel free to pick another type, or even use your own image! Begin by loading Blender and creating a new object. I used the popular “Suzanne” (monkey) model for this demonstration. Next create a new material in the Material Shading Panel [F5], and add a new texture. Now switch to the Texturing Panel [F6], where we will create the bump map. From the “Texture Type” box, select “Musgrave”. I left the default settings alone, but you may choose to play around with them. You can also add a ramp-shader here if you are planning on adding unique colors to the texture.

Bump Settings

Next we need to configure the most important settings for the bump map. These controls are located back in the Material Shading Panel [F5] under the “Map To” tab. You may choose to disable the texture’s color (Col) when modifying your bump or displacement maps. This can sometimes give you a better idea of what’s going on with each setting.

To enable bump mapping, press the normal (Nor) button. You can adjust the bumpiness with the slider button labeled “Nor”.

Use bump maps when you want to take the smoothness off a surface, or to create an embossed look. Keep in mind, however, that the depth effect of a bump map is limited to the normal (Nor) slider.

Displacement mapping in Blender
The way you create a displacement map is very similar to the way you create a bump map. The only difference is that you must enable the displacement (Disp) button instead. You may mix the Nor effects with the Disp effects according to your desired result. The displacement slider creates smoother results because the vertices only move outward. This may be useful for creating a unique landscape, for example. The normal (Nor) slider creates a more jagged effect, which may be useful for creating a gravel like surface, for example. When using displacement maps, you will generally attain better results with a high resolution object. Typically you can increase the resolution of your object in Edit mode using the Subdivide tool. Please note that the displacement map tool does not subdivide your mesh for you, it only displaces it. Another way to increase your object’s resolution is to apply a Subsurf modifier. There are two methods for subsurfing your object- Catmull-Clark, for smoother results, or Simple Subdiv, for maintaining the objects structure. Each method can be very processor demanding, depending on how many polygons are created.

Displacement Map Settings

Conclusion
Overall, bump mapping and displacement mapping are very handy tools if you know how to use them. Maps that shade between white and black generally work better than maps with hard edges. I highly recommend playing around with the settings and rendering your results to help deepen your understanding of each effect, just remember to be patient when dealing with high resolution geometry.

Download Entire Magazine PDF Click here to download entire magazine issue in high quality PDF format (8.9mb)