Environment/Background Switcher (mental ray)

The Environment/Background Switcher map lets you use one map as a background and another as an environment map, to provide environmental reflections.

In typical usage, you use the Environment/Background Switcher as an Environment map. As the Background map you apply a background image, preferably using the Environment/Background Camera Map shader.

As the Environment/Reflections map, use an environment map. If you have a plain photograph of a chrome ball taken from a similar camera angle as the background, you can use Environment Probe / Chrome Ball shader for easy, automatic unwrapping, or, if you have a fully unwrapped environment-map image, use a Bitmap map in Spherical Environment mode.

For details, see the following procedure.

Note: While the Environment/Background Switcher is most commonly used as an environment map, it can be used in other places as well. It will use the Background result for anything that is seen directly by the camera, and the Environment/Reflection for anything seen indirectly, as in reflections, refractions, etc.

Procedure

To use the Environment/Background Switcher map:

    This procedure assumes you have two photographs: one of a background, and another an image of a mirror/chrome ball, both taken from roughly the same camera position. The photo of the chrome ball should be cropped so that it exactly touches the edges of the ball. The best result is obtained if at least the chrome ball photo is HDR, but good results can be achieved with a traditional, non-HDR phogograph.

    Note: This workflow applies to stills or video sequences with only slight camera movement. For any complex fly-around camera motion, the simple "auto-unwrapping" performed by the Environment Probe/Chrome Ball shader will not suffice.
  1. Open the Environment And Effects dialog to the Environment panel.
  2. On the Common Parameters rollout, click the Environment Map button. This opens the Material/Map Browser.
  3. From the browser list, choose Environment/Background Switcher.

    The Environment Map button label now shows the name of the map.

  4. Open the Material Editor.
  5. If you are using the Compact Material Editor, drag the Environment Map button to a sample sphere. If you are using the Slate Material Editor, drag the Environment Map button to the active View. Confirm the Instance choice.
  6. On the Environment/Background Switcher Parameters rollout, click the Background map button. From the Material/Map Browser, choose a map; Environment/Background Camera Map is the recommended choice.

    Choose a bitmap file for the background image.

  7. Return to the Environment/Background Switcher controls.
  8. Click the Environment/Reflections map button. From the Material/Map Browser, choose a map; Environment Probe / Chrome Ball is the recommended choice.

    This displays the map’s parameters rollout. Click the Map button (“Browse”) and choose a bitmap file for the background image. Ideally, the bitmap is an HDR photograph of a chrome or mirror ball taken from the camera perspective in the scene, but a non-HDR photo also works well.

    Or, if you have a fully unwrapped environment map photo, use it as a Bitmap map and, on the Coordinates rollout, choose Environ and set Mapping to Spherical Environment.

  9. Adjust the various maps’ parameters as necessary and then render the scene.

Interface

Background

Specifies the background color or map. The background shows up wherever it is not blocked by a foreground object, or transmitted by a transparent object.

Environment/Reflections

Specifies the environment color or map. This image or color shows up in reflective surfaces.