From BlenderWiki

Jump to: navigation, search

Environment Maps

Mode: All Modes

Panel: Shading/Texture Context → Envmap

Hotkey: F6

Description

Environment maps take a render of the 3D scene and apply it to a texture, to use for faking reflections. If you want to achieve a very realistic result, raytraced reflections are a good solution. Environment Maps are another way to create reflective surfaces, but they are not so simple to set up.

So why should one use Environment Maps?

  • The main reason is probably that they can be much faster than raytracing reflections. In certain situations they need to be calculated only once, and may be reused like any ordinary texture. You may even modify the precalculated Environment Map in an image editor.
  • Environment maps can also be blurred and render even faster because the resolution can then be lowered. Blurring a reflection with the raytracer always adds to the render time, sometimes quite a lot.
  • Halos (a visualization type for particles) are not visible to raytraced reflections, so you need to setup environment maps to reflect them.
  • Keypoint strands (another visualization type for particles) are also not visible to raytraced reflections, so you need to setup environment maps to reflect them.

Just as we render the light that reaches the viewing plane using the camera to define a viewpoint, we can render the light that reaches the surface of an object (and hence, the light that might ultimately be reflected to the camera). Blender's environment mapping renders a cubic image map of the scene in the six cardinal directions from any point. When the six tiles of the image are mapped onto an object using the Refl input coordinates, they create the visual complexity that the eye expects to see from shiny reflections.

Note

It's useful to remember here that the true goal of this technique is believability, not accuracy. The eye doesn't need a physically accurate simulation of the light's travel; it just needs to be lulled into believing that the scene is real by seeing the complexity it expects. The most unbelievable thing about most rendered images is the sterility, not the inaccuracy.


Options

Reflecting plane EnvMap settings.
Important

For correct results, the mapping of an environment map texture must be set to 'Refl' (reflection co-ordinates) in the Map Input panel of the Material context.


Ob
Environment maps are created from the perspective of a specified object. The location of this object will determine how 'correct' the reflection looks, though different locations are needed for different reflecting surfaces. Usually, an Empty is used as this object.
  • For planar reflections, the object should be in a location mirrored from the camera, on the other side of the plane of reflection (see Examples). This is the most accurate usage of Environment maps.
  • For spherical reflections, the object should be in the center of the sphere. Generally, if the reflecting sphere's object center point is in the center of its vertices, you can just use the name of the actual sphere object as the Ob:
  • For irregular reflections, there's no hard and fast rule, you will probably need to experiment and hope that the inaccuracy doesn't matter.
Don't render layer
The layer to exclude from the environment map creation. Since environment maps work by rendering the scene from the location of the Ob: object, you will need to exclude the actual reflecting surface from the environment map, otherwise it will occlude other objects that should be reflected on the surface itself.
Eg. If you are rendering an environment map from the center of a sphere, all the environment map will show by default is the inside of the sphere. You will need to move the sphere to a separate layer, then exclude that layer from the environment map render, so that the environment map will show (and hence reflect) all the objects outside the sphere.


CubeRes
The resolution of the cubic environment map render. Higher resolutions will give a sharper texture (reflection), but will be slower to render.
Filter
The amount of blurring applied to the texture. Higher values will blur the environment map to fake blurry reflections.
Depth
The number of recursive environment map renders. If there are multiple reflecting objects using environment maps in the scene, some may appear solid, as they won't render each other's reflections. In order to show reflections within reflections, the environment maps need to be made multiple times, recursively, so that the effects of one environment map can be seen in another environment map. See Examples.
Clipsta/ClipEnd
The clipping boundaries of the virtual camera when rendering the environment map


Blender allows three types of environment maps, as you can see in Reflecting plane EnvMap settings.:

Static
The map is only calculated once during an animation or after loading a file.
Anim
The map is calculated each time a rendering takes place. This means moving Objects are displayed correctly in mirroring surfaces.
Load
When saved as an image file, environment maps can be loaded from disk. This option allows the fastest rendering with environment maps, and also gives the ability to modify or use the environment map in an external application.

When using planar reflections, if the camera is the only moving object and you have a reflecting plane, the Empty must move too and you must use Anim environment map. If the reflecting object is small and the Empty is in its center, the environment map can be Static, even if the object itself rotates since the Empty does not move. If, on the other hand, the Object translates the Empty should follow it and the environment map be of Anim type.


Free Data
Clears the currently rendered environment map from memory. This is useful to refresh a Static environment maps and you have changed things in your scene since the last time the environment map was rendered. Anim environment maps do this automatically on every render.
Save EnvMap
Saves the currently stored static environment map to disk as an image file. This can be loaded again with Load.
Free all EnvMaps
Does the same as Free Data, but with all environment maps in the scene. This is a useful shortcut when using recursive environment maps (when the Depth is greater than 0).
Note

EnvMap calculation can be disabled at a global level by the EnvMap Tog Button in the Render Panel of the Rendering Buttons.


Examples

In this example, an empty is used as the Ob: of the reflecting plane's environment map. It is located in the specular position of the camera with respect to the reflecting surface. (This is possible, strictly speaking, only for planar reflecting surfaces.) Ideally, the location of the empty would mirror the location of the camera across the plane of the polygon onto which it is being mapped.

Planar reflection example. 1: Camera, 2: Empty, 3: Reflecting Plane.
Sphere on a reflecting surface.

The following images show the effect of the Depth. The first render has depth set to 0. This means the environment map on the plane has rendered before the environment map of the sphere, so the sphere's reflection isn't shown. By raising the Depth, the environment map is rendered recursively, in order to get reflections of reflections.

Reflecting sphere on a reflecting surface.
Reflecting sphere on a reflecting surface with multiple reflections.

Limitations

Because environment maps are calculated from the exact location of the Ob:'s object center, and not from actual reflecting surface, they can often be inaccurate, especially with spheres. In the following image, the rectangular prism and the smaller spheres are touching the sides of the large reflecting sphere, but because the environment map is calculated from the center of the sphere, the surrounding objects look artificially far away.

Inaccurate spherical reflection, the coloured objects are artificially offset




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