 |
| Texture Maps: Subdivision Surfaces | |
 |
The texture mapping of subdivision surfaces is usually quite
different to that of NURBs. A NURBS surface is made up of one or more
patches, and each of these has its own UV texture map. A subdivision
surface is textured more like a polymesh; there is one single large
texture map, and the control points of the control hull are assigned
UV values (between 0 and 1) that refer to some location in the large
map.
There are a number of ways to assign the UVs:
(1) | | |
Various projections, like cylindrical or spherical, with relaxation
to remove overlaps.
|
(2) | | |
Segmentation and tiling, where the surface is divided into groups
of adjacent faces based on some criteria, like facing direction, and
are then tiled over the total UV space.
|
(3) | | |
Pelting, where the surface is unwrapped and flattened out.
|
(4) | | |
A combination of some or all of the above.
|
Figure 121. SUBD Topology and UVs |
 |
CySlice uses the segmentation/tiling approach, where each "patch" in
the network is assigned some rectangular region of UV space, and
these rectangles are packed in as tight as possible to reduce the
amount of wasted texture space (see
Figure 121).
Figure 122. SUBD UVs |
 |
When in SUBD surface mode, the
Build UVs
section of the
Texture Maps
panel becomes visible (See
Figure 122).
By default, the
Map Bleed
is set to 4; this is the number of pixels for each rectangular region
that the texture is bled out into the background color. Because of
the way texture maps are usually sampled during rendering, across
multiple pixels, the bleed is needed at the patch boundaries so no
background color is picked up.
Click on
Build UVs
to build the UVs for the subdivision surface. As described above, the
individual patch rectangles are tiled over the texture space, and the
smallest power-of-2 map possible is allocated.
The size of this map is displayed in the
Total Size
field. If you consider it to be too small or too large, you can
change the scale field after the
Build UVs
button, click on
Build UVs
again, and the
Total Size
field will update.
 |  |
And finally, you can see the UVs that CySlice creates by clicking on
View UVs.
|
 |
Imported SUBDs |
 |
If you don't like the way that CYSLICE assigns UVs, and have your own
preferred method, that's perfectly OK. What you can do is export the
SUBD hull, load it into you own software, assign UVs using your own
procedure, then import that back into CySlice.
If you are using the Maya plugin, then the export/import procedure is
quite simple:
(4) | | |
Use the Maya texture map tools to assign UVs to the Poly or SUBD
surface. The Poly surface is closer, than the SUBD control hull, to
the final shape of the SUBD surface. This means the Poly surface will
often produce better UVs when using automatic methods such as
projections or pelting.
By the way, once the Poly/SUBD surface is loaded into Maya,
there's nothing stopping you from then exporting it to some other
plugin or application, such as a 3D paint program, to assign UVs.
If you have built the UVs from the Poly surface, make sure you copy
them onto the SUBD control hull before proceeding.
|
More information about the Maya plugin can be found in the
Maya
chapter.
If you aren't using the Maya plugin, the export/import process is
a little more complex:
Figure 123. Exporting the SUBD Surface |
 |
(3) | | |
Load the OBJ file into your other application, apply the UVs, then
save out the new OBJ file.
|
Once the SUBD surface has been imported, you need to assign the usual
mapping parameters to it. Because the imported surface is treated as
a single patch, selecting it is as easy as clicking on blue right arrow
after the
Pick
button towards the top of the
Texture Maps
panel.
When selected, you can set the map
X
and
Y
size, the map types, and the
Max Error.
Then, as a final step, set the
Map Bleed
and click on
Build UVs.