[prev] Texture Maps: Subdivision Surfaces [next]

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.

[click to zoom]
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).

[no zoom]
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.

You have a choice of three tiling methods: the first is Fixed, where the map dimensions of each patch aren't changed in anyway. The second choice is Fill, where the dimensions are equally scaled up to attain maximum usage of the allocated texture space. The third choice is Square, where each quad in the SUBD surface is assigned an equal sized square of texture space.

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:

(1) Copy the SUBD surface from CySlice into Maya by clicking on the Transfer To Maya button.

(2) This step is optional, though can be very handy. Convert the SUBD network to a Poly network by clicking on the Poly button in the Patches panel. Then copy this Poly surface to Maya by again clicking on the Transfer To Maya button.

(3) Click on the Reset button at the top of the Networks window to remove the current network/surface from the loaded polymesh.

(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.


(5) Once the UVs are how you want them, select the SUBD surface and click on the Copy Selected to CySlice button in the CySlice -> Maya window. The SUBD surface is then imported back into CySlice as a single patch network.

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:

[no zoom]
Figure 123. Exporting the SUBD Surface

(1) Click on the Save button towards the top of the Networks window, and switch the type from Slice to Obj in the Save Options window (see Figure 123). You can optionally scale or rotate the exported polymesh. Make sure the Level is set to 0, then enter a name and click on Save in the file selection window. As described above, you might also want to convert the network to a Poly surface and save that out too.

(2) Click on the Reset button at the top of the Networks window to remove the current network/surface from the loaded polymesh.

(3) Load the OBJ file into your other application, apply the UVs, then save out the new OBJ file.

(4) Click on the Networks window Load button, make sure the type is again set to OBJ and that the scale and rotation parameters are the opposite of those in step (1). Click on Load in the file selection window, and as with the Maya plugin, the SUBD surface is imported back into CySlice as a single patch network.

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.

[prev] [top] [next]