Environment/Background Camera Map (mental ray)
 
 
 
Command entry: Material Editor Material/Map Browser Maps mental ray Environment/Background Camera Map

This shader is similar in function to using a Bitmap map with environment mapping set to Screen as an Environment Map. However, Screen mapping simply chooses a pixel from the map based on the coordinates of the currently rendered pixel. This does not work well with reflections.

In contrast, the Environment/Background Camera Map shader correctly renders “back transformation.'' In other words, for a point seen in a reflection, it takes the reflected point’s 3D coordinate, convert it to its matching onscreen position (if any), and looks up the map based on this new 2D location (or returns a special value if the point is offscreen).

Back Transformation

In the following discussion of back transformation in the context of the Environment/Background Camera Map, refer to this illustration:

Imagine the green ray coming from the camera hitting the screen (blue rectangle) at the green "+". Using the Bitmap map set to Screen environment mapping mode as the Environment Map, the background-image location corresponding to this screen coordinate will be used for anything that happens to this ray. Even when it hits the teapot and bounces to the floor (green dot), this would be still be textured with the texture background pixel from the green "+" location.

In contrast, the Environment/Background Camera Map shader would transform the point (green dot) to a new screen coordinate (imaginary red ray) and use the value from the red "+" instead.

The yellow ray, however, hits the reflective object at some other location, and its reflected location (yellow dot) is outside the screen. For these cases, the shader would use its Off-screen settings.

Interface

Map

Click the Browse button to specify a bitmap file containing the background image. Alternatively, click the map button to specify a procedural map.

Multiplier

A multiplier for the background image.

Reverse Gamma Correction

Applies inverse gamma correction to the texture.

Per-Pixel Matching

Matches the image to the background on a pixel-per-pixel basis, with the bottom-left pixel of the map matched exactly to the bottom-left rendered pixel. If the pixel size of the map differs from the pixel size of the rendered output, the renderer issues a warning. However, it still renders the image, cropping or padding it as necessary.

Force Transparent Alpha

When on, forces the background alpha to 0. When off, mental ray uses the actual alpha from the bitmap image or procedural map. If the file contains no alpha data, returns opaque alpha values when off.

Off-screen Rays return Environment

When on, uses the scene environment for off-screen points.

Because the shader back-transforms points such as those seen in reflections into screen space, it might happen that parts of surfaces reflect points that are not on the screen. Because the projected map contains data only for points on the screen, this option allows a reasonable alternative for off-screen points.

Off-screen Color (When Above Off)

Defines the color of off-screen points when Off-Screen Rays Return Environment (see previous) is off.