Game Development Reference
In-Depth Information
Figure 3.16 Results of Planar
Mapping (showing parts that didn't
work so well).
Why?
Unfold works great; however, it only unfolds UVs that exist. As we have
seen before, when faces or edges are extruded, often the new faces that
are created lack UVs. Using Planar Mapping does a few important things
for us. First, it ensures every part of a particular mesh has UVs. Second,
it ensures all these are part of one shell. Third, by choosing Best Plane in
the options, we give Unfold its best chance at providing a distortion-free
UV map.
Warnings and Pitfalls
At first blush, all looks
well—the entire surface
is covered with checks.
However, if you look
carefully at the checkers
you will see that there
are some really distorted
checkers (especially in
the upper-right corner
of Figure 3.16 ). This is
happening because
Planar Mapping shoots a
texture across a surface
like a slide projector. As
the image is projected
against faces that are
perpendicular to the
projection plane it looks
great; but as the form
begins to wrap around
so that the planes are
parallel to the projection,
we get stretching. If
this is left this way, the
rock texture that will
be applied will also be
deformed as it wraps
around the form. Thus,
the next steps are
important and powerful.
Step 22: Unfold (interactively) the UVs via the Smooth UV tool. In the
UV Texture Editor (Window>UV Texture Editor), right-click the mesh and
choose UV from the hotbox. Marquee select all the UVs. Select the Smooth
UV tool either from the iconography in the top left of the UV Texture Editor
or from Tool>Smooth UV Tool.
Step 23: Drag the new Unfold button to unfold the mesh. Look for the
new pop-up tools that are surrounded in yellow boxes. Drag the word
Unfold and watch as the UVs unfold and reveal a much better distributed
checker pattern in the View panel ( Figure 3.17 ).
Step 24: Resize (and rotate if needed) the UV Shell to get it to fit into the
top-right quadrant.
Why?
Although UVs do not need to always remain in that top-right quadrant
(and in fact in the next setup steps we will be moving out of that space),
if the situation calls for a nonrepeating texture, it needs to have it remain
within this quadrant. For this earth wall, since we will be seeing all of it at
once within the game, we will want to avoid a repeating pattern if we can.
Plus, by rotating and scaling these UVs, it allows us further texture space
to create another mini-atlas.
Search WWH ::




Custom Search