Mapping UVs: The Checker Map Technique


Using a checkered texture as a guide while you manipulate the UV coordinates on your mesh will make it very obvious when an area gets stretched or looks distorted. Once you've corrected all these problems, you can create your texture safe in the knowledge that what you draw is what you will see on your geometry. The checkered technique is also a good way to visually verify that all areas of the model are receiving proportionally comparable texture space relative to each other.

Create the Checkered Texture

Load in the file Kila_Divided.mb.

Before we edit the UVs, we need to see how they currently lie on the geometry. To do this, we'll first create the checkered material that will be applied to the model.

1.

Go to Window > Render Editors > Hypershade. This opens the window in Figure 8.26. Hypershade contains all the information on your current materials and textures, as well as on various other objects such as lights and cameras in Maya.

Figure 8.26. Hypershade showing top tabs only.


NOTE

By default the Hypershade will open with split view, the top shows the current shaders in the scene and the bottom is a work area. This is useful if your scene has lots of materials, as you can drag individual shaders into the work area for closer attention. To change the Hypershade view, use the three boxes to the far right of the Hypershade toolbar, Show Top Tabs Only, Show Bottom Tabs Only, and Show Top and Bottom Tabs.

Hypershade Options

There are a number of materials available to you in Hypershade, so let's briefly look at some of the more common ones.

  • An Anisotropic material is used to represent surfaces that have small grooves, like brushed metal or a vinyl record.

  • A Blinn material is useful for shiny, metallic-looking surfaces.

  • A Lambert is a material that represents flat, matte surfaces.

  • A Layered Shader is used when you want to combine two materials or textures into a single material.

  • Phong and Phong E materials are useful for shiny, plastic-looking surfaces.


2.

We don't need a shiny finish to this texture, so we will use a Lambert. There are a couple of ways to create this:

  • Select Create > Materials > Lambert either from the Hypershade menu bar or by right-clicking in the main window and using the contextual menus.

  • Select the Lambert icon under the Create Materials bar on the left. (If this bar is set to something else, like Create Textures, click the name and select Create Materials from the drop-down menu.)

Whichever method you choose, the result is a new material called lambert2 (Figure 8.27).

Figure 8.27. Create a new Lambert material.


3.

Double-click the new material to open its attributes, as shown in Figure 8.28.

Figure 8.28. The new Lambert material's attributes


4.

Highlighted at the top of the window in Figure 8.28, in the lambert text field, is its current name. Change lambert2 to Check.

5.

Under the Common Material Attributes section you will see various options, from Color to Translucence Focus. We are only interested in the Color option for now.

Next to this is a colored rectangle and then a slider, and a small box with a checkered pattern in it. Click this box to open up a Create Render Node window (Figure 8.29).

Figure 8.29. Defining the material in the Create Render Node window


6.

Under the heading 2D Textures, select File. The Attribute Editor now changes to show the file's attributes (Figure 8.30).

Figure 8.30. The file attributes


7.

Next to Image Name, you'll see a space followed by a folder icon. Click this folder and browse to the file called CheckerMap.jpg (you can find this file on the CD in Project Files/08).

8.

Click Close to complete the material's creation. Go back to the Hypershade; as you can see from Figure 8.31, the material is now named Check and the ball shows the checkered texture that is applied.

Figure 8.31. The new Check texture has been created.


9.

Before we apply this material to Kila, we need to make materials visible in the view panels. Go to the Shading menu and make sure Hardware Texturing is on, or press 6 on your keyboard.

10.

The quickest way to apply the Check material to our character is to select all the geometry, then right-click the material in the Hypershade and select Assign Material To Selection. Make sure to right-click only the materialthere is no need for it to be selected (highlighted) in the Hypershade. Left-clicking to select it first will only serve to de-select the geometry.

Another method is to middle-mouse-button-click your material and drag it to the geometry to which you want to apply it.

Your model now looks like the one in Figure 8.32. You can tell that the UVs need work at this stage, because the grid is not cleanly laid out over her body. With the material applied, we can now go in and tweak the UVs, making sure the squares on the texture are lined up correctly.

Figure 8.32. Kila with the material applied


Arm UVs

Let's begin our UV work with Kila's arm. Since the shape is cylindrical, we can simply apply a cylindrical map to this area. The problem is that since her arm is bent, a single cylinder will not suffice. So we will map her upper and lower arm separately, as shown in Figure 8.33.

1.

Select the faces of the upper arm (Figure 8.33b).

2.

Go to Edit Polygons > Texture > Cylindrical Mapping, to apply the mapping to the selected faces.

Figure 8.33. Apply cylindrical mapping to her upper arm.


You are now presented with the projection manipulator; you can see it in Figure 8.33c. This represents how the mapping is being applied to the geometry and, like any other manipulator in Maya, you can adjust it to better suit your needs:

  • The small light-blue squares in the corners manipulate the projection's height and horizontal sweep.

    The horizontal sweep is the amount by which the projection wraps around an object. The default amount is 1.8, which is 180 degrees and only covers half the object. This doesn't mean, however, that only half of the object is mapped; it merely alters the aspect ratio of the UV placement. You can edit the horizontal sweep directly by moving the red squares on either side of the manipulator.

  • The green squares adjust the height of the mapping, and the light-blue flat square in the center adjusts its overall scale.

  • The last, larger cyan cube, which exists on the edge of the projection, adjusts its rotation around the object.

These handles are all good for adjusting the projection locallybut what if you need to move it globally? You should see a red T icon in the bottom-left corner of the projection manipulator. Selecting this will toggle between the projection's default manipulator and Maya's standard Translate/Rotate/Scale manipulator (Figure 8.33d).

We now need to adjust the cylinder's manipulator so that it fits this portion of her arm.

3.

Start by using the red cubes to adjust the horizontal sweep, making the projection spread around to the back of the arm.

4.

Click the T icon to switch to Maya's default manipulator and use this to adjust the cylinder's rotation so it matches the orientation of the upper arm (Figure 8.33e).

5.

Now you can either use the current Scale manipulator, or click the T icon again to return to the projection manipulator and adjust the scale to envelop the arm.

6.

With everything still selected, go to Window > UV Texture Editor.

The UV Texture Editor (Figure 8.34) shows how the UVs of the currently selected object are laid out. What you see is the upper arm flattened out, as if you have peeled the skin off and laid it out flatin other words, "unwrapped." Here is where we will manipulate the UVs, adjusting them to eliminate undesired overlap, reduce stretching, and make the UVs easier to paint.

Figure 8.34. The UV Texture Editor


You may still have the actual Check texture in the background. This texture is usually good to use as a guide, but for now we need to remove it. Turn off the image by going to Image > Display Image.

The upper arm is looking okay now. The UVs are nicely laid out following a uniform pattern. We can also identify key areas of the arm, such as the shoulder, which will be useful when we paint our textures.

Let's continue on now to work on the UVs of lower arm. Select the faces for the lower arm and repeat the foregoing procedure (Figure 8.35).

Figure 8.35. Map the lower arm.


NOTE

It is important that the projection manipulator's orientation around the mesh matches that of the upper arm. This will ensure that both sets of UVs will follow the same lines when we come to edit them; for example, we want the elbow's UVs to line up.


The basic UV mapping is now in place for the arm, but we need to work on it some more before we are finished.

UV Manipulation on the Arm

With the basic mapping in place, we can now edit the UVs in the UV Texture Editor.

1.

Select the arm and look in the UV Texture Editor. You can see in Figure 8.36 (left) that both sets of mapping overlay each other. We need them to be separate.

Figure 8.36. Adjust the position of the mapping for the arm.


2.

In the perspective view, select the faces of the upper arm. They will be highlighted in the UV Texture Editor.

3.

Move back to the UV Texture Editor and go to Select > Convert Selection To UVs. Both sections of the arm will be visible once more, but only the UVs for the upper arm will be selected (Figure 8.36, middle).

4.

Press W to switch to translate mode, and move the selection up, separating the two sets of UVs (Figure 8.36, right).

Now the UVs are separated so we can see them clearly. We next need to combine both sections of the arm, making one complete piece and eliminating the seam between the upper and lower arm sections.

UV Sewing

Since the upper and lower arms are already combined in the 3D view, connecting them in the UV Texture Editor is simple.

1.

Right-click in the UV Texture Editor and select Edge from the marking menu, putting you into edge-selection mode.

2.

Select one of the edges at the base of the upper arm. You will notice that the edge it is connected to in the 3D view is also highlighted in the UV Texture Editor, and its associated edge along the border of the other set of UVs is highlighted.

NOTE

If the two edges do not lie above and below each other, right-click and select UVs; then move the upper arm UVs along until the edges match.

3.

Holding the Shift key, continue across until you have the bottom row selected, as shown in Figure 8.37 (left).

Figure 8.37. Combine the upper and lower sets of UVs.


4.

To weld these edges together, go to Polygons > Sew UVs.

We now have one complete map of UVs unwrapped for the arm (Figure 8.37, left).

UV Cutting and Moving

Look at the UVs of the arm; you will notice an area that sticks out to the left. This needs to be cut off and positioned in the gap on the right, making the UV map clean and easier to read.

NOTE

Depending on how your mapping went, this projection may be severe, but don't worrythe next steps will help you fix this.


Let's first check and see where the seams lie. Select a UV on the border in the UV Texture Editor; this will also show up in the 3D view, letting you see where the seam is. We want the seam to be on the bottom of the arm, so that when the arm is lowered, the seam is not as noticeable. Currently the seam is around the back of the arm, across the elbow.

We have two problems to solve here. We will first cut the UVs where we want the seam to be, moving the remainder over to the right before sewing them again. The following steps are illustrated in Figure 8.38.

1.

In the UV Texture Editor, select a line of edges from the top to the bottom. These will mark the underneath of the arm (Figure 8.38a). To find this line, go to your 3D view and switch to UV editing mode. Then select a UV under the arm; this will also show up in the UV Texture Editor, so you can tell what edges to select.

2.

Now you know where to cut, so go to Polygons > Cut UVs.

3.

Still in the UV Texture Editor, switch to face-editing mode and select the faces to the left of the cut (Figure 8.38b).

4.

Go to Select > Convert Selection To UVs so that we can edit this piece (Figure 8.38c).

5.

Move the selection over to the right. This should fit more or less exactly (Figure 8.38d).

6.

Finally, select the edges where the new join is and go to Polygons > Sew UVs to join them (Figure 8.38e).

Figure 8.38. Edit the UVs to make the layout cleaner.


Now comes the fun part. We have our basic UV map showing us an unwrapped version of the arm. The problem is that some areas are still stretched and do not fit correctly. We're going to edit the UVs individually in the UV Texture Editor, trying to get the grid on the arm as perfect as possible.

The checkered texture works well as a guide. Try to keep the squares square and proportionate (Figure 8.39). This can be a tedious job, but when the UVs are correctly laid out, your texture will not stretch or look incorrect. Once you have spent time painting the texture in Photoshop, the last thing you want is for it to appear warped on the actual geometry.

Figure 8.39. Work on the UVs individually, keeping the squares in the texture square.


NOTE

Keep in mind that you will not be able to remove all of the stretching from the texture. I suggest that you concentrate on the larger areas that will hold detail. The main forearm, elbow, and shoulder will be most visible, whereas the underneath part of her arm won't be seen most of the time.


The arm is done; let's get to the torso UVs.

Torso UVs

We will approach the torso from a slightly different angle, this time we will begin by planar-mapping the front and back before tweaking the UVs in the UV Texture Editor.

1.

Select the front and go to Edit Polygons > Texture > Planar Mapping. Make sure Keep Image Ratio is checked in the options box; this will initially keep the squares in your texture at the correct size. Your torso will now be mapped (Figure 8.40, right).

Figure 8.40. Planar mapping applied to the front of the torso


2.

Flip around to the back of the torso and apply the same mapping with the same configuration (Figure 8.41).

Figure 8.41. Planar mapping applied to the back of the torso


3.

Although these areas look fine when you're looking at them straight on, the sides are stretched. Work on the front first, editing the UVs in the UV Texture Editor (Figure 8.42). Make sure no UVs overlap, particularly around her chest and armpit areas.

Figure 8.42. Edit the UVs for her front, fixing the stretched areas.


4.

When we applied the mapping to Kila's back, it was projected from the front, so in effect the UVs are mirrored. Before you begin editing here, we need to flip all the UVs. Select them all in the UV Texture Editor and go to Polygons > Flip UVs, making sure you select Horizontal in the options.

5.

Now work on the back, removing most of the stretched areas of the texture until it resembles that in Figure 8.43. Try to remove as much as you can here, because Kila will eventually have a tattoo; if the UVs are incorrect, the tattoo will stretch.

Figure 8.43. After flipping the UVs on her back, remove the stretched areas.


The UVs are now nicely laid out for her torso. Next up is the lower body, including waist area, legs, and feet.

Lower Body UVs

To make it easier to generate the texture for Kila's sash and the jeans, we will keep the waist and leg UVs together.

Waist and Legs

The UVs for the waist items and the legs will be edited exactly the same as you did her torso. Let's start with the legs.

1.

As seen in Figure 8.44, first apply planar mapping to the front and the back of the entire lower body.

Figure 8.44. Apply planar mapping to the front and back of her legs.


2.

Using Figures 8.45 and 8.46 as a guide, edit the UVs in the UV Texture Editor. Your goal is to reduce the amount of stretching that can be seen. Remember to flip the UV's for the back of her legs before you edit them.

Figure 8.45. Edit the UVs on the front of her legs.


Figure 8.46. Flip then edit the UVs on the back of her legs.


Feet

The feet are already split into six segments, ready for mapping. You should have front, back, left, right, top, and bottom segments.

NOTE

As mentioned previously, simple planar-mapping of the foot from the side will provide a good enough UV layout for you to texture, because most shoes are identical on both sides. You will then just separate the base of the foot and map this separately in order to apply the tread on the sole. Creating the UVs for the shoe, as demonstrated in this section, should be reserved for feet that hold a lot of texture detail.


1.

Select each portion of the foot and apply Planar Mapping to them all individually (Figure 8.47). Remember to set the Mapping Direction in the options; this will save you time when you are adjusting the projection.

Figure 8.47. With the foot divided into segments, planar-map each section.


2.

Select all the pieces of the foot and look at their mapping in the UV Texture Editor (Figure 8.48a).

3.

The UVs for each piece are overlapping, so, working on each piece individually, select the UVs and move them out of the center, as in Figure 8.48b.

4.

When they are all moved, you can combine the geometry that makes up the foot. Remember to weld the vertices as you do.

5.

With the foot once again a whole object, edit the UVs some more, sewing the sides and front to the top (Figure 8.48c). Make sure all the pieces are the correct sizeremember that you will end up with more detail on areas that are larger.

Figure 8.48. Adjust the layout of the foot UVs in the UV Texture Editor.


As you can see in Figure 8.48d, with the UVs manipulated the foot looks a lot cleaner.

Head UVs

The head is relatively simple to map. As you can see in Figure 8.49, starting with a basic cylindrical map will give us a good starting base.

Figure 8.49. The head after a basic cylindrical map


Kila's eyelashes are going to be solid black, so we will map them separately. If we need to later, we can adjust these UVs so we can apply additional detail.

1.

Select the faces that make up the eyelashes, as shown in Figure 8.50 (top).

Figure 8.50. Select the eyelashes and map them separately.


2.

Because the eyelashes are a basic black, we don't need them to have separate UVs; they can occupy the same space on the texture page. And they won't have any detail, so we can afford for them to use just a small area of the page. So go ahead and apply a basic planar map to them, projecting from the X axis (Figure 8.50, bottom).

3.

While you still have the eyelashes selected, go to the UV Texture Editor window, change the selection to UVs and move them up so they will be above the head.

Figure 8.51 shows the head UVs in their current state. As you can see, the eyelashes are now separate and above the head.

Figure 8.51. The current head UV layout


Let's stay in the UV Texture Editor and work directly on the UVs for the face. The actual geometry of the face has the eyes open, but in the UV layout they should be closed so that we can apply a texture to her eyelids.

4.

As seen in Figure 8.52, manipulate the UVs so that the eyes appear to be closed.

Figure 8.52. In the UV Texture Editor, close the eyes.


Next, you will separate her lips. This will give them nice clean edges, making the texture appear higher in resolution than it actually is. Secondly, it will let you give the lips a larger area on the texture page so that you can implement more detail in them.

5.

In the UV Texture Editor, select the edges that mark the outline of the lips.

6.

Go to Polygons > Cut UVs to separate the lips from the face.

7.

Switch to face selection, and select the faces that make up the lips.

8.

Go to Select > Convert Selection to UVs.

9.

Move the lips away from the face, scaling them up slightly (Figure 8.53).

Figure 8.53. Separate the lips in the UV Texture Editor.


With the main areas complete, continue to work on the head, reducing any stretched areas in the texture. In particular, work on the nose area.

Inner Mouth, Eye, and Ear

Let's stay with the head now and concentrate on the eyes, inner mouth, and ear.

1.

Looking first at the eyes, apply a simple planar map here across the Z axis, scaling the UVs toward the back slightly. This will reduce the stretching along the sides. You can see the result in Figure 8.54.

Figure 8.54. Planar-map the eyeball.


2.

Next, consider the geometry that makes up the inner wall of the mouth. This, too, can have a simple planar map applied to it; this time, however, as shown in Figure 8.55, project it from the X axis.

Figure 8.55. For the inner mouth, project a planar map from the side.


You don't need to unwrap this area of the model, because at most it will have a basic gradient texture applied to it.

3.

You can skip the teeth, which already have pretty good mapping on them. This leaves the tongue. This is another area that will not warrant much detail. This time, we will project the mapping along the Y axis (Figure 8.56). This means we can at least add some detail to her upper tongue.

Figure 8.56. Project the mapping down onto the tongue.


4.

Now you've come to the ear. Again, a simple planar map will work well here (Figure 8.57), but unwrap the UVs that are behind the ear.

Figure 8.57. Planar-map the ear.


We are almost done; there are just a few more areas to work on. Coming up next is the hair.

Hair UVs

The inner layers of the hair already have some basic mapping applied to them. This will allow us to use a single texture to map all of them.

Outer Hair

The only area needing attention here is the outer layer of hair.

1.

As shown in Figure 8.58, apply planar mapping to the outer layers on both sides of the hair, projecting along the X axis.

Figure 8.58. Apply planar mapping to the outer layer of her hair, on both left and right sides.


2.

With the mapping applied, select Kila's left-side piece first and, as illustrated in Figure 8.59, adjust the UVs in the UV Texture Editor.

Figure 8.59. Adjust the UVs for the hair on Kila's left.


3.

Do the same with the hair on Kila's right, remembering to flip the UVs first (Figure 8.60).

Figure 8.60. Adjust the UVs for the hair on Kila's right.


Now comes the tricky part. We want both sides of the hair to be combined againbut if we do it now, the UVs will overlap. What we will do is separate the UVs before we combine them.

1.

First of all, separate the UVs, moving them apart.

2.

Combine both sides of the geometry making up the hair, welding the vertices down the center. With the left and right UVs now separated, we can work on them more easily.

We want to join the UVs across the top of her hair. Connecting them at the part will mean we can keep the flow of the hair while making sure the detail is not broken. So, we need to rotate them.

3.

Select the UVs for one side of the hair and go to Polygons > Rotate UVs, opening up the options. Here you can specify what degree of rotation you wish to apply.

4.

Rotate both sides until the tops are facing each other (Figure 8.61, left).

Figure 8.61. Rotate the UVs for the hair; then sew the facing edges together.


5.

Use the Sew UVs tool to connect the edges down the center (Figure 8.61, right).

6.

With both pieces of the hair connected now, edit the UVs a little more before moving on. Your goal is for the outer hair layer to look like that in Figure 8.62.

Figure 8.62. The outer hair, with mapping


With the main section of the outer hair mapped, our next task is to edit the UVs on the inner side of the hair at the brow.

Inner Front Hair

To complete Kila's hair, we will now map the polygons that make up the inside layer of her hair at the forehead.

1.

As you did in the preceding section, apply planar mapping to both sides of the front area of hair across the X axis (Figure 8.63).

Figure 8.63. Apply mapping to the inner pieces of hair at the brow.


2.

Tweak the UVs, removing any overlapping or stretching areas.

3.

Separate both sets of UVs if they will overlap when the two pieces of geometry are combined.

4.

Combine the meshes, welding the vertices down the center.

5.

Next, you will join the two sections of UVs, using the center as the connecting point. Rather than having to manually move one set of UVs to the other, Maya will do it for you. In the UV Texture Editor, select the edges that connect, as seen in Figure 8.64, left.

Figure 8.64. Use Move and Sew UVs to weld the separate UVs.


6.

Go to Polygons > Move and Sew UVs. What you will see is that the smaller piece has not only been welded to the larger one but has moved, too (Figure 8.64, right).

As shown in Figure 8.65, the inner pieces of the front hair are now complete.

Figure 8.65. Hair UV mapping applied and adjusted at the forehead


To finish the UV work on the Kila model, we still need to work on the hands and the belt. Let's look at the hands next.

Hand UVs

The hand is another area to which applying mapping is relatively simple.

1.

Begin by applying planar mapping downward on top of the hand, adjusting it to match the orientation (Figure 8.66).

Figure 8.66. Planar-map the hand, projecting down onto it.


TIP

You can select both the top and bottom of the hand and apply the mapping to both areas at the same time.

2.

As shown in Figure 8.67, first work on the top half's UVs in the UV Texture Editor. Move the UVs for the sides of each finger outward, so you can add a bit of detail to them when it's time to draw the texture.

Figure 8.67. Adjust the UVs of the top half.


3.

Do the same for the bottom of the hand, remembering to flip the UVs first.

The finished hand should look like that in Figure 8.68.

Figure 8.68. The hand mapping is complete.


Belt UVs

The final lower-body area to address is Kila's belt. Initially, the mapping here was fine (because this item of clothing was created from a basic cylinder, it had inherent mapping). We have since then adjusted it slightly, adding more geometry to the back of the body, so we need to address the resulting alterations in UVs.

1.

Select the belt and look at its UV layout in the UV Texture Editor (Figure 8.69).

Figure 8.69. The belt's UV map


You can see the main belt area in the centerthe section that looks kind of like a UFObut there are also lots of oddly shaped boxes around it. These are from the extra polygons you created on the inside of her belt. To start with, you will move these boxes away from the main belt's UVs, making it easier to work on them.

2.

Go back to the 3D view, and select the faces you added to the inside of the belt (Figure 8.70). This will highlight them in the UV Texture Editor.

Figure 8.70. Select the belt's inner faces.


3.

Now that the faces are emphasized, go back into the UV Texture Editor and go to Select > Convert Selection to UVs. Follow the illustrations in Figure 8.71. Move the selected UVs up, away from the main belt's UV layout (Figure 8.71b).

Figure 8.71. Edit the belt's inner mapping, matching it with an appropriate section of the belt.


4.

The shapes of the boxes need altering, to make them cleaner and more uniform. To help with this task, make sure the grid is visible by going to View > Grid.

5.

Select the UVs for each corner and, holding the X key, snap the UVs to points on the grid until they all match the same rectangular shape. You want it to look as if only one rectangle exists (Figure 8.71c).

The texture for these inner sections of the belt can be the same as part of the outside, so what you can do next is move these UVs to the same place as a section of her beltbut which section?

6.

Select a face on the outside of the belt (Figure 8.72). We'll use this section because it will have a basic texture applied to it, so no one will notice it's the same on the inside. If we were to use the front, where the buckle will be, then that texture would be repeated on the inside, which would look wrong.

Figure 8.72. Select a face on the outside of her belt.


7.

With the face selected, go back to the UV Texture Editor, converting the selection to UVs (Figure 8.71d).

8.

Now that you know where to move them to, hold down the V key and snap the UVs for the inner belt to the selected ones on the actual belt, as shown in Figure 8.71e.

9.

All that's left to do now is edit the UVs for the top and bottom of the belt (Figure 8.73).

Figure 8.73. Adjust the top and bottom UVs for the belt.


Figure 8.74. The belt's final UV mapping


We now have basic UV mapping applied to the entire meshbut before we can sign it off as complete, some adjustments are needed.

Extra Mapping Adjustments

There is one final thing to do before we can finalize Kila's UV work. On any normal model, we could use the same mapping for the left and right arms, essentially having to draw only one arm. Kila's arms are different, however; one has a tattoo. So we will need a separate set of mapping for each arm. The tattoo extends down onto her hand, so we will also need a separate set of mapping for them.

1.

Duplicate and mirror the current arm and upper hand (Figure 8.75). Then go to Modify > Freeze Transformations; this will reset the 1 value on the Scale X attribute back to 1.

Figure 8.75. Duplicate and mirror the left arm and upper hand.


2.

Although you have duplicated these pieces of geometry, the UV coordinates they hold will still be the same. To fix this, first flip and then move the UVs so they no longer overlie the ones on the left side. Flip the arm UVs vertically, and do the hand UVs horizontally.

You can see the adjusted UVs in Figures 8.76 and 8.77.

Figure 8.76. Flip and separate the UVs for the new arm vertically.


Figure 8.77. For the new hand, flip the UVs horizontally before moving them.


The basic UVs are mapped now. As you can see in Figure 8.78, Kila's mapping is looking cleaner than the original. Currently, the squares of the grid are differing sizes, indicating that some areas occupy more texture space than others. This is not a problem, however; we can address this in the next section when we reposition the UVs so that they can be exported to an image file using UV Snapshot.

Figure 8.78. Kila, fully mapped but not finished


Exporting the UV Positions

With the help of Maya's UV Texture Editor, we can export the UV positions as a bitmap to use as a handy guide for creating the texture. First, we need to rearrange our UVs, attempting to fit them all into a square while making sure they don't overlap.

UV Management

When the model is finished, she will be combined into a single piece of geometry. With that in mind, let's see how the UVs will look.

1.

Select all of Kila's geometry and take a peek in the UV Texture Editor.

As you can see in Figure 8.79, things are a bit of a mess. You can make out a few of the body parts, but there is no chance you could draw onto this image and create a successful texture map.

Figure 8.79. Kila's current UV mapping


2.

Spend some time selecting each separate piece of geometry and moving the UVs out, so you end up with everything laid out as seen in Figure 8.80. Each piece is now separate. This looks much betteryou can tell what each part is.

Figure 8.80. The untangled UVs


The next problem to address is one of priority. At present the eyeball UV's are larger than her head, meaning the eye will have much more detail in the final texture. This is clearly wrong; you need to adjust the scale of each set of UVs, enlarging areas that need greater detail.

3.

To scale the UVs, simply select the piece of geometry in the 3D view. Then, in the UV Texture Editor, right-click and select UVs. Select all the UVs and press R to switch to the Scale manipulator.

While you are doing this scaling, you can begin to rearrange the UVs into their respective texture pages. Use the main grid to help you place them. Our budget is two 512x512 texture pages, so we can make use of this by dividing the UVs into three separate pages.

NOTE

As a general rule, texture pages must conform to specific sizes, in powers of 2 (2, 4, 8, 16, 32, 64, 128, 256, 512, etc.). To be certain of what you are required to use, consult your manager.


4.

The first page to set up will contain the main head and hands, along with the feet and belt. This will be exported as a 256x256 texture page.

5.

In the next page, place all the main body parts. This will be a 512x512 page because we will need more detail in the body.

6.

Place the hair on a third texture page, also 256x256 in size. Parts of this page will be transparent, so we will keep it separate.

You can see the final UV layouts in Figure 8.81.

Figure 8.81. Kila's UV layout


There is one final adjustment we will make before we complete the mapping process: splitting the UVs in the T-shirt.

Divide the Shirt

What we want to do now is split the UVs at the base of Kila's crop-top. This is necessary because, with the UVs attached, some of the color from her shirt may bleed through onto her stomach.

1.

Select the edges across the base of the T-shirt, as shown in Figure 8.82. Go to Polygons > Cut UVs to cut them.

Figure 8.82. Create a gap in the UVs between her shirt and stomach.


2.

Select the faces that make up the bottom section of the torso. Convert the selection to UVs by going to Select > Convert Selection to UVs.

3.

Move the selected UVs down slightly, creating a gap.

With this final adjustment made, we have completed the process of mapping UVs onto Kila. As you can see in Figure 8.83, the squares are now much more uniform in size. All we need to do now is export the UV layout, baking it out as an image we can use as a guide when we draw her texture.

Figure 8.83. Kila with her final UV mapping


Taking a UV Snapshot

Using the UV Snapshot tool, we can export the UV layout as a bitmap, which we can then take into a digital imaging application to use as a guide for our texture.

1.

Select the elements that make up the first texture page. These should be the head, eye, teeth, inner mouth, hands, tongue, shoe, eyelashes, and ear.

2.

Look at Figure 8.84; these elements are already positioned correctly. To create a UV snapshot, the elements you want to capture must lie in the upper-right corner of the grid. This is the only area that Maya considers (positive 0 to 1 texture coordinate space) when saving out a UV snapshot image. Anything outside of +1u, +1v is ignored.

Figure 8.84. The head UVs in the correct position


So you are ready to create the base for the first texture page.

3.

In the UV Texture Editor, go to Polygons > UV Snapshot. This opens the options dialog box seen in Figure 8.85.

Figure 8.85. The UV Snapshot dialog box


4.

This first texture is going to be sized at 256x256, so make sure the Size X and Size Y options are set to this.

5.

Click Browse, and point to where you want the texture to be stored. Call it KilaHeadUV.tga.

6.

Make sure Anti-alias Lines is not enabled; this will make the UV lines exported easier to manage and follow. Click OK, and the UV image will be created.

Before we look at the snapshot, let's create the base images for the other two texture pages.

1.

Select the elements that made up the body page. This includes the legs, torso, and arms.

2.

Move these UVs up to the upper-right corner of the grid (Figure 8.86); then open up the UV Snapshot options.

Figure 8.86. Move the body UVs into position to take a snapshot.


3.

This time set the Size X and Size Y to 512.

4.

Specify your place to save, naming it KilaBodyUV.tga, and click OK.

5.

Finally, do the same with the hair UVs, saving these at a size of 256x256 with the name KilaHairUV.tga.

You should now have three images that you can use to guide you in creating your textures. These are shown in Figure 8.87.

Figure 8.87. The three exported texture pages


The UVs have been successfully mapped and exported. What's needed now is to piece some of Kila back together and combine her.

Recombine the Character

To begin, we need to create duplicates of the lower hand, the foot, and the eye.

1.

We can mirror the hand and foot; go ahead and do this. But the eye must remain the samesimply copy this and move it across to where the right eye should be.

2.

At this stage, we will only combine the main body. This will include the torso, legs, and arms. Make sure you weld the vertices afterward.

When mirroring and combining geometry, you must check the normals in particular. These are the directions in which each face is pointing. At present, she looks fine, but that is because Maya is displaying her as double-sided.

3.

To check the normals, select the mesh and open up its attributes by pressing Ctrl+A.

4.

Scroll down to the panel labeled Render Stats and open it up. Uncheck the checkbox labeled Double Sided.

5.

Now look at your mesh; do any areas appear inside out? You can quickly fix them by going to Edit Polygons > Normals > Conform.

In most cases, all the polygons in the object will now be facing the same direction. If the problem remains, try selecting the faces and running Edit Polygons > Normals > Reverse, making sure the options are set to Reverse.

The Kila model is fully prepared now and ready to be textured. Delete the history and save the file as Kila_Mapped.mb.

Mapping Grae

Using what you have learned in this chapter, load the divided Grae model (Grae_Divided.mb), and see if you can apply UV mapping to him.

TIP

If you are having trouble mapping an area, try dividing it further into more basic shapes, such as cylinders or planes. This will simplify the task of applying basic UV mapping. Concentrate then on getting each piece looking correct before combining them all again.


Figures 8.88 and 8.89 show my finished Grae model and UV maps, which we can use in the next chapter. You can find this file on the CD as Project Files/08/Grae_Mapped.mb.

Figure 8.88. Grae with full UV mapping


Figure 8.89. Grae's exported texture pages


NOTE

Exporting the UV maps does not mean that they are set in stone. You can edit them further if you like, as will be demonstrated in Chapter 9, "Texture Painting." Just remember that the images you export are the UVs at that stage, so if you drastically edit them before texture painting, you may need to re-export the maps.


Summary

You now have the two models completely mapped and ready to be textured. This chapter on UV mapping has given you substantial knowledge and experience with Maya's UV editing tools, and you've created a basic material.

During the next chapter, we step outside Maya and, using the UV snapshots generated here, we'll draw the textures for our characters





    Game Character Development with Maya
    Game Character Development with Maya
    ISBN: 073571438X
    EAN: 2147483647
    Year: 2004
    Pages: 169
    Authors: Antony Ward
    Simiral book on Amazon

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