From BlenderWiki

Jump to: navigation, search

Bump and Normal Maps

Mode: All Modes

Panel: Shading/Texture Context → Image

Hotkey: F6

Description

In CGI, bump maps can be applied to 3D models and thus serve to alter surface appearances. This can alter light interactions with scene objects.

  • While bump maps can simulate topology such as surface bumps and ripples, it does not change the 3D geometry.

Normal Maps and Bump Maps both serve the same purpose: they simulate the impression of a detailed 3D surface, by modifying the shading as if the surface had lots of small angles, rather than being completely flat. Because it's just modifying the shading of each pixel, this will not cast any shadows and will not obstruct other objects. If the camera angle is too flat to the surface, you will notice that the surface is not really shaped.

Both bump maps and normal maps work by modifying the normal angle (the direction pointing perpendicular from a face), which influences how a pixel is shaded. Although the terms normal map and bump map are often used synonymously, there are certain differences.

Bump maps
These are textures that store an intensity, the relative height of pixels from the viewpoint of the camera. The pixels seem to be moved by the required distance in the direction of the face normals. (The "bump" consists only of a displacement, which takes place along the existing, and unchanged, normal-vector of the face.) You may either use greyscale pictures or the intensity values of a RGB-Texture (including images).
Normal maps
These are images that store a direction, the direction of normals directly in the RGB values of an image. They are much more accurate, as rather than only simulating the pixel being away from the face along a line, they can simulate that pixel being moved at any direction, in an arbitrary way. The drawbacks to normal maps are that unlike bump maps, which can easily be painted by hand, normal maps usually have to be generated in some way, often from higher resolution geometry than the geometry you're applying the map to.
Normal maps in Blender store a normal as follows:
  • Red maps from (0-255) to X (-1.0 - 1.0)
  • Green maps from (0-255) to Y (-1.0 - 1.0)
  • Blue maps from (0-255) to Z (0.0 - 1.0)
Since normals all point towards a viewer, negative Z-values are not stored (they would be invisible anyway). In Blender we store a full blue range, although some other implementations also map blue colors (128-255) to (0.0 - 1.0). The latter convention is used in "Doom 3" for example.

Workflow

The steps involved in making and using Bump and Normal Maps is:

  1. Model a highly detailed ("hi-poly") model
  2. Bake the Bump and/or Normal maps
  3. Make a low-poly, less detailed model
  4. Map the map to the low-poly model using a common coordinate system

Consult the Modeling section for how to model a highly detailed model using the Mesh tools. How much detail you put in is totally up to you. The more ridges and details (knobs, creases, protrusions) you put in, the more detailed your map will be.

Baking a map, simply put, is to take the detail of a high polygon mesh, and apply it to a similar object. The similar object is identical to the high-poly mesh except with less vertices. Use the Render Bake feature in Blender to accomplish this.

Modeling a low-poly using Blender's Mesh editing tools. In general, the same or similar faces should exist that reflect the model. For example, a highly detailed ear may have 1000 faces in the high-poly model. In the low-poly model, this may be replaced with a single plane, oriented in the same direction as the detailed ear mesh. (Tip: Blender's multi-resolution mesh modeling feature can be used to good effect here.)

Mapping is the process of applying a texture to the low-poly mesh. Consult the Textures Map To section for more information on applying a texture to a mesh's material. Special considerations for Bump and Normal Maps is:

  • When using a Bump map, map the texture to Nor and enable No RGB.
  • When using a Normal map, map the texture to Nor

The coordinate systems of the two objects must match. For example, if you bake using a UV map of the high-poly model, you must UV map the low poly model and line up its UV coordinates to match the outline of the high-poly image (see UV unwrapping to line up with the high-poly map edges.

Examples

To set up the scene, position an orthographic camera about 10 units from a monkey. UV unwrap the Monkey; in this example we did an easy Project from View (Bounds). Scale the camera so that the monkey fills the frame. Set your format resolution to 512x512 (square textures render faster in game engines, usually). No lights or anything else is required.

Use Render Bake to create a Normal map.

Composite noodle to make Bump Maps

Then, enable Do Composite and set up the compositing noodle shown to the right. This is your Bump Map. You make a bump map by using that same orthographic camera in the composite noodle shown. The front of the model is 9.2 units from the camera, and the visible parts are 1.3 units deep (1/1.3=0.77). If you save your image as a JPG, you will have 24-bit depth. If you save it as a half OpenEXR image, 16-bit depth; as a full OpenEXR image, 32-bit depth. Alternatively, you can use the ZUtilz Plugin, however, it only gives you an 8-bit depth and the resolution of the Bump Map may be too small for the relatively great range of Z-Values. Tip: The "MultiLayer" file-format comes in handy here, since it is OpenEXR-based but additionally can store several "layers" of related information in just one file. The floating-point numeric precision of these formats is very beneficial with normal-maps.)

Now we are going to look at some examples. First the render of "Suzanne" (Suzanne Render). The second picture shows Suzanne's Normal Map (made with Blender's Normal Baking system. The rightmost picture in the top row shows the Bump Map of Suzanne.

Both maps here are used as textures on a plane, first the Normal Map (Render of the Normal Map), then the Bump Map (Render of the Bump Map). In both cases the camera stayed in the same position in which the Maps were made (perpendicular to the plane).

Suzanne Render
Normal Map of Suzanne
Bump Map of Suzanne
Side view render of the Normal Map applied to a plane
Side view render of a Normal Map made with an Ortho camera, applied to a plane. The same camera position as in the previous picture, less perspective distortion.
Render of the Normal Map applied to a plane, perpendicular to the surface.
Render of the Bump Map applied to a plane.

The Render of the Normal Map is only pseudo 3D. You can't look at the side of the head (Side view render).

If you use an Ortho camera to create the Normal Map, you will get less perspective distortion (Render with an Ortho camera).

Baking Options

The Render Bake panel

Render baking is hyperlinked here. In summary, there Blender supports normal map baking, amongst other bakeable things:

  • Tangent: Bakes a normal map that is independent of view, and is thus the best choice for animation.
  • Object: Bakes normals in the object's coordinates, and can be moved, but not deformed.
  • Camera: Bakes normals with the old method, meaning you cannot deform or move the object.
  • World: Bakes normals with coordinates, but object can't be moved or deformed.

Other options include:

  • Selected to active: This option will bake the selected mesh's normals

to the active mesh (e.g. the high poly mesh is the selected and is baked to the low-poly mesh which is the active).

  • Distance: A parameter that controls the max distance from one object to another.
  • Clear: Wipes the current image clear of any data.
  • Margin: The amount (in pixels) of which to extend the normal map.

Using And Creating Normal Maps

Normal Map Button in the Image Panel

Normal and Bump Maps are simple to use. Make sure you apply the Texture in the Material buttons Map To panel to Nor. The strength of the effect is controlled with the NumButton Nor on the same Panel.

If you want to use a Normal Map, you have to set the Normal Map button in the Image Panel in the Texture buttons F6 (Normal Map Button).

Since only the normals get affected during render, you will not get shadow or AO or other '3D' effects. It's still just a texture.

To bake normal maps is a different process, but simple.

1) Make a mesh.

2) Create a low polygon version of the object either by lowering the multires level (if you are using multires), by using a decimate modifier, or by just modeling the same mesh with less vertices. For simplicity, we'll say the low polygon object= mesh L and the high polygon object= mesh H.

3)To make this all work, mesh L needs to have a UV image. Assign seams and unwrap to a new image of the desired size (with UV test grid enabled).

You'll notice a new "32 bit float" option under the new image panel. This
The low-poly mesh unwrapped

option creates your image in 32 bits, which is useful when generating displacement maps. If saving the 32-bit image, it must be saved to a format supporting 32 bits, such as OpenEXR.


4)Before you bake the normal maps, both meshes must be in the exact same location, so mesh L must be moved back to mesh H's location with ALT + G.

5)If the "Selected to active" button is enabled (which it should), you will need to select first mesh H, and then mesh L.

6) Go to the "Scene" tab (F10) and then to the bake tab (next to "anim"). Select "Normals", and customize your options according to your needs. Then press the big shiny "Bake" button and watch your map appear in all it's glory.

The normal map after baking


7) Nope, you're not done yet. We still need to add the normal map as a texture. The next step is to go into the materials tab (F5) and apply a new texture. Select the type as "Image",

and select your normal map texture (hopefully you named it) with the arrows.
Image selected

8) Back in the main material panel under "Map Input", change the texture coordinates to UV. Under "Map To", check "Nor" and deselect "Col". Set the "Nor" value to 1 (Or a different value, depending on how strong you want it). You're done!





Introduction
What is Blender?
Introduction
Blender’s History
License
Blender’s Community
About this Manual
What's changed with Blender 2.4
Installing Blender
Introduction
Python
Installing on Windows
Installing on GNU/Linux
Installing on Mac
Installing on other Operating Systems
Configuring Blender
Directory Layout
Starting
The Interface
Introduction
Keyboard and Mouse
Window System
Arranging frames
Headers
Console window
Window Types
Screens (Workspace Layouts)
Scenes
Configuration
Modes
Contexts
Menus
Panels
Buttons and Controls
Internationalization
Your First Animation
1/2: A static Gingerbread Man
2/2: Animating the Gingerbread Man
The Vital Functions
Quick render
Undo and Redo
Default scene
Screenshots
Help!
Setting Preferences
Configuring Preferences
Interface
Editing
Themes
File
System
Interaction in 3D
Introduction
Introduction
Navigation
Introduction
3D View
3D View Options
3D View Usage
Camera View
Layers
Local or Global View
Sketch in 3D Space
Introduction to Grease Pencil
Drawing sketches
Layers and Animation
Converting sketches to geometry
Transformations
Introduction
Basics
- Grab/Move
- Rotate
- Scale
- Gestures
Advanced
- Mirror
- To Sphere
- Shear
- Warp
- Push/Pull
Transform Control
Introduction
Precision of Transformations
Numeric Transformations
Transform Properties
Reset Object Transforms
Manipulators
Transform Orientations
Axis Locking
Pivot Point
- Active object
- Individual Centers
- 3D Cursor
- Median Point
- Bounding Box Center
Snapping
Snap to Mesh
Proportional Edit
Data System and Files
Blender's Data System
Blender's Library and Data System
Blender's Datablocks
Scenes
Working with Scenes
The Outliner Window
Appending and Linking
File operations
Introduction
Opening blender files
Saving blender files
Modeling
Introduction
Introduction
Objects
Objects
Selecting Objects
Editing Objects
Groups and Parenting
Tracking
Duplication
- DupliVerts
- DupliFaces
- DupliGroup
- DupliFrames
Mesh Objects
Meshes
- Mesh Structures
- Mesh Primitives
Selecting
- Selectable Elements
- Selection Basics
- Advanced Selecting
- Selecting Edges
- Selecting Faces
Editing
Basic Editing
- Translation, Rotation, Scale
- Adding Elements
- Deleting Elements
- Creating Faces and Edges
- Mirror editing
Vertex Editing
Edge Editing
Face Editing
Deforming Tools
- Mirror
- Shrink/Fatten Along Normals
- Smooth
- Noise
Duplicating Tools
- Duplicate
- Extrude
- Extrude Dup
- Spin
- Spin Dup
- Screw
Subdividing Tools
- Subdivide
- Subdivide fractal
- Subdivide smooth
- Loop Subdivide
- Knife Subdivide
- Bevel
Miscellaneous Tools
Retopo Tool
Sculpt Mode
Multi Resolution Mesh
Vertex Groups
Weight Paint
Mesh Smoothing
Curve Objects
Curves
Selecting
Editing
Advanced Editing
Surface Objects
Surfaces
Selecting
Editing
Text Objects
Texts
Editing
Meta Objects
Metas
Editing
Empty Objects
Empties
Group Objects
Groups
Scripts
Modeling Scripts
Modifiers and Deformation
Introduction
Introduction
Modifiers Stack
Modify
UVProject
Generate
Array
Bevel
Booleans
Build
Decimate
EdgeSplit
Mask
Mirror
Subsurf
Deform
Armature
Cast
Curve
Displace
Hooks
Lattice
MeshDeform
Shrinkwrap
SimpleDeform
Smooth
Wave
Simulate
Cloth
Collision
Explode
Fluid
Particle Instance
Particle System
Soft Body
Lighting
Introduction
Introduction
Lights
Introduction
Light Properties
Light Attenuation
Light Textures
What Light Affects
Lights In Other Contexts
Shadows
Introduction
Shadow Properties
Raytraced Shadow Properties
Volumetric Lights
Introduction
Lamps
Introduction
Lamp Light
- Raytraced Shadows
Spot Light
- Raytraced Shadows
- Buffered Shadows
- Halos
Area Light
- Raytraced Shadows
Hemi Light
Sun Light
- Raytraced Shadows
- Sky & Atmosphere
Lighting Rigs
Radiosity
Introduction
Rendering
Baking
Scene Light
Ambient Light
Ambient Occlusion
Exposure
Exposure
Materials
Introduction
Introduction to Shading
Materials Introduction
Usage
Assigning a material
Material Preview
Material Options
Multiple Materials
Properties
Diffuse Shaders
Specular Shaders
Ambient Light Effect
Color Ramps
Raytraced Reflections
Raytraced Transparency
Subsurface Scattering (SSS)
Strands
Node Materials
Material Nodes
Nodes Editor
Node Controls
Nodes usage
Nodes Groups
Material Node Types
- Input Nodes
- Output
- Color
- Vector
- Convertor
- Dynamic
Vertex Paint
Using Vertex Paint
Halos
Halos
Textures
Introduction
Introduction
UV/Image Editor
Common Options
Texture Stack
Texture Types
Texture Types
Procedural Textures
Image Textures
Video Textures
Texture Nodes
- Nodes Editor
- Node Controls
- Nodes usage
- Nodes Groups
-- Textures Input Nodes
-- Textures Output Nodes
-- Textures Color Nodes
-- Textures Patterns Nodes
-- Textures Textures Nodes
-- Textures Convertor Nodes
-- Textures Distort Nodes
Texture Plugins
Texture Painting
Painting the Texture
- Projection Paint
Mapping
Mapping
Environment Maps
UV Unwrapping Explained
- Unwrapping a Mesh
- Managing the UV Layout
- Editing the UV Layout
- Applying an Image
Influence
Influence
- Material
-- Bump and Normal
-- Displacement
- Particles
- World
World and Ambient Effects
World
Introduction
World Background
Ambient Effects
Mist
Stars
Rigging
Introduction
Introduction to Rigging
Armatures
Armature Objects
Panels overview
Bones
Visualization
Structure
Selecting
Editing
- Bones
- Properties
- Sketching
- Templating
Skinning
Introduction
Linking Objects to Bones
Skinning to Objects’ Shapes
Retargeting
Posing
Introduction
Visualization
Editing Poses
Pose Library
Using Constraints
Inverse Kinematics
Constraints
Introduction
Introduction
Constraints Common Interface
Constraints’ Stack
Transform Constraints
Copy Location
Copy Rotation
Copy Scale
Limit Distance
Limit Location
Limit Rotation
Limit Scale
Transformation
Tracking Constraints
Clamp To
IK Solver
Locked Track
Stretch To
Track To
Relationship Constraints
Action
Child Of
Floor
Follow Path
Null
Rigid Body Joint
Script
Shrinkwrap
Animation
Introduction
Introduction
The Timeline
Markers
3D Views
Animation Editors
Animation Editors
Ipo Editor
Ipo Curves and Keyframes
Ipo Datablocks
Ipo Types
Ipo Editor Interface
Editing
- Ipo Curves
- Keyframes
Ipo Drivers
Action Editor
Editing Action Channels
NLA Editor
Editing NLA Strips
Strip Modifiers
Animation Techniques
Introduction
Animating Objects
- Using Constraints
- Moving Objects on a Path
Animating Shapes
- Shape Keys
- Editing Shape Keys
- Animating Shape Keys
- Shape Keys Examples
Indirect Shape Animation
Animating Armatures
- Stride
Animating Lamps
Animating Cameras
Animating Materials
Animating Textures
Animating World
Physical Simulation
Introduction
Introduction
Dynamics
Force Fields
Collisions
Particles
Particles
Types
Physics
- Newtonian
- Keyed
- Boids
Visualization
Controlling Emission, Interaction and Time
Cache & Bake
Hair
Children
Vertex Groups
Particle Mode
Soft Body
Introduction
Exterior Forces
Interior Forces
Collisions
Simple Examples
Combination with Armatures
Combination with Hair Particles
Reference
Cloth
Introduction
Fluids
Fluid
Using the Game Engine
Using the Game Engine
Rendering
Introduction
Introduction
Camera
The Camera
Perspective (Vanishing points)
Depth Of Field
Render
Displaying Renders
Basic Options
Antialiasing (Oversampling)
Rendering Animations
Panoramic
Render Baking
Using the Command Line
Output
Output
Video Output
Effects and Post Processing
Introduction
Render Layers
Render Passes
Edges & Toon
Stamp
Color Management & Exposure
Depth Of Field
Motion Blur
Render Performance
Rendering Performance
Distributed Rendering
External Render Engines
Introduction
YafRay
Compositing with nodes
Composite Nodes
Introduction
Nodes Editor
Node Controls
Nodes usage
Nodes Groups
Composite Node types
Composite Node types
Input Nodes
Output Nodes
Color Nodes
Vector Nodes
Filter Nodes
Convertor Nodes
Matte Nodes
Distortion Nodes
Editing Sequences
Introduction
Introduction
The sequencer
Usage
Sequencer Modes
Sequence Screen Layout
Effects
Built-in Effects
Plugin Effects
Audio
Audio Sequences
Extending Blender
Introduction
Introduction
Python Scripting
Python Scripting in Blender
Setting up Python
The Text Editor
A working example
References
Python Scripts
Script Catalog
Bundled Scripts
Plugins
Blender's Plugins System
Texture plugins specifications
Sequence plugins specifications
Game Engine
Introduction
Introduction
The Logic Editor
Usage
Game Properties
Sensors
Introduction
Sensor Types
Controllers
Introduction
Expressions
Actuators
Introduction
Action
Camera
CD
Constraint
Edit Object
Ipo
2D Filters
Game
Message
Motion
Parent
Property
Random
Scene
Shape Action
Sound
State
Visibility
Cameras
Cameras
Dome Camera
Physics
Physics Engine
Material Physics
Object Types
- Static
- No Collision
- Dynamic
- Rigid Body
- Soft Body
- Occluder
- Sensor
Python API
Bullet physics
VideoTexture
Various resources
List of Features
External resources
Game Engine Basics (BSoD Tutorial)
FAQ