Weighting the Model

After you've added the bones to the Skin modifier, they're linked to the mesh, and you're free to grab them and move them, which in turn should drive the mesh that surrounds them. However, before you move the bones, you need to be sure that the envelopes of the bones equally surround all vertices of the mesh, so that the mesh moves smoothly at each bone location of the Hicks model's body. Also, stray vertices that weren't included in an envelope stick in 3D space and don't move with the bones, preventing the Hicks model character from working

Figure 7.16 The attached biped, displaying the skin envelopes.

Command Panel properly (or at all) in the game engine. Following are the steps for adjusting the weights (balance of bone usage) of the vertices:

1. To make viewing the weighting much easier, make the mesh solid by going to the Display panel and unchecking the See-Through option in the panel's Display Properties section. Next, in the Display Color section at the top of the Display panel, check the Shaded: Object Color option. This makes the Hicks model mesh a solid color (see Figure 7.17).

You can turn off the grid by clicking Views: Show Home Grid in the top menu bar. This makes your workspace even less cluttered.

2. Now go back to the Modifier panel and select Envelope in the Skin modifier. The currently selected bone should display its envelope as varying shades of light yellow (least influenced vertices for that bone) to dark

Command Panel

Figure 7.17 Select the Hicks model mesh, and in the Display panel, select Shaded: Object Color. Press F3 to see the flat, shaded Hicks model.

red (strongly influenced vertices) (see Figure 7.18). The various shades represent the weighting of the skin (mesh) for that particular area. Try selecting different bones from the list to see their influence on the vertices of the mesh. Also, by pressing F3, you can switch back and forth between the solid rendered mode and the wireframe mode that shows the vertices.

3. Click on each bone and look at the weighting around that area. Check for bones that are taking up too much weight on vertices that don't really belong to them. For instance, in my situation, the head is covering vertices that belong to the Hicks model's back (see Figure 7.19). In a case like this, it's necessary to adjust the envelope for this bone so that it covers only the head of the Hicks model.

Figure 7.18 By clicking on a bone, you can see various shades of color that indicate the bone's preference to the vertices nearest its area.

4. In the Skin modifier's rollout, just below the bone list, is an Envelope Properties section. By changing the Radius value, you can effectively increase or decrease the size of the envelope. Or, you can click on the Move tool and then click on any one of the envelope's control points to move or scale them. In Figure 7.20, I selected the outer envelope points and reduced the Radius value, which effectively occluded the vertices of the back.

5. Sometimes it's hard to see if there are any stray vertices that aren't enclosed by an envelope. Try this: Click on the Skin portion of the Skin modifier to exit envelope mode, click on the Select by Name button at the top of the screen, and then select the hand bone. Use the Move tool to swing the Hicks model's arm forward. Notice in Figure 7.21 the stray vertices that need to be encompassed by the hand's envelope. They seem to stick in place.

Figure 7.20 The adjusted head's envelope.

6. With the arm still swung outward, I went back to the Envelope portion of the Skin modifier and adjusted the hand's envelope to extend a little further beyond the fingers. In a flash, the stray vertices got sucked back in, becoming part of the hand bone's control (see Figure 7.22). The stray vertices, in this case, are the byproduct of the finger bones not being included in the envelope list.

7. Continue checking the rest of the bones for stray vertices. Pressing F3 to enter wireframe mode is another good way to do this, because the strays will not show up in colored envelopes, but will instead be a blue-colored vertex. Just play around a bit with the bones, and see how the mesh behaves around them. Also, adjusting the envelopes where one bone meets another can improve on the bulge of the mesh when the bones are flexed.

Figure 7.21 By moving certain bones around, you can detect stray vertices that need to be encompassed by the bone's envelope.

Figure 7.22 By adjusting the hand's envelope near the end, the stray vertices are sucked in to the hand and corrected.

Figure 7.21 By moving certain bones around, you can detect stray vertices that need to be encompassed by the bone's envelope.

Figure 7.22 By adjusting the hand's envelope near the end, the stray vertices are sucked in to the hand and corrected.

8. Another way to adjust the weighting of the vertices is by using the Paint Weights option in the Skin modifier's envelope rollout. For instance, press F3 to enter wireframe mode, and look at the back area. I'd like to have the pelvis bone take control of this area, because the back doesn't do much else aside from following the pelvis in motion. With the Paint Weights button active, click the ellipse button to bring up the Painter Options screen. Here you can adjust the brush size and strength, along with about a billion other parameters. Change both the Max Strength and Max Size to 0.2; doing so makes the painting brush a small crosshair with not so much strength. Then, with the pelvis bone selected, just click and drag over the back area to paint the weighting onto the vertices (see Figure 7.23). The Paint Weights option is handy if you're positioning bones and notice weird or improper bulges between them. By painting on these affected areas, you'll dynamically see the bulges shift around accordingly.

When painting weights, you can press the Alt key to remove the weight from the selected vertices.

Figure 7.23 Use the Paint Weights option in the Envelope rollout to manually paint the vertices of the tail to be included with the pelvic bone.

9. This feature probably should have been explained earlier, but you can also mirror the skin weights between one-half of the skin to the opposite half. Did you notice that the biped is colored green and blue, with all the green bones on the right and all the blue bones on the left? If you click on the Mirror Mode button, you have access to several buttons that let you copy the bones or weights from the blue side to the green side and vice versa. This way, you only have to set the weights for half of the Hicks character and then use Mirror Mode to copy the weights to the other side. After setting all the vertex weights for the right side of the Hicks character, click on the Mirror Mode button and then click on the Paste Green to Blue Verts button (see Figure 7.24).

10. One final way to adjust skin weights is with the Weight tool. Just under the Edit Envelopes button is an option that lets you select vertices. When this

Paste Green to Blue Verts button

Paste Green to Blue Verts button

Figure 7.24 Use Mirror Mode to copy all the skin weights on the right side to the left side.

option is selected, you can drag over the vertices in the scene. With a selection of vertices, you can use the Weight Tool dialog box (see Figure 7.25) to change the vertex weight by clicking on a button. This dialog box also lets you scale the weights, shrink, grow, ring, and loop the selection of vertices. You can also copy and paste weights between vertices.

Continue adjusting weights all over your model until you're satisfied. Then save your scene as a MAX file.

Figure 7.25 The

Weight Tool lets you change the weight value using a button click.

0 0

Post a comment