Blender 3D: Noob to Pro/Bump Mapping

Bump Maps are textures that store the relative height of pixels from the viewpoint of the camera. The pixels seem to be moved in the direction of the facenormals, either in direction to or away from the camera. You may either use greyscale pictures or the intensity values of an RGB-Texture (including images).

Image 1a: A texture grid for bump mapping.
Image 1c: The texture grid applied to a sphere and to a plane.

Bump Maps are easy to apply. They work well on flat surfaces, only to some extent on curved surfaces. On curved surfaces it is more easily noticeable that you don't create real 3D structures. The visible effect depends on factors like lighting, specularity of your material, camera angle, distance and so forth.

Bump maps should contain hard transitions between black and white. A gray wedge (e.g. a linear blend texture) would be hardly visible in the rendering.

Creating Bump Maps

You can easily create Bump Maps with Blender yourself, this is especially useful if you have modeled some small details on a surface and you realize at the end that your scene will get too complex. You could also use the Bump Maps in a 2D application like Gimp or other, similar programs.

I will create an animated bump map in highest possible quality, it is not always necessary to make such an effort. The goal is to create a wave effect and make an image sequence of it, to be used as a bump map. The original object has 600.000 vertices, the object the map is applied to has 8 vertices.

Setting up the scene

The plane should now fit exactly into the camera view.

We're going to use the Z-Buffer information to create the bump texture. The Z-Buffer contains the distance from the camera, this is exactly what a bump map is. To render the Z-Buffer information as an image, we're going to use Composite nodes. To get the highest possible quality, we will use Open EXR as file format, this allows us to store the Z-Buffer information with a numerical accuracy of 32-Bit floating point, instead of a meager 8-Bit value.

Render settings

Node editor

Now the setup for the composite nodes.

A Render Layer and a Composite node will be inserted automatically.

If you render now the image is plain white, we have to talk a bit about the Map Value node. The Offs value is the distance from the camera where the Z-Buffer should start (in negative BU). It is not to important to get the best range, because we use OpenEXR, but if you would like to use PNG instead, you have to select this value carefully.

Applying the animated bump map

Image 3a: The Bump Map applied Video.

This is it. Pretty much the same look as with the real deformation, but using much less resources.

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.