Tech Art Tips & Tricks: All About Displacement, Height, Normal & Bump Maps

What are the differences between bump maps, displacement maps, height maps and normal maps and when to use them?

They are different ways used to add detail to a model. It is important to understand their strengths and weaknesses, in order to choose the right type of map that best fits the needs of the scenario you find yourself dealing with. Usually, it is best to utilise displacement or height maps for the big changes to the geometry and then the normal or bump for the fine detail.

A bump map displaces a surface normal (up or down) relative to the surface normal based on the greyscale value of the texture (0 – 1). It is the simplest option to add dimension to a model and renders faster than a normal map in some cases but yields the least realistic effects. Great for fine details such as pores, cloth, surfaces that don’t want to look 100% smooth.

Hard dirt ground enhanced through use of bump maps

A normal map replace the normal direction w a vector stored in RGB colors (XYZ). It actually changes the surface normal and bend the light. Widely used in low poly games. Offers superior shading and faster rendering than bump maps. Allows for transferring detail from a high-resolution mesh to a low-resolution version of the same model.

Rather than pulling out a bump or pushing in depression, the colors of the normal map change the xyz of the normal based on the RGB color of the map.
When viewed as a 2D texture, object normal maps have a psychedelic rainbow colour. these colours tell the engine how the normal on the surface of the geometry should be bent at render time.

Low and High Bumpiness settings when importing a height map as a normal map, and the resulting effect on the model.
3d graphic of a gatling gun enhanced by using normal map

A height map (or parallax map) is a greyscale texture that stores height data for an object, with white areas representing the high areas of your texture and black representing the low areas. Each pixel stores the height difference perpendicular to the face that pixel represents.

Parallax height mapping is usually used in conjunction with normal maps to give extra definition to surfaces. It is similar to normal mapping but more complex and more expensive – the normal map uses lighting to make something look taller as an illusion while the height map uses parallaxing.

While normal mapping modifies the lighting across the surface of the texture, parallax height mapping goes a step further and actually shifts the areas of the visible surface texture around so some parts seem to have greater height than others, to achieve a surface-level occlusion effect. This means that apparent bumps will have their near side (facing the camera) expanded and exaggerated, and their far side (facing away from the camera) will be reduced and seem to be occluded from view.
The heightmap is often a good image to use for the occlusion map (but not always!).

An albedo colour map, and a heightmap to match.

A displacement map is a greyscale texture that physically alter the real geometry at render time, rather than just perturb the normal of the surface like a bump map. Since the surface is actually modified, the silhouette reflects the additional geometry, unlike the normal and bump maps. It is mostly used on objects that need high level detail as the render time tends to be significantly longer compared to bump and normal maps.

Important to weight the expense against the benefits: In order for detail to be created based on a displacement map, usually the mesh must be subdivided or tessellated so real geometry is created. While a 8-bit displacement map may look good in 2D space, when brought into 3D they can sometimes cause banding or other artifacts as a result of the insufficient range in value – you will almost always experience better results by using a 16- or 32-bit displacement map. Creating additional geometry in real time can be computationally heavy. Because of this, most 3D applications calculate final displacement results at render time.

Bump Mapping vs Displacement Mapping

Displacement maps can be used with NURBS, polygon and subdivision surfaces.

Displacement maps are more tricky to use than normal maps and bump maps but the results are often worth the time invested.

Digital sculpting programs like ZBrush and Mudbox enables technical artists to bring a high level of realism and detail to digital characters. The detail created in these high-density meshes is often brought into Maya in the form of displacement maps or normal maps.

What can displacement maps be used for?

  • Creating details on creatures
  • Creating animated displacements to simulate: rolling waves on an ocean surface, fissures opening in the earth, and veins crawling beneath the skin, etc.

What can vector displacement maps be used for?

Vector displacement maps use height and direction to offset geometry. This allows for complex detail, like undercut and overhangs, to be reproduced on low-resolution geometry.

Above is the sculpted mushroom, rendered with a vector displacement maps and a “traditional” displacement map

Why is it difficult for an artist to paint a normal map?
The rgb values are not intuitively applied.

What are the 2 main types of normal maps?

  1. Object space maps: used for nondeforming objects (available after maya 2008).
    examples: such as walls, spaceships, trashcans.
    calculated based on the local object space of the object. up in object space means toward the top of the object. if the object is rotated upside down in world space, the top is still the top – a robot’s head is still the top of the object in object space even if it’s hanging upside down.
  2. Tangent space maps: used for deforming objects but work well for nondeforming objects too.
    examples: characters.
    tangent space maps record the normal’s vector relative to the object’s surface. in tangent space, up means up away from the surface of the object. tangent space maps appear more blue and purple since the direction in which the normal is being bent is always relaitive to the surface along the tangent space z-axis. the z-axis corresponds with the blue channel (xyz = rgb). object space maps have more vatiation in color.
    in practice, most artists used tangent space maps for everything.
Image result for tangent space map object space map

What is the most common way to create a normal map?
Use a high-resolution, detailed version of the model as the source of the normal map, and a low-resolution version of the model as the target for the normal map.
The difference between the two surfaces is recorded in the colours of the map, which is then used to alter the appearance of the low-resolution model.
This is a typical process when creating models for games where the real time rendering engine requires low-resolution models but demands realisitcally detailed objects.

Why does normal maps have bluey-purple colours?

The RGB colour values are used to store the X,Y,Z direction of the vector, with Z being “up” (contrary to Unity’s usual convention of using Y as “up”). The values in the texture are treated as having been halved, with 0.5 added. This allows vectors of all directions to be stored.

Therefore to convert an RGB colour to a vector direction, you must multiply by two, then subtract 1. For example, an RGB value of (0.5, 0.5, 1) or #8080FF in hex results in a vector of (0,0,1) which is “up” for the purposes of normal-mapping – and represents no change to the surface of the model.

A normal map using only #8080FF translates to a normal vector of 0,0,1 or “straight up”. This applies no modification to the surface normal of the polygon, and produces no change to the lighting. Any pixels which are different to this colour results in a vectors that point in a different direction – which therefore modify the angle that is used to calculate light bounce at that point.

A normal map using only #8080FF, which translates to a normal vector of 0,0,1 or straight up. This applies no modification to the surface normal of the polygon, and therefore produces no change to the lighting. Any pixels which are different to this colour results in a vectors that point in a different direction - which therefore modify the angle that is used to calculate light bounce at that point.

A value of (0.43, 0.91, 0.80) gives a vector of (–0.14, 0.82, 0.6), which is quite a steep modification to the surface. Colours like this can be seen in the bright cyan areas of the stone wall normal map at the top of some of the stone edges. The result is that these edges catch the light at a very different angle to the flatter faces of the stones. The bright cyan areas in the normal map for these stones show a steep modification to the polygon’s surface normals at the top edge of each stone, causing them to catch the light at the correct angle.

The bright cyan areas in the normalmap for these stones show a steep modification to the polygons surface normals at the top edge of each stone, causing them to catch the light at the correct angle.

How to create normal maps. displacement maps, height maps and bump maps?
Displacement maps and bump maps can be baked from a high resolution model or painted by hand.

In Maya: Use the Transfer Maps Tool.

Generating a workable displacement map using Maya’s Transfer Maps Tool takes a little more work than third-party applications, and the Transfer Maps tool generally falls short of third-party product’s precision: establish the proper displacement height through trial and error. The low-resolution geometry needs to be smoothed to avoid low-resolution shading.

The best way to generate a vector displacement map is to use a digital sculpting program such as ZBrush or Mudbox – this is the workflow of choice for many game studios. The maps must be generated as 32-bit floating-point maps in the TIF or EXR file format. Mental Ray’s Approximation Editor can be used in conjunction with a vector displacement map to reproduce sculpted details in Maya.

Heightmaps can be created in Substance or Houdini using terrain noises, hand painting or from real world data.

There are some software packages which can analyse the lighting in a regular photographic texture, and extract a normal map from it, such as Substance Bitmap2Material. This works by assuming the original texture is lit from a constant direction, and the light and dark areas are analysed and assumed to correspond with angled surfaces. However, when actually using a bump map, you need to make sure that your Albedo texture does not have lighting from any particular direction in the image – ideally it should represent the colours of the surface with no lighting at all – because the lighting information will be calculated by Unity according to the light direction, surface angle and bump map information.

What is the best format to use for transferring displacement maps?

The native IFF format in Maya is the best format. EXR is not a good format to use to transfer the maps.

How to achieve the best visual results for displacement maps in Maya Mental Ray?

The best results are usually achieved by rendering displacement maps on a polygon surface in mental ray, using mental ray’s Approximation Editor to subdivide the surface appropriately during render.

Troubleshooting Visual Issues

Why are textures created in ZBrush upside down when first imported into Maya?

They must be flipped. This is because ZBrush interprets dark and light values in a different way than Maya: need to make sure the value for the texture’s Alpha Offset is -0.5 times the Alpha Gain setting, this ensures the dark values on the displacement map push inward and lighter areas push outward.

What if objects look bloated or distorted when using ZBrush displacement maps?

Double check the Alpha Gain and Alpha Offset settings for the file texture used for the displacement. Make sure Alpha Is Luminance is checked.

Texture Creation Software

  • ZBrush
  • Mudbox
  • Maya
  • Substance Designer
  • Substance Painter
  • Substance B2M
  • Houdini
  • Mari