9
1722 Chapter 16: Material Editor, Materials, and Maps
encounter multiple return values in shaders provided
with other shader libraries or custom shader code.
Height M ap Displa cement S hader
(menta l r ay )
Material Ed itor > mental ray Conne ction rollout > For
the Displacement co mponent, turn off the lock button.
> Click the button for the Displacement component.
> Material/Map Browser > Height Map Displace ment
(3dsmax)
Material Editor > mental ray material > Cli ck the bu tton
for the Displace m e nt comp one n t. > M aterial/Map
Browser > H e ight M ap 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 Crea ting and Using Normal
Bump Maps (page 3–150).
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. Otherwise, turn off smoothing for
each object whose mater ial uses a height ma p via the
Object Properties > mental ray panel (page 1–126) (turn
off Use Global Settings and then turn off Smoothing).
Tip:
Avoid the temptation to apply MeshSmooth
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 exac tly t he same shape when the map is
created and when it is used for displacement. Also,
MeshSmooth does not use the same a lgorithm as
the mental ray displacement smoothing, so using
both forms of smoothing won’t work perfectly.
The best results are obtained by not smoothing the
low-res model when the m ap is created and also
not using mental ray smoothing.
Also, avoid using a paint program to mo dify 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 preser ve 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 artist
to control the result.
See also
3D Di splacement Shader (mental ray) (page
2–1714)
mental ray Displacement (page 3–96)
mental ray Connection Rollout (page 2–1461)
mental ray Material (page 2–1544)
Interfa ce
Height Map Displacement (3dsmax) Parameters
rollout
Be sure to enter the same values for Minimum
and Maximum Height 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–165) when creating the
height map. Default=-10.0.
Maximum Height—The “Max Height” value
specified on the Render to Texture: Projection