8
1532 Chapter 16: Material Editor, Materials, and Maps
encounter multiple return values in shaders provided
with other shader libraries or custom shader code.
Height Map Displacement
Shader (mental ray)
Material Editor > mental ray Connec tion rollout > For
the Displacement component, turn off the lock button.
> Click the button for the Displacement component.
> Material/Map Browser > Height Map Displaceme nt
(3dsmax)
Material Editor > mental ray material > Click the button
for the D isplace m e nt compone n t. > Material/Map
Browser > Height Map Displacement (3dsmax)
Note: Shaders don’t appear unless the mental ray
renderer is the currently active renderer.
The Height Map Displacement shader displaces
the geometry of surfaces, and is specifically
intended for use with height maps generated by
normal mapping; see
Creating an d Using Normal
Bump Maps (p age 3–146)
.
Impor tant: When applying a material containing
this map to an object, the mental ray Displacement >
Smoothing option must be off. If such materials are
applied to
all
objects in the scene, you can
turn off
Smoothing globally
. Otherw ise, turn off smoothing for
each object whose material uses a height map via the
Object Properties >
mental ray panel ( pag e 1–121)
(turn
off Use Global Settings and then turn off Smoothing).
Tip:
Avoid the temptation to apply M eshSmooth
to a model when creating a height map for it.
This changes the shape of the model so the height
values will not be correct. The low-res model
must have exactly the same shape when the map is
created and when it is used for displacement. Also,
MeshSmooth does not use the same algorithm as
the mental ray displacement smoothing, so using
both forms of smoothing won’t work perfectly.
The best results are obt ained by not smoothing the
low-res model when the map is created and also
not using mental ray smoothing.
Also, avoid using a paint program to modify the
height map. The values in the height map depend
on the shape of both the low-res and high-res
models, and it’s easy to damage the mathematical
accuracy. If you paint any changes onto the map,
you must be careful to preserve the faceted look,
and avoid the temptation to blur away the facets.
You might try painting in Additive and
Subtractive mode to add or subtract to the
displacement, because Normal mode will set a
fixed displacement, making it difficult for an ar tist
to control the result.
See also
3D Displacement Shader (mental ray) (page
2–1524)
mental ray Displacement (page 3–95)
mental ray Connection Rollout (page 2–1305)
mental ray Material (page 2–1385)
Interfa ce
Height Map Displacement (3dsmax) Parameters
rollout
Be sure to enter the same values for Minimum
and Maximum Heig ht as the equivalents on the
Projection Options dialog, as specified below.
Minimum Height—The “Min Height” value
specified on the
Render to Texture: Projection
Options dialog (page 3–160)
when creating the
height map. Default=-10.0.
Maximum Height—The “Max Height” value
specified on the
Render to Texture: Projection