Quick Reference: Baking Normals from a Bump Map

[box color=”gray”]Normals and Material Masking Series – Part 1 | Part 2 | Part 3[/box]

QR-Baking-Normals-from-Bump_Heading-Image

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.

QR-Baking-Normals-from-Bump_Bump-Normal-Example
Examples of a bump and normal map

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:

[list icon=”sign-in”]

  • 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.

[/list]

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).

QR-Baking-Normals-from-Bump_Cube-And-UVs
UV-Unwrapping the cube (click for larger view)

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.

QR-Baking-Normals-from-Bump_Cube-Bump-Map-wUVs
Bump map drawn in GIMP – the UV lines are not visible in the final bump map image (Click for larger view)

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.

QR-Baking-Normals-from-Bump_Material-And-Texture-Settings-BI
Material and texture settings for 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.

QR-Baking-Normals-from-Bump_Bake-Settings
The normal map bake and baking settings

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.

QR-Baking-Normals-from-Bump_Bump-and-Normal-Comparison
Comparison of the influences of a bump and normal map (Click for larger view)

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.

QR-Baking-Normals-from-Bump_Final-Box

Part 2: Using Normal Maps in BI and Cycles ->

Some textures used in creating models appearing in imagery on this post are from CGTextures.com, a most excellent source for photo textures.

3 thoughts on “Quick Reference: Baking Normals from a Bump Map

  1. Pingback: Material Masking in Cycles | theZEDLAB

  2. Thanks for these great tutorial. Plz try to put up a video on youtube..it will be great.and many viewer s will benefilt. As normal mapping is the most confusing topic..especially in blender

  3. Pingback: Texture Maps | James Coppola

Leave a Reply

Your email address will not be published. Required fields are marked *