Creating a Reflection/Environment Map
Reflection mapping, also called environment mapping, can be used to simulate an image reflected on an object’s material, but without needing to use raytracing (actual reflection). It can also be used to add an extra reflection to an object’s reflective, raytraced surface.
The illustration on the left shows an insect’s eyes with its reflection property activated: notice the flower’s reflection in the eyes — this is raytraced reflection.
The illustration on the right has a reflection map (clouds) in addition to the reflection property (flower). The reflection map reflects a defined shader (in this instance, clouds) or texture in the surface’s reflective areas.
Reflection Mapping with Raytraced vs. Non-Raytraced Reflections
You can define whether reflections are Raytracing Enabled or Environment Only from the surface shader’s property editor (choose Modify > Shader and click the Transparency/Reflection tab):
• Raytraced Reflections are slower to render because they actually compute reflections for everything around them.
• Non-Raytraced Reflection Maps are much faster to compute because they simulate the reflection of a specified texture or image, defined by an environment map shader, on the object’s surface.
When reflection mapping is used without raytracing, only the reflection map appears on the object’s surface; when used with raytracing, the map is combined with raytraced reflections.
Environment shaders are used mainly to create an environment that completely encompasses a scene. Environment shaders are unique because they don’t have to be applied to an object, but they still simulate a geometric object’s characteristics. They can be applied to a geometric object—a sphere surrounding a scene, for example—or to a scene’s render pass.
The most common use for an environment shader is to create a background that is visible from any camera angle at any distance and reflected on objects’ surfaces.
To create a background in a render pass
1. From an explorer, set the scope to Passes. All of your scene’s passes are listed. If you haven’t created any passes, only the Default Pass is available.
2. Select the pass (or default pass) for which you wish to apply the background, then click the pass icon to open the Pass property editor.
3. On the Environment Shaders tab, click Add to apply an environment shader to the selected pass’s shader stack.
4. From the browser, select an environment shader from the shader library. You can choose from:
- Cubic 6 maps up to six images in a cubic shape around the scene.
- Environment maps an image in a spherical, cubic, or cylindrical shape around the scene.
This shader can also be used to light a scene with a High Dynamic Range (HDR) image (see Using Environment Maps to Light a Scene).
5. Click OK when you have chosen a shader. It appears in the shader stack list.
To give the shader a texture to use as an environment, select the shader from the stack window and click Inspect. This opens the shader’s property editor.
Creating an Environment on an Object
Rather than create an environment that encompasses an entire scene, you can work on a smaller scale and create a specific environment for a single object. The object is usually reflective and is given its own environment map to speed up rendering.
To give an object an environment map
1. Select the objects to which you wish to apply an environment shader. Make sure that they have a material applied to them.
2. From the Render toolbar, choose Get > Shader > Environment to open a list of environment shaders you can use. Select one of the following:
Shader |
Function |
Environment Map |
Maps an image in a spherical, cubic, or cylindrical shape around the scene. This shader can also be used to light a scene with a High Dynamic Range (HDR) image (see Using Environment Maps to Light a Scene). |
Cubic |
Maps a single image or texture in a cubic shape around the scene. Less accurate than spherical but faster to render. |
Atmosphere |
Maps realistic planet atmospheres. |
Day |
Maps a day-like horizon environment, with a sun, clouds, and the ground. |
Night |
Maps a night-like horizon environment, with stars, a moon, and the ground. |
The shader is connected to the material node’s environment input.
For more information on a shader’s parameters,
refer to its help topic by clicking on the
in the property editor.
Using Environment Maps to Light a Scene
You can light your scenes with images using the Environment shader. Like other environment shaders, this one surrounds the scene with an image. However, this shader has a set of parameters that allow you to control the image’s contribution to final gathering and reflections.
Although you can use any image to light the scene this way, you will get the best results using a High Dynamic Range (HDR) image. That’s because HDR images contain a greater range of illumination than regular images, making them better able to simulate real-world lighting.
For more information about using HDR Images in XSI, see Using High Dynamic Range (HDR) Images.
To light a scene using an image
1. Apply an environment map to a render pass or the selected object(s) as described in Using Environment Map Shaders. Use the Environment shader.
2. When the Environment shader’s property editor opens, click the lock icon to keep it open as you continue working.
3. Open the Render Manager and click mental ray at the left. From the Final Gathering tab, activate Enable. Make sure to copy these settings to the Render Region options to preview final gathering in the render region.
4. From the Environment shader’s property editor, select an image clip to use as an environment map. Click the New button to create a new clip from file or from an existing image source.
|
When you use an HDR image as the environment map’s source, it will look strange in the property editor because HDR images are stored with a floating point bit depth, but are converted to 8-bit for display purposes. This results in artifacts in the displayed image that will not show up in the rendered image. |
5. From the Environment Mode list, choose the appropriate mode for mapping the image:
- Spherical maps the image spherically around the scene.
- Cylindrical maps the image cylindrically around the scene.
- Cubic Strip takes an image in which the faces of a cube are laid out horizontally, side by side, and maps it in a cubic shape around the scene.
- Cube Cross takes an image in which a cube has been unfolded to look like a cross and maps it in a cubic shape around the scene.
- Cube Cross Sideways is a cubic cross, but rotated 90 degrees.
6. Adjust the Background parameter to control the degree to which the image appears as the scene’s background.
7. Adjust the Reflections parameter to control the intensity of the reflected environment map. Higher values create brighter reflections.
8. Adjust the Image parameter to control the intensity of final gathering lighting.
9. Adjust the Transformation settings, if necessary, to transform the environment map image.
Creating an Image Based Lighting Render Pass
To speed up the process of lighting your scene with an image, you can use the Image Based Lighting render pass preset. Creating a new render pass using this preset automatically applies the Environment shader to the pass and enables final gathering in the render options. Of course, you can modify the pass to alter the image based lighting effect or limit the number of objects that it affects.
For more information about render passes and how to customize them, see Passes & Partitions in the Rendering guide.
To create an image-based lighting pass
1. From the Render toolbar, choose Pass > Edit > New Pass > Image Based Lighting.
2. When prompted, specify whether you want to use an existing image clip or create one from file.
- If you use an existing image clip, a dialog box appears containing a list from which you can select an image clip.
- If you create a new image clip, a browser opens in which you can select the file with which to create the clip.
Once you select an image clip, a new render pass, called HDRI by default, is created and set as the current pass. Its property editor and the Environment shader’s property editor open.
3. You can adjust the Environment shader settings (described previously) until you’re satisfied with the results.
4. When your pass is ready, adjust the Pass settings and render the pass by choosing Render > Render > Current Pass from the Render toolbar.
SOFTIMAGE|XSI v.6.01