TEXTURING A HEAD CREATED IN MAYA WITH SUBDIVISION EMULATION
With the modeling complete, the next step is to begin texturing the geometry. Ordinarily, texture mapping information can be applied directly to an animated mesh without adverse effects. However, smoothed polygons and meshes created using the subdivision emulation technique must be textured using a duplicate texture reference object if the artist expects to animate them and still have complete control over the texture mapping process. The reason for this lies in the way Maya organizes an editable history for all objects; when texture coordinates are assigned to a smoothed object, by default Maya applies the texture mapping action prior to the smoothing function. Maya assumes that most artists working with smoothed poly objects will want to bind the low-poly (unsmoothed) mesh directly to a skeleton, thus avoiding the diminished performance and complex skinning issues common to dense polygonal characters. The texture coordinate information is applied before skinning, animation, and smoothing so that the textures will not appear to “swim” through the mesh when it is deformed. Unfortunately, this means that texture coordinates are created for only the low-poly mesh (which is less detailed than the smoothed surface and therefore an imprecise representation of the way the texture will ultimately map across it). The work-around to this problem is to create a duplicate of the smoothed geometry which will receive all texture mapping information. Once the texture coordinates have been established, they can easily be transferred from this duplicate reference object onto the actual smoothed surface which can in turn be animated without texture swimming.
With the workflow outline in mind, the first step is to create a texture reference object by selecting the smoothed mesh and duplicating it using the Edit > Duplicate tool. I usually offset this duplicate along the X axis so that I don’t inadvertently confuse it with the original geometry.
Next, select the polygonal faces which comprise the head, and choose one of Maya’s texture projection methods. Since most of the important detail on the head is found on the back, front, and sides, I typically use the Cylindrical Projection tool as the basis for the head texture map (Edit Polygons > Textures > Cylindrical Mapping). However, the best projection method and settings will vary depending upon the model being textured.
When using spherical or cylindrical mapping, checking the "Seam Correct" option box usually improves most of the mapping anomalies on the back of the model.
Note: In this example, I have mapped a simple checkerboard pattern to the color channel of my material for clarity.
Even with Seam Correction on and the projection settings adjusted, Maya's mapping tools almost always require some manual tweaking in order to achieve an acceptable set of UV coordinates. By selecting the head model and opening the texture view window (Panels > Panel > Texture View), we can more easily identify the problem spots.
First of all, it appears that the UVs for this object extend beyond the borders of the actual texture (this is illustrated more clearly when the texture itself is superimposed over the UVs using Image > Display Image from the Hypershape window).
Because this head texture will be a non-repeating texture, these coordinates must be adjusted in order for the texture to map across the mesh correctly. UV coordinates can be adjusted manually by right clicking over the mesh, choosing UV from the hotbox menu, selecting the offending UV coordinate...
and moving it to the appropriate location with the move tool (keyboard shortcut W).
Ultimately, all UV coordinates which fall outside of the texture boundary will need to be adjusted in order to create a set of coordinates which won't tile.
It is also a good idea to try to adjust any areas where the UV coordinates overlap. Generally, textures along these overlapping UV areas will seem inappropriately smeared if the texture coordinates aren’t modified. This modification can be done manually by simply selecting the UVs in the offending areas and repositioning them. Alternatively, this task can be automated to some extent with Maya's Relax Tool (Edit Polygons > Texture > Relax UVs).
Ideally, the goal is to try to distribute the UV coordinates as evenly as possible across as much of the texture as possible without extending beyond the borders of the texture. Retaining symmetry where appropriate will also facilitate the process of painting the actual texture.
Some problem areas (such as the interior of the mouth) may require additional projections and/or completely separate material assignments in order for textures to map properly. Maya's Isolate Selection tool (Show > Isolate Select > View Selected) is particularly useful for selecting these interior faces in hard to reach places.
When multiple materials are applied to the same mesh, special care must be taken to match colors and textures along the border edges of the different materials to hide the seams convincingly.
Once the texture coordinates have reached an acceptable state, I recommend deleting the history of the texture reference object. I have found that certain UV tweaks are occasionally lost if the object history is not deleted. Then, a simple screen capture of the texture view can be imported into a paint program, cropped, and used as a reliable template for texture painting.
Once the 2D texture maps have been painted, the texture files can be linked to any mappable channels of a material. A discussion of Maya’s Hypershade is out of the scope of this tutorial. In brief, the workflow is to create a material (i.e. Create > Materials > Lambert from the Hypershade window), then map a channel (Color or Bump, for example) by clicking on the checkerboard icon, choosing File from the 2D Textures menu, and linking the newly created texture file to the material.
With the texture coordinates established and the textures themselves linked to materials, the final step is to transfer the UV coordinates from the reference object onto the original smooth mesh using the Polygons > Transfer tool with the following options:
Because this tool transfers only mapping information and not material assignments, the material(s) themselves will need to be applied to the smoothed mesh by selecting the polygonal faces, right clicking on the appropriate material in the Hypershade view and selecting Assign Material to Selected from the drop down menu.
The texture mapping is now finished and the low poly cage can be bound to a skeleton and animated with or without blend shapes. The texture reference object can be hidden from this point forward.