mip_fgshooter

 
 
 

Category: mental ray > Lens

Shader Family: Lens

Output: Color

This shader is used to shoot final gathering (FG) rays into the scene in a predefined way. Without this shader, mental ray normally shoots eye rays through the camera into the scene during the final gathering precomputation stage. FG points are calculated in the scene based on the location caused by how these eye rays are shot.

The advantage of this is that the density of FG points is related to image space, and is therefore automatically adapted to exist in areas where the points are necessary. On top of this is an adaptive calculation of the FG point density, creating the optimal solution for the image.

However, when the camera moves during animation, the location of where FG points are calculated actually moves along with the camera. In an animation, this can potentially cause artifacts in certain situations, especially if the camera moves slowly or only moves a little (such as in a small pan, dolly, tilt, truck, or crane move).

The mip_fgshooter shader safeguards against these situations: it allows you to use a fixed (or a set of fixed) transformation matrices as the root location from which to shoot the eye rays that are used (during the final gather precomputation phase only).

Name

The name of the shader node displayed in the render tree. Enter any name you like, or leave the default.

mode

Defines how the matrix (or matrices) passed are displayed during the final gather prepass. Since the way in which it is displayed affects the adaptivity, this has some functional implications.

  • 0 breaks the render into subframes, each containing the image as seen from a given position. This requires a higher final gathering density to resolve the same number of details, but gives the best adaptivity.

  • 1 stacks the different results on top of each other. This does not require any additional density, but the final gathering adaptivity does not work as well.

  • 2 works like 1, but only visibly displays one pass (but all the others are calculated in exactly the same way).

trans

Contains an array of transformation matrices, defining how the eye rays are shot during the final gather prepass. Instead of using the camera to calculate the eye rays, they are shot from the 0,0,0 point, mapping the screen plane to the unit square surrounding the point 0,0,-1, and then transformed by the passed matrix (or matrices) into world space.