mib_lens_stencil

 
 
 

Category: mental ray > Lens

Shader Family: Lens

Output: Color

Lens shaders are not only used to change the direction of eye rays: they can also be used to manipulate colors (see mib_lens_clamp) and even the apparent shape of the rendered images.

This lens shader may be used to block out portions of an image by overlaying a stencil texture. An eye ray is cast only if the returned value of the provided scalar texture is between the prescribed floor and ceiling values. If the texture value is below the floor value, then the floor color is used; if the texture value is above the ceiling value, then the ceiling color is used. If the texture value is between the floor and the ceiling value, then the returned color is blended with the floor color and the weight provided by the relative texture value, with respect to the floor and ceiling values.

Name

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

floor

If the value of the stencil texture is below this value, then the current sample color is replaced with the floor color. The default floor value is 0.

ceiling

If the value of the stencil texture is above this value, then the current sample color is replaced with the ceiling color. The default ceiling value is 1.

floor_color

The color used for samples where the stencil texture value is less than the floor value. The default value is black.

ceil_color

The color used for samples where the stencil texture value is greater than the ceiling value. The default value is black.

stencil

A scalar-valued 2D texture acting as a stencil overlaid on the camera lens.