8

1524 Chapter 16: Material Editor, Materials, and Maps
encounter multiple return values in shaders provided
with other shader libraries or custom shader code.
The components for some mental ray
materials and shaders can be assigned other
shaders. For these components, the main shader
button is accompanied on the right by a small
button. Ifnoshaderisassigned,ortheshader
assigned has only a single return value, the button
is disabled and shows a dot in the middle. If the
shader assigned c an return multiple va lues, text
appearsinthisbutton,andatooltipshowsthe
parameter name. Clicking the button displays the
ConnectParameterToShaderdialog,allowingyou
to change the parameter being used.
Inter face
List of return values—Lists the parameters that the
shader re turns. The typ e of each p arameter is
indicated in
parentheses, follow ing the para meter’s
name.
Show Compatible Only—When on the list shows
only the retu
rnvalueswhosetypeiscompatible
w ith the component the shader is assigned to.
When off, shows all return values from the shader,
whether th
eyarecompatibleornot.Default=on.
3ds Max Custom Shaders
3D Dis pla cement Sha der (ment al
ray)
Material Edi tor > mental ray Connection rollout > For
the Displacement component, turn off the lock button.
> Click the button for the Displacement component. >
Material/M ap Browser > 3D Displacement (3dsmax)
Material Editor > mental ray material > Click the button
for the Displacement component. > Material/Map
Browser > 3D Displacement (3dsmax)
Note: Shaders do not appear in the Browser unless you
have enabled the mental ray ex tensions by using the
mental ray Preferences panel . In addition, shad ers don’t
appear unless the mental ray renderer is the currently
active renderer.
A 3D Displacement shader displaces the geometry
of surfaces. The effect is similar to displacement
mapping of a standard material. You can apply
mental ray displacement to any kind of object,
unlike standard displacement mapping, which
is restricted to surface models (meshes, patches,
polys, and NURBS sur faces).
Displaced surfaces are smooth if the displaced
polygons share normals; otherwise, the displaced
surfaces are faceted. Also, unless normals
are shared, faces can become separated in the
displaced mesh. To prevent this, make sure
adjacent surfaces belong to the same shading
group.
When the m ental ray renderer is the act ive
renderer, mental ray displacement is the only
displacement method used, unless your scene
includes a
Displace modifier (page 1–608)
,which
always uses standard 3ds Max displacement.
Tip: Before you render, you can disable or enable
displacement by using the Displacement toggle in
the Options group on the
Common Parameters
rollout (page 3–27)
.