Graphics Programs Reference
In-Depth Information
Displacement Mapping
Now that the reflections are set up, you'll use the same image map to create displace-
ments in the box to sink the carvings into the box. Isn't that convenient?
1. In the Hypershade, click to create a new file
node, and select the boxCarvings.jpg file
in the Sourceimages folder again. You don't
want to reuse the same file node as you
did for the ref lections (ref lectionMap
node), because you need to change some
of its attributes. Name the new file node
displacementMap.
2. Double-click the boxShader node to open
the Attribute Editor. MMB-drag the new
displacementMap node onto the boxShader
node in the Hypershade, and select Dis-
placement Map from the context menu that
pops up, as shown in Figure 11.96.
3. A new node appears called displacementShader1, but there is no connection apparent
to the boxShader. Select the boxShader, and choose the Input and Output connec-
tions icon at the top of the Hypershade ( ). The Hypershade shows you the entire
shader network, including the displacement map connection, as seen in Figure 11.97.
Notice that the displacement connects to the phong1SG node and not directly to the
boxShader node. This is normal and how it's always done.
Figure 11.96
Add the new image
map to the Displace-
ment Map attribute.
Occasionally, when you click to view the input and outputs of a shader as you did in step
3, the Hypershade will put some nodes on top of others. If you don't see any of the nodes
shown in Figure 11.96, try clicking and dragging some of the nodes around in the Hyper-
shade to see if there are any accidentally hidden nodes. These little touches make Maya
extra fun!
4. Render the box and see what happens now that you have a displacement map applied.
Figure 11.98 shows how the box seems to have exploded!
Not to worry, this is to be expected. The values coming from the black-and-white
map dictate how much of the geometry is displaced (moved). Obviously, you don't
have an image that works well for the amount of displacement, although it does look
like the displacements are in the proper place to correspond to where the carvings
are on the box.
Search WWH ::




Custom Search