Width from Light Direction Contour Shader
 
 
 
Command entry:mental ray material Advanced Shaders rollout Click Contour button. Choose Width from Light Dir (contour).
Command entry:Other material mental Ray Connection rollout Advanced Shaders group Unlock Contour if necessary. Click Contour button. Choose Width from Light Dir (contour).

The Width from Light Dir shader modifies the thickness of contours based on the direction specified by a "virtual light vector" as defined in the shader. The virtual light is used only to calculate the contours; it does not affect the scene in any other way.

The virtual light direction is controlled by the Light Direction value. It’s a vector parameter, which means it has three value fields, which correspond to the world X, Z, and Y axes, respectively. For example, the following illustration comprises three separate renders, in which Light Direction is set to (1,0,0), (0,1,0), and (-1,0,0), respectively.

Left to right: Light Direction=(1,0,0);(0,1,0);(-1,0,0)

Interface

Color

The color used for rendering the contour lines.

Min Width (%)

The relative thickness of the thinnest contour lines, where illumination from the virtual light is brightest.

Max Width (%)

The relative thickness of the thickest contour lines, where illumination from the virtual light is darkest.

Light Direction

Use these three vector fields to specify the position of the virtual light shines for defining the relative contour thickness. The first field specifies the world X axis; the second, the world Z axis; and the third specifies the world Y axis. For example, to have the light shining from the right, so that the contour lines are thinnest on the right side of scene objects as viewed from the front, set Light Direction to (1,0,0). A negative number reverses the position, so using (-1,0,0) would position the light on the left side.