Old_2013/tutorirls & Tips2008. 6. 30. 10:38

By pfbreton

Note:

The detection of contours needs to be based on some sort of threshold value. That threshold is typically ruled by the Angle Step Threshold parameter of the Contour Contrast Function Levels shader (see the description here). Detection of materials or shadows is also performed by that shader.

Simple

max file here

 

 

The Simple contour shader will draw all lines to the same width.

Curvature

max file here

 

 

The Curvature contour shader will trace a line where the angle between normals falls under a certain threshold.

Depth Fade

max file here

 

 

The Depth Fade contour shader will allow you to change the width and color of a line based on Zdepth.

The Zdepth is in world units.

Tip:

Use a Tape Helper Object to determine the Z depth of your view.

Layer Thinner

max file here

 

 

The Layer Thinner will let you reduce or enlarge the contour lines based on the trace depth (which is ruled by the Contour Contrast Function Levels shader)

In this example, the glass pane is semi-transparent. The shader detects that situation and makes the lines thinner when they are drawn inside the glass pane.

Factor Color

max file here

 

 

The Factor Color uses the color of the material, as rendered by mental ray (as opposed to the diffuse color).

In this example, the materials are all self-illuminating, to ensure a constant color. The shader does the rest.

Width From Light

max file here

 

 

The Width from Light will generate contours thick or thin based on the direction of a light you can specifiy in your scene.

Width From Light Dir

avi showing animated light dir here

max file here

 

 

The Width from Light Dir will modify the thickness of contours based on the direction of a "virtual light vector" that is defined in the shader.


Width From Color

max file here

 

 

The Width from Color will modify the thickness of contours based on the brightness of the color of you materials

Note: The color used by the shader is not the diffuse color of the material, but instead the rendered color, so lighting has an influence here.

Although the name of the shader uses the word "Color", it would be probably more appropriate to call this shader "Width from Brightness", since only the brightness of a color is taken in consideration.

Min Width: width from bright colors

Max Width: width from dark colors

Combi

max file here

 

 

The Combi contour shader is a combination of theDepth Fade, Layer Thinner, and Width from Light shaders.

Tip:

Use a Tape Helper Object to determine the Z depth of your view.

Note:

In this illustration, we can see a blue line crossing the glass pane held by the character. This blue line is the reflection of the edge of the floor, behind the camera.

The line is blue (Near Color), because the distance considered is not the distance of the eye ray bouncing in the glass. It is instead the distance between the camera and the edge itself.

반응형
Posted by dhkim DongHwan, Kim

댓글을 달아 주세요