Bump Mapping

Bump mapping is one of the key techniques when building realistic materials. It provides a quick and memory efficient way of adding fine detail to surfaces.

A traditional way to define a bump map is using a bitmap image to define the bumps: the brighter the color, the higher the bump. The major advantage of this approach is that the user can define the shape of bumps by drawing, which is intuitive. Disadvantages include high memory usage, finite resolution and the regular grid-like nature of the bumps.

Bumps can also be defined procedurally using VSL objects such as Noise or Wave. This method is suitable for representing various semi-regular real world surfaces, such as skin of a reptile, surface of a rock, waves on water, etc. Procedural bumps can have very high accuracy (= level of detail), and they do not require much computer memory.

Realsoft 3D provides two different solutions for bump mapping:

The first alternative is a general method and suitable for all kinds of bump mapping situations. Direct Bump normal modifications are more limited but are usually faster to compute. Both approaches are considered below in more detail.

Using the Bump height channel in a Surface geometry shader

This is the recommended bump mapping method because of its generality. The examples below show the structure of image based and procedural bump maps.

Image bump map

The Bump VSL object can be used for computing bump height values from a bitmap. The Texture object is not continuous enough for smooth bumps.

  • Select Cubic interpolation for smooth bumps, or apply Smooth filter for even greater smoothing.

  • The Compute height option should be set.

  • Use the += operation to add new bumps to previous ones (to change this go to the General tab).

  • Do not General/Normalize the bump height channel (see the General tab).

Example file: Materials/Image Maps/Bump Map

Procedural bump map

The image on the right shows a simple procedural bump map. The height of the bumps can be adjusted using the Amplitude control of the Noise object.

Example: Default material library/Wrinkled

Using the Bump normal channel in a Surface properties shader

Image bump map

The VSL structure of a typical image bump map is shown in the image.

Example file: tutorprojects/material/vsl/pixelbump

Procedural bump map

The VSL structure of a typical mathematical bump map is this:

Example file: tutorprojects/material/vsl/mathbump

Curve object bumps

The Derive object can be used to transform an arbitrary VSL object to a bump map suitable form. For example, one can draw the shape of bumps using the curve object.

The first VSL object in Surface properties shader is Operation/Modulo by 1. This object computes repeating sequence of 0..1 coordinates and hence creates tiling of the bump pattern. The Curve object needs not have Normalize or Transform to mat space set, because the Derive object does this. Bump height can be adjusted by modifying the vertical scale of the curve.

Bump map operates on two-dimensional surfaces, and therefore the third curve is unused. The first (red) curve controls bump height in the horizontal direction, the second (green) curve controls bumps vertically.

Objects such as Noise or Random do not require use of a Derive object, because Derive processed noise is just another noise field and the same applies to Random as well.

Example file: tutorprojects/material/vsl/curvebump

Bump map and shadows

An additional level of realism can be obtained by distorting the shadows on a bumped surface. The material presented here shows how to achieve this:

  • The Material initialization shader is used to initialize the variable defining the amount of shadow distortion.

  • Surface geometry computes the bump map in the usual manner.

A shadow on a bumpy surface

Example file: tutorprojects/material/vsl/bumpyshadows