About Texturing Polygons


All the techniques covered thus far work on polygon primitives. However, they don't necessarily work on any polygon surfaces you've modeled. Polygon surfaces are made up of many small irregular faces, some of which aren't square. The faces can also be arranged in configurations that aren't grid based, which means applying textures to them isn't as simple as it is on NURBS surfaces.

Think of a wrapped present. Imagine carefully removing the wrapping paper and flattening it out. Once the paper has been flattened, you can easily paint a new image on it (Figure 14.78).

Figure 14.78. A wrapped-gift texture has been mapped to a cube.


This is essentially what you need to do to add a texture to a polygon surface. Before you can successfully texture-map it, you need to "unwrap" the surface. To do this, you create a UV map, which you can see in the UV Texture Editor (Figure 14.79).

Figure 14.79. The white lines in the UV Texture Editor represent the edges of the cube. You can see how the cube has been "unwrapped." The image beneath these lines is what the actual image file that's mapped to the surface looks like.


In most cases, your UV map will consist of several unwrapped pieces. For instance, if you've used the Combine function on a polygon, its surface has more than one discrete part. These UV maps can be difficult and unwieldy to set up because the UVs may all overlap or be tangled. Additionally, special care must be taken to arrange the maps in logical arrangements that are easy to work with.

Maya provides a number of tools to help unfold your objects. If you're texturing with projections, an automatic mapping solution is usually adequate and time-efficient. If you're creating your own maps or working with a low-res character, finessing your own UVs is generally preferable.

One distinct advantage of polygons over NURBS is that you can assign shading groups to individual faces of a polygon surface, whereas a NURBS surface can have only one shading group assigned to it. You do this by selecting polygon faces and assigning the materials to them, not to the object as a whole (Figure 14.80).

Figure 14.80. Four different textures have been mapped to different parts of the same polygon sphere by assigning the textures to specific faces of the sphere.


To create automatic mapping for a polygon texture:

1.

Create a polygon telephone (Figure 14.81).

Figure 14.81. By using Extrude Face and Smooth, you can model a phone from a cube in just a few steps.


This one was created by scaling a cube, extruding the top and bottom earpieces, and then smoothing the polygon with a subdivision level of 3 and a continuity of 0.35. Save this model for later use.

2.

Create a blinn material, and assign it to the surface.

3.

Open the Hypershade, and double-click the blinn material.

The Attribute Editor for the blinn material opens.

4.

Click the Map button next to the Color slider.

The Create Render Node window appears.

5.

Make sure the Normal radio button is selected, and then click File.

The Attribute Editor for the file node opens.

6.

Click the Browse button next to Image Name.

7.

Browse for and open your own image file.

We created one especially for the phone, but any image will do. The image looks messed up and stretched out on the phone in the Perspective view (Figure 14.82).

Figure 14.82. On the left is the file texture that is mapped to the phone. On the right, the texture on the phone is stretched out and in the wrong places.


8.

Select the surface.

9.

Choose Edit Polygons > Texture > Automatic Mapping.

Now the image isn't stretched as much, but the elements aren't in place (Figure 14.83).

Figure 14.83. Now that a UV map has been created using automatic mapping, the texture is placed on all parts of the surface, but not in the right places.





Maya 7 for Windows and Macintosh(c) Visual Quickstart Guide
Maya 7 for Windows & Macintosh
ISBN: 0321348990
EAN: 2147483647
Year: 2006
Pages: 185

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net