Editorial Policy
   Contact Information
   Advertising Info
   Publicist Info
   Privacy Statement
   Contact 3Dgate

Tutorial • October, 1998

Maya, Part Three

Organic Modeling and Animation

by Alex Alvarez

3D Design's exploration of Maya, Alias|Wavefront's character development and film effects software, concludes with Part Three, as we look at skeleton-driven surface deformations and body and facial animation workflow, including techniques for animating high-res character models, sound synchronization, and dialogue.

Maya's toolset for high-resolution character deformation and animation offers great precision, flexibility, and intuitiveness. With PowerAnimator, the performance with such detailed geometry seriously hindered productivity, as the package had no built-in solution for working with heavy-duty models. Setting up deformations was slow in both set-up time and performance. There was very little room for spontaneity as everything needed to be planned and synchronized. One had to create low-res versions for different aspects of the model and split them into different project files. I would animate the face in a separate module called SoundSync, animate the head and neck rotations in PowerAnimator, the low-res body in another project file, export the animation curves from these projects to disk, and finally import the anim data into the high-res "hero" file for rendering.

In this final segment, I will be concentrating on animation set-up and workflow for my character Lanker. The tools we will be using Bindskin, Clusters, Lattices, Sculpts, Flexors, Blendshape, SetDriven Key and Layers, all of which are features found in the base module of Maya.

Section One: Attaching Lanker to his Skeleton
With the skeleton complete (see Part Two), we now need to set up our skeleton-driven surface deformations. While we still have PowerAnimator style clusters (groups of vertices), the focal point of Maya's new found character animation strengths are the incredibly powerful and versatile methods for designing deformations.

When dealing with rigid characters, such as a robot, geometry can simply be parented to the joints. But with deforming characters such as Lanker, clusters must be created on the geometry, and it is the clusters that are parented to the joints. These clusters can be groups of the geometry's vertices or groups of a lattice's points, meaning that a lattice is first added to the geometry and then a cluster is added to the lattice.

Figure 1. After selecting the leg geometry and joints, Bindskin is used to create the clusters seen here, parented to the joints.

While clusters can be created manually as illustrated in Part One of this series, Maya offers a tool called Bindskin, which automates this process. Figure 1 shows the result of selecting the hip, knee, ankle and ball joints, selecting the leg geometry and invoking Skinning/Bindskin. Figure 2 shows the result of selecting the same joints, but instead of selecting the geometry, a lattice was first assigned to the geometry and the lattice was bound. The options chosen within the Bindskin dialogue box were SelectedJoints and Closest Point binding. The latter option is telling Bindskin to create clusters for us on the selected surface(s) or lattice where one cluster is created per bone. The points selected by the software for inclusion simply depends on proximity. This first step gives us a good start, yet there are a few issues remaining such as tucking, bulging and case specific deformations such as the bulging that may occur in the thigh if Lanker sat down in a chair. An important note at this point is that one must be able to get the skeleton back into the pose it was in when bound for later editing reasons. The techniques for storing skeletal poses illustrated in Part Two of the series are useful for this purpose.

Figure 2. Instead of attaching the leg geometry directly, a lattice was created first, which itself was bound to the skeleton with Bindskin.

With the basic attachment of the leg geometry to the skeleton, it is important to understand what happened and how to edit this initial phase. By opening the hypergraph, it is evident that clusters were created on the geometry and parented to the joints. But the thing to note is that the clusters that are created by Bindskin are not weighted, thus when we bend the leg the knee deformation looks inaccurate. Figure 3 shows the effect of selecting the hip joint and invoking Deformations/Edit Membership so that we can view the clusters and modify which joint clusters the vertices belong to. The vertices highlighted in yellow are associated with the selected joint, while the other vertices are color coded so that we can distinguish how the clusters were made. We can now add/remove vertices from the selected joint by shift/control dragging around the target vertices. Once we are happy with the cluster allocations, we can continue to fine tune the deformation by now editing weights using the Set Editor as shown in Part One of the series. Figure 4 shows the knee with the default weights of 1, and then with the vertices near the nearcap weighted to .5.

Figure 3. The Edit Membership tool is used to quickly add and remove members from clusters and lattices.

Figure 4.
The leg on the left shows the clusters after Bindskin. On the right, the vertices near the knee have had their cluster weights modified to 50% to improve the appearance of the knee deformation.

While we could continue editing vertex weights one by one, this can clearly become a time consuming process as it was in PowerAnimator. Maya, however, offers some flexibility at this point. The next thing we can do to the leg is to add flexors. Flexors are created by selecting a joint and choosing Skinning/Create Flexor, which will automatically open a dialogue box seen in Figure 5. (Note: It is important to make sure the skeleton is in its "bind pose" before adding flexors). There are three types of flexors that can be added: Lattice, Sculpt and Joint Cluster. These can be added to either a joint or bone, where if a joint is selected, the bone that descends down from it would be the modified bone. A joint flexor is used for knees, elbows and so on, while a bone flexor is used for biceps, triceps, etc.

Figure 5.
The knee joint is selected, Skinning/Create Flexor is invoked, and the dialogue box appears. Flexors are used to interactively design bending and bulging.

What happens when a JointCluster flexor is added is that the weights of the pre-existing clusters are modified (i.e., no new object is created) so that they fade through the joint. Figure 6 illustrates this as the weights of the vertices are no longer all at 1. The enveloping of where the fading begins and ends can be controlled by selecting the "J" now visible at the joint and editing its attributes in the attribute editor.

Figure 6.
A joint Cluster Flexor is selected and edited using the ShowManipulators tool, to control the fading of cluster weights at the knee.

Sculpt flexors are no different than manually adding a Sculpt deformer to the geometry and then parenting this Sculpt to the joint. The technique to use when the Sculpt flexor is created is to use Set Driven key so that as the joints bend, the Sculpt flexor(s) becomes more pronounced by either transforming, scaling, rotating or changing strength and falloff. This can be very effective for elbows and kneecaps, where a few sculpts could be added to create the knee cap definition that appears as the knee bends as in Figure 7.

Figure 7. Sculpt Flexors are used to design the knee deformation by creating a relationship between them and the knee joint's rotation. This is accomplished using Set Driven Key.

The last flexor is the lattice, where a new lattice is created around the selected joint or bone. When first created, the lattice may appear a bit oversized for the geometry, however, that is the reason for the "position the flexor" option when creating a lattice flexor. When this option is checked, the lattice can be moved, rotated and scaled to better suit the geometry as in Figure 8. The nice thing about lattice flexors is that the equivalent of Set Driven Key is built in. When we bend the knee, for example, we can see that the lattice has already modified our deformation by smoothing out the affected area. But if we select the lattice, its unique attributes such as "rounding" and "creasing" will appear in the channel box for editing. If we modify these to interactively design the deformation as in Figure 9, when we straighten the leg back to its "bind pose," the flexor assumes its original, neutral, shape. We could, however, tweak the effect even more by layering some Set Driven Key relationships between the knee joint's rotation and the actual position of the lattice flexor's points. A useful tip at this point is that if there are not enough divisions in the lattice flexor, its unique attributes may not work. At least four divisions must exist in S,T, and U (the three directions for lattice divisions) for all rounding, creasing, etc. to work.

Figure 8. A lattice Flexor can be translated, rotated, and scaled to better position it in relation to the geometry.

Figure 9. Lattice Flexors have unique attributes that can be modified when the leg is bent. When the leg is straightened, the lattice will assume its original shape.

Once the clusters, vertex weights, and flexors have been added and tweaked, the next level of control that can be added is Blendshape. As shown in Part One, Blendshape is a morphing tool that offers a high level of interactivity and flexibility. Figure 10 shows copies of each of the three surfaces that make up the leg moved over to the side. A lattice has been added to all three surfaces with enough divisions to have a decent amount of control over the surfaces. The choice of a lattice is so that we can avoid breaking our seams. Each of these three copies have also been set as Blendshape targets for the bound originals by using Deformations/Blendshape. While we still have yet to modify the copies, the Blendshape morph sliders for each surface has been moved up to one. At this point, if we modify the duplicates, the original bound geometry will deform. Thus we can use these Blendshape targets for a wide variety of deformation modifications. A very important note, however, is to change the order of deformations. Since we created the Blendshape targets after binding the leg geometry to the skeleton, the Blendshapes will be calculated after the clusters which are parented to the joints. What we want, however, is for them to be calculated first. Thus the leg geometry morphs and then is bent by the skeleton. Otherwise, the leg will bend and then slide back to its original straight position when the Blendshape is activated. The order of deformation is modified by selecting the affected geometry, clicking on the Inputs button on the Status line and choosing Complete list from the pull down menu. This will open a window that lists all the nodes that affect the geometry. By middle mouse button dragging one item to the position of another, their order will be modified. The item at the top of the list is calculated last. Figure 11 shows what type of effects can be achieved with this technique.

Figure 10. Duplicates of the leg geometry are set as BlendShape targets for morphing. A lattice is then placed around the copies for deformations that maintain the seams.

Figure 11.
With the Blendshape sliders at full for all three leg surfaces, the lattice on the target surfaces is tweaked.

With the legs now set up, the same techniques are used for Lanker's arms and fingers. The regions that become a bit more tricky, however, are the pelvis, shoulder and knuckles. The reasons for this is that these regions contain more than one surface, which can easily separate at the seams if care is not taken. When a deformation needs to occur in this type of situation, the easiest solution is to use lattices as they will maintain the relationship between adjacent surfaces. However, it is important to make sure that any part of the surfaces that affect the seam in any way are included in this lattice. Figure 12 shows a lattice that has been added to the pelvic region, including the vertices of the torso below the waist, the blend surfaces that connect the pelvis to the legs, and the top two rows of vertices on each leg. It is also important to have enough divisions on this lattice so that the left and right hip joints can be associated with the respective halves of the lattice. At this point, we can now select the left hip joint, the left half of the lattice points and invoke Bindskin. This has now created a cluster of those points and parented it to the joint. Bending the leg at this point gives as an undesirable result, however, as seen in Figure 13. What we now must do is edit the weights of the lattice points in the cluster using the Set Editor, so that the lattice points at the middle and top edges have a weight of zero, and then fade up to one towards the center. After editing the weights a bit, a much smoother deformation can be achieved (Figure 14).

Figure 12.
A lattice is added to the pelvic region of the torso, the two hip blend surfaces, and the three top rows of vertices (hulls) on each leg.

Figure 13. The left half of the lattice points were attached to the left hip joint using BindSkin. The deformation looks rough, however, as the lattice point cluster weights are all at 100% by default.

Figure 14.
As the weights of the lattice points in the cluster bound to the hip joint are faded from zero at the waist down to one, the deformation is easily improved.

The above technique, while generating a decent result, is not perfect. The final solution to this is to apply some SetDrivenKey relationships between the rotation of the hip joint and the position of the lattice points. The methodology for setting up SetDrivenKey was illustrated in Part Two for forward kinematic controls and would be the same here. The hip joint would be the "driver" and the lattice points would be the "driven." The great thing about this is how multiple relationships can be generated between the same driver and driven. Thus when the hip rotates in the positive X direction, the lattice points can assume one shape, while when the hip rotates in the negative X direction, they can do something completely different.

With the legs and hip region finished, the rest of the character can be set up. The above lattice technique is good for the shoulders, knuckles and head/neck region. Figure 15 shows various areas of Lanker's body with all the lattices visible and tweaked. When animating, however, it is nice to turn off the display of the lattices to clean up the window by using Display/Hide/Deformers/Lattices.

Figure 15. Lanker with all of his lattices visible.

Continued on page 2 >>