Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Design

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

The Hair of the Jerk

For the hair of The Jerk, the overlapping action rig setup was used (loaded straight from the finished example file from Chapter 13, "Making Advanced Connections"). This was simply imported from the completed file from Chapter 13, chapter13_OverlappingAction_finished.mb, and then was translated, rotated, and scaled into place using the TRANS_ROTATE_SCALE_MATRIX node. Then the mainAttachNode was constrained to the end of the head hierarchy to attach it to the main skeleton. See Chapter 13 for a detailed step-by-step tutorial on how to create this dynamically driven floppy IK setup.

NOTE

If you do not want the dynamics mode of this rig during actual animation testing, you can turn the dynamicFlopOnOff and addMoreFlopiness attributes found on the FloppyChainContoller locator node to 0 until the actual playblasted animation occurs. Then you can begin testing how high you want to set these attributes. Note that because this portion of the rig is using soft body particle dynamics, it is necessary to start the animation at least 10 to 15 frames earlier so that the dynamics get a chance to calculate their initial position correctly.

Smooth Binding Proxy Geometry

The characters were modeled using subdivision surfaces in Maya, but when it came to production, we chose to convert our properly modeled sub-d meshes into medium-resolution polygon meshes for the purposes of our rendering pipeline going out to Mental Ray. We were also fortunate enough to not need to deal with the hassle of binding Maya's sub-d surfaces or doing any deformations on sub-d geometry at all because we had a pure polygon conversion before skinning occurred. I strongly recommend doing things this way, unless there is a strong reason to not to. The level of simplification on a geometric level becomes a real time saver and improves the quality of your final result.

This might not be the case for some productions using Maya, though. Because subdivision surfaces are going for a full-blown implementation in Maya, I have included the workflow that is involved with rigging a character that is actually built from Maya's native subdiv mesh node. The following exercise was not necessarily used for our production, but it is an important step to take if you are planning to skin a subdivision mesh in Maya.

The basic premise for the workflow is this: We do not want to bind the Maya subdivision surface itself to the joint's skinCluster because it will be much too slow to deform or to paint weights onto. The difficulty of working with the model is truly overwhelming when compared with simply binding the polygon control mesh shape node. You will bind only the joints that need to deform the character by implicitly selecting them and then selecting the polygon control mesh shape node, instead of binding directly the subdivision surface.

Exercise 17.12 How to Bind a Subdiv Mesh's Polygon Proxy Control Mesh

This exercise was written to work with any character as a general workflow tutorial. Therefore, it is not file-specific. You will simply need to start with a scene that contains any Maya subdivision surface geometry and some joints to bound the geometry onto.

  1. Go to your current 3D view panel. Under the Show menu, turn off everything except joints. This makes it easier to see and select only joints.

  2. Carefully select only the joints that are important for the character to deform.

  3. This means that anywhere there are overlapping or point-constrained joints, select only the single joint that should be causing the deformations. Never select two joints that are overlapping (double joints). You also usually don't need to select the tips of the joint hierarchies. Keep the Hypergraph open to make sure you are selecting only the joints you need. The fewer joints you select, the fewer you will have to paint weights for later.

  4. When you have made sure your selection is correct, save a quick-select set by going to Create, Sets, Quick Select Set. Call your new set bindJoints. This is just a way of saving a selection so that you can go back and select it again later.

  5. Now select the subdivision character and open the Hypergraph window. To select the polygon control mesh, you must be in Scene Hierarchy mode of the Hypergraph. Turn on Options, Display, Shape Nodes by making sure there is a check box next to it in the menu window.

  6. Next, you should see two shape nodes. One is a subdiv shape that is being fed its data by a polyToSubdiv node (which you can see if you select it and click Graph, Input and Output Connections). Below it is another shape node, which is a polygon mesh shape. The polygon mesh shape node is your poly control cage (as seen in Figure 17.67).

  7. You can select the polygon proxy control mesh of your native Maya subdivision geometry by viewing the shape nodes, as previously stated. Or, you can find it in the tangled node network that shows up in the Input/Output Connections view of the Hypergraph. Or, you can use a quick MEL command by selecting it in the View window and executing the following line in the Script Editor window:

    select Ðr 'listRelatives -c -type mesh';

    NOTE

    If your subdiv surface is not in polyProxy mode, you will need to switch it to this mode before any of this will appear. Select your surface and go to Subdiv Surfaces, Polygon Proxy Mode.

    Figure 17.67Figure 17.67 Viewing geometry shapes with the Hypergraph.

  8. With the polygon shape node visible in the Hypergraph, select your bind joint selection set by going to Edit, Quick Select Sets, bindJoints.

  9. Hold down the Shift key and select the polygon shape node in the Hypergraph.

  10. Go to the options for Skin, Bind Skin, Smooth Bind Options Box, change the Bind To options to Selected Joints, and hit the Bind Skin button.

  11. Before you can paint weights, you must assign a shader to the poly proxy mesh. Select the poly proxy control mesh again. Open the multilister, right-click the initialShadingGroup, and choose Edit, Assign.

  12. Under your current 3D view, go to the Show menu and turn off Subdiv Surfaces. This makes it easier to deform your character and visibly see what is going on.

Painting Smooth Skin Weights

Painting weights is one of the single most important stages for your character's deformations to look believable and appealing. The process of painting weights basically involves using the Artisan paint brush architecture in Maya to paint on a value somewhere between 0 and 1. This will tell your skin cluster which joints will have an influence on the movement of which vertices.

The following text describes the process I use to paint weights on a smooth bound character. Then following exercise elaborates on the specifics involved to achieve good character weighting.

First, just as if you were doing a painting, rough in your general values by blocking out your weights, going through groups of vertices as well as each joint, and flooding them with either 0 or 1 values. Next, paint with a medium-size brush around the edges of your weights so that all the influences are at a value of 0 or 1. When you are finished and you have painted every single joint at either 1 or 0, you set the Artisan value to 1 but turn the opacity down to about .33.

Then go through and lightly soften the edges of all your weights by painting with this partially opaque brush. Every once in a while, use the smooth brush at this stage to also soften the edges. The last stage is to go through and use the smooth brush exclusively to really soften the weights on the joints that you want to have a lot of fall-off to their weighting. During this entire process, you should be testing your character's deformations by bending the joints and testing the controls. When you get things looking pretty good, you should do major motion and extreme poses for your character; test the weighting on an animated character that is hitting really exaggerated poses (with hands way up in the air, bending over and touching the head to the toes, and so on). At this point, you can go back and paint in the weights to fix any problems you see.

As a general workflow process, painting weights can seem somewhat repetitive, tedious, and often frustrating. It can feel like as soon as you change one joint's weights to look good in one pose, the other pose no longer works. It is important to note that sometimes it is simply a process of finding an acceptable state in between. Usually, though, if you follow the workflow outlined in the steps ahead, the painting of your character's weights should end up being a very smooth process (no pun intended!).

Exercise 17.13 Common Workflow for Effectively Painting Smooth Skin Weights

  1. Select the smooth-bound polygon mesh and begin to paint weights using the Artisan options found under the Skin, Edit Smooth Skin, Paint Skin Weights Tool options box (see Figure 17.68).

  2. Select the bound character. Under Skin, Edit Smooth Skin, Prune Small Weights (with a setting of about .4), get rid of all traces of pointlessly weighted vertices before you begin your weight painting. This enables you to see exactly which joints are the major influences deforming the geometry of your character. You will have a better idea of which joints you need to paint weights for the most (see Figure 17.69).

  3. Figure 17.68Figure 17.68 The Paint Skin Weights menu.

    Figure 17.69Figure 17.69 Painting weights with Artisan.

  4. Deform the character by placing it into several extreme poses and setting keys across the timeline.

  5. A common sequence of poses during this phase would be a "jumping-jack" sequence, with the character's legs and arms reaching their full upward and downward extensions. This is known as range-of-motion testing. You want to paint the weights for your character so that they look decent even at the most extreme poses. This way, you will be sure that they will look good when the animators pose the character in a more normal, expected pose (see Figure 17.70).

    Figure 17.70Figure 17.70 Testing deformations while painting weights.

  6. Paint the weights for only half of the mesh, until deformations are acceptable on that half. I almost exclusively use Replace mode and Smooth mode in Artisan to paint skin weights. These modes are set in the Paint Weights section of the Paint Skin Weights tool options.

  7. When you have the weights painted for half of the character, select the skin and use the Mirror Weights feature under the Skin, Edit Smooth Skin, Mirror Skin Weights options box (see Figure 17.71). Be sure to use the correct axis settings that you want to mirror across.

    Figure 17.71Figure 17.71 Use the Mirror Weights feature to create your mirrored weights.

  8. Now you can clean up your mirrored weights (they never come out perfect) by checking all the deformations and going through the same steps that you did previously to make sure all your weights are perfect on both sides. Painting precise and sparing brush strokes with the Smooth mode of the Paint Weights tool only where it's needed is crucial at this stage for really well-painted smooth skin weight deformations.

TIP

Use the Toggle Hold Weights on Selected button in the Paint Weights window to keep a joint's weights from changing after you have painted them (see Figure 17.72).

Figure 17.72Figure 17.72 Using Toggle Hold Weights.

Paint Weights Using per-Vertex Selections

You can use the Skin, Edit Smooth Skin, Paint Skin Weights tool on a per-vertex level as well as an entire object level. Many people are not aware that you actually can use the Paint Weights tool on a per-vertex level by selecting the vertices and loading the paint weights tool. This is extremely useful when you first start painting the weights on your character and you are trying to lay out your initial weights, or when you are trying to "point-tweak" certain vertices and leave others alone. Select the vertices whose weights you want to change, and use the Flood button to flood those vertices in Replace mode with a value of 1; this is a great first step at very quickly roughing in your character's weights. You can then go in and use low opacity in Replace mode with a value of 1, as well as Smooth mode with flooding, to really disperse the gradual fall-offs of your joints' weighting.

Sometimes it is difficult to paint or select the correct vertices on a character that you are trying to change the weights on because those areas are in little crevices, such as under the armpits, in folds of skin, between the legs, or between crevices in fingers. These most difficult areas to paint the weights on also end up becoming the most crucial areas for making the best-looking deformations on your character. So, having a quick and easy way of selecting and editing these areas ends up being crucial as well. A great tip for selecting these difficult vertices of your polygon character is to use the UV Texture Editor, but still select it using Vertex Component Selection mode. The geometry is literally unwrapped in UV space. If your modeling and texturing departments have done a good job laying out your UVs, the process of selecting vertices using this unwrapped representation of your character becomes an extremely quick and easy trick to use.

Figure 17.73 shows difficult vertices to select in 3D space and the exact same vertices selected in UV space. This is an example of how much easier and quicker it can be if you have the right UV layout at hand.

Figure 17.73Figure 17.73 Using the UV layout to quickly select vertices.

Using Additional Influence Objects

The smooth binding in Maya works quite nicely because it enables you to use multiple influence objects. It even allows geometry to become an influence object that you can paint weights for.

Although it wasn't necessary to use influence objects for our character rig, I highly recommend using them to achieve complex deformations. Check them out in the Maya documentation. You create an influence object from any transform node in Maya by selecting the smooth bound mesh and then the object that you want to become an influence. Then you choose Skin, Edit Smooth Skin, Add Influence (see Figure 17.74).

Figure 17.74Figure 17.74 The Add Influence menu command.

When you have finished painting weights and you have done all the other steps necessary to finish setting up your character, such as parenting low-res geometry and creating control boxes (as explained in earlier sections of this chapter), you are ready to hand off your file to the animator.

  • + Share This
  • 🔖 Save To Your Account