Brief Overview of Bump and Normal Maps
Normal Maps and Bump Maps are textures used to fake detail on a 3D mesh using data from 2D images. A bump map uses a single channel image (grayscale) in which 50% gray represents the baseline surface of the face. Values toward white indicate raised features and values towards black indicate recessed features. A normal map is a kind of three dimensional bump map that uses the RGB channels of an image to represent perturbations in the X, Y and Z axes.
The most common way of generating a normal map is by “baking” it onto the UVs of a mesh. There are several ways of doing this. The most common are:
- Using the geometry of a high-poly detailed mesh to bake normals onto a lower-poly version (this technique is used extensively in video games.)
- Using Blender’s Multiresoultion modifier, which allows you to sculpt a subdivided version of a mesh while maintaining the lower-resolution base mesh, you can bake normals from the subdivided version onto the base mesh.
- Modeling separate objects just above the surface of another object, this geometry can be baked by projecting onto the underlying faces.
But there is another way to generate a normal map in Blender, by baking from a bump map.
Baking Normals from a Bump Map
In this example, I’ve simply added a Subdivision Surface modifier to a cube and added in some edge loops to sharpen the edges. I’ve then marked seams and UV unwrapped the cube, arranging the UVs so that the sides facing the camera are isolated and enlarged and those facing away are scaled down. In the UV/Image editor I’ve created a new image (at the bottom of the UV/Image Editor workspace: click New, an image options dialogue box will apear, name it and enter a size – I’ve used the default 1024×1024) and exported the UV Layout (at the bottom of the UV/Image editor workspace: UVs -> Export UV Layout).
With the UV Layout image as a guide in GIMP I created this bump map, using 50% gray as the background. When saving out the final bump map image, make sure the UV Layout is not visible.
Currently, texture baking can only be done in the Blender Internal render engine. The texture generated, however, can be used in either BI or Cycles (or any other rendering engine, provided normal maps are interpreted the same way – some renderers may apply the coordinates differently.) To create the normal map, first add a material to the cube (the material settings are not important for this task.) Then add a texture, set to “Image or Movie” and open the bump map texture. Make sure the mapping is set to UV and the influence is set to Normal with a value of 1. Also, under Bump Mapping Method select Best Quality. Note: if you are baking normals from a bump map derived from a photographic texture, changine the Bump Mapping Method will alter the level/frequency of detail baked into the normal map from the bump map.
Next, under the render panel there is an area labeled Bake. Set the Bake Mode to “Normals” and hit Bake. (The other bake settings are the defaults.) As long as the bump map texture is active on the cube material this will bake a normal map based on the influence of the bump map. Note: make sure the cube is selected and there is an image active for the UVs (this was done before exporting the UV Layout). Otherwise you will get an error. Once it bakes, you can save out the normal map from the UV/Image Editor.
So, why go to all this trouble to create a normal map? A normal map will inherently shade and respond to lighting better than a bump map, simply because it uses more data and alters the surface normal on all three axes. (Although, sometimes a bump map is more appropriate.) Below is an example of two cubes, with a simple metal texture, rendered in Cycles. One has just the bump map applied and the other just the normal map. You can see the details look deeper and cripser with the normal map, though you may not want such heavy effects – in which case you can use the bump. By baking the normal map, you add to your options and, in most cases, can get better results than bump mapping alone.
In Part 2 of this series, I will cover how to properly use normal maps in both Blender Internal and Cycles. Part 3 will cover material masking, a technique I used to achieve this final result.
Some textures used in creating models appearing in imagery on this post are from CGTextures.com, a most excellent source for photo textures.