The CharacterTutorial
Introduction to computer animation using Maya
Center for Advanced Digital Applications  


Part 3: Rigging

The arms

In order to animate the bee character we need to create a skeleton to control the surfaces.  We will begin with a simple FK (forward kinetics) joint hierarchy for the arm. The leg set up will use IK that is inverse kinetics.

Begin by hiding all your surfaces except for the arms and body.    We want to prepare the arm surface a bit before adding the joints.  In order for the surface to bend more smoothly at the shoulder, elbow and wrist we want to add some isoparms in those areas.  Switch to the modeling menu.  Use F8 to toggle to component mode and turn on only the selection mask for isoparms.  (a blue line on a surface) Now when you click on the surface a yellow isoparm location holder appears.  Click drag this holder into place at the joint areas and press (edit surfaces> insert isoparm).  You may  shift-select the isoparm location markers to add several at once.

Switch to the Animation menu.  In the front view place your joints as in this diagram.  We want the first joint of the arm to be well inside the surface of the body, and the next to be placed where the shoulder rotation should occur.  To create a joint, press (skeleton> joint tool) The mouse icon turns into a small +, and you simply click where you want the joint to be.  (*you can adjust the size of the joint display under (display> joint size)). The first joint (let's call it the clavicle) will not rotate unless the bee shrugs his shoulders.  This joint will keep the end of the arm inside the body.  We then need a joint at the shoulder, then the elbow.  It is useful to add a joint between the elbow and wrist for a forearm twist rotation.  Next you place the wrist, and in the case of this bee we are using a very simple hand so place a joint mid palm and one at the finger tips.  While the finger-tip joint is still selected, walk select (arrow keys) back to the wrist joint, and, in the top view, place a joint for the thumb-base,  knuckle, and tip.


front view of arm joints (note additional isoparms at bend locations)

Using all views, make sure the arm skeleton is located properly within the arm surface.  You can also create the thumb hierarchy separately, and then select thumb_base joint, then shift-select wrist joint and parent-connect them. Pick the child first, then the parent and press (skeleton> connect joint - option box),  make sure it is set to parent joint, and press Connect.  Adjust the placement of the joints with the move tool, do not rotate them.


Top view of arm joints

Rename the joints in the channel box L_clavicle, L_shoulder, L_elbow, L_wrist, L_hand (you don't need to name the tip joints as they will not be animated),  L_thumb_base, and L_thumb

Notice that when you pick and move the first (L_clavicle) joint which is the root joint of this arm skeleton - all of the other joints follow.  This is the joint hierarchy system.  There is one root joint and every joint thereafter is a child of the joint before.  For forward kinetics you must rotate each joint individually to pose your character.  That is if you want your bee to wave, you cannot simply move his wrist up and expect the elbow and shoulder to follow.  The wrist is a child of the elbow, which is a child of the shoulder.    To make the bee wave you must rotate the shoulder then the elbow and lastly the wrist.  (When animating - once the joints are properly placed and the surfaces are bound - we only use rotation of the joints to set keyframes, not translation)

NOTE: For this tutorial, to avoid some complications further down the road, we are going to create arm and leg skeletons separately, bind the surfaces, and then connect them to a body skeleton.  Although many animators prefer to create the entire skeleton first, we will not do so for this excercise.

We are now ready to bind the arm  surfaces to the joints.  Binding assigns sets of CV's to the nearest joints.  Thus when the joint rotates those CVs follow, maintaining their relationship to the joint.  In rigid binding, which we will use in this case, each CV is bound to a single joint.   To bind the arm and hand surfaces  shift-select all three surfaces and the root joint (L_clavicle) and press (Skin> Bind Skin> Rigid Bind - option box) and set the following options:

Bind to: complete skeleton
Coloring: color joints
Bind Method: closest point

Then press "Bind".   Now test the shoulder, wrist and elbow joints by rotating them.  (*note: to return the joints to their original position hold the RM over the joint and click on Assume Preferred Angle)  Let's look at the elbow joint - notice that the surface does not bend very smoothly.  We need to add a "flexor" to the joint.  This is a special lattice which can be used to modify the surface deformation in the area of a joint.  In the top view, select the elbow joint, press (Skin> Edit Rigid Skin> Create Flexor). In the Creat Flexor option box set the following:

Flexor Type: lattice
joints: at selected joint(s)
bones: do not check anything here
Lattice Options: use default (S=2, T=5, U=2)

Press Create.  A small lattice appears around the joint.  Rotate the elbow joint again and notice that be bend is a bit smoother.  We can modify this even further.  Select the joint flexor, and in the channel box, try adjusting the Rounding and Creasing attributes.  You can pull out an elbow, and smooth the crease at the inner elbow in this way.  Be sure to view you surface shaded and smoooth (ie hotkeys - 5 for shaded and 3 for smooth).  Use the same method add a flexor at the shoulder joint and increase the rounding to form a shoulder.  You can also add one at the wrist.

No FlexorFlexor

Flexor with rounding and creasing           

Now let's look at the hand.  There seems to be a problem with the thumb joint.  If you rotate the the thumb_knuckle out away from the hand, a part of the hand surface moves with it.   This means that some of the CVs of the hand surface were bound to the thumb_knuckle joint.  We need to reassign them.  Click on the joint and press (deform> edit membership tool).  The CVs belonging the the thumb_knuckle joint are highlighted in yellow.  (Fig. 1)  Notice that one seems out of place - it is deforming the hand surface.  To remove it from the thumb_knuckle joint set, hold down the Cntrl key and select it.  The hand surface pops back into place. (Fig. 2)


Figure 1                                                Figure 2

The CV was removed from the group, however it is now no longer bound to any joint so we need to reassign the offending CV to the proper joint - in this case the hand joint.  Select the hand joint.  The CV does not highlight in yellow.  (Fig. 3) Hold down the Shift key and select the CV.  This adds it to the hand joint group, and it should now be yellow. (Fig.4)


Figure 3                                              Figure 4

On this particular set-up this may be the only problem area, but you may want to check you other joints as well.    Select each joint and rotate it - if you notice any surfaces deforming that should not be, you must edit the memebership. (Shift-select adds to membership, Cntrl-select removes from membership)  When you are satified that the arm is working properly select the clavicle (the root of the arm skeleton) and hold the RM over it and click Assume Preferred Angle.

To create the other arm skeleton, with the clavicle selected,  press (Skeleton> mirror joint - option box) and set it to mirror across YZ and press Mirror.  A new arm skeleton appears already in place for the other arm.  Unfortunately the flexor information is lost.  Although flexors appear they will not function.  You must delete them.  However you can copy the left arm flexors onto the right arm easily enough.  First (after you have deleted the non-working flexors) bind the Right arm skeleton to the right arm surfaces just as we did the left one.  Now select a joint on the right arm, shift-select the corresponding flexor on the left arm and press (Skin> edit rigid skin> copy flexor).  The new flexor will now modify this joint.  (Once the joints are bound to the skin you cannot simply mirror duplicate the whole thing)

Repeat the edit membership steps for the right arm.

The Legs

We are going to use a very simple set-up for the legs since, for this project since the character will not need to walk (he is going to fly).  However we can use IK just so you can see how it works.  (See the Foot Tutorial for a more complex foot set-up for those who want a character who will walk)

Create the leg following leg joints in the side view hip-knee-ankle-heel-ball-toe as in this diagram.  Bu sure to place the joints so that there is a bend at the knee this indicates which is the correct direction for the IK handle to bend the knee as you will see later.  Check all the views to be sure the joints are positioned within the leg surface.  (*the bones do not show when rendered so it is OK if the tip protrudes outside the surfaces)

Rename the joints and bind them to the L_leg surface.  Test the joint rotations and add flexors as necessary.  Although you could animate the leg as is, we are now going to add an IK handle.    First in your perspective view, hide the surfaces (under Show just uncheck surfaces)  Press (Skeleton> IK Handle Tool - option box).  In the option box use the defaults - but make sure that ikRPsolver is selected as Current Solver.  This will give us a handle at the end of the chain and a rotational plane at the start of the chain.  With the IK aHandle tool click first on the hip joint , then on the ankle joint (the end effector).  The handle you created consists of a straight line drawn from the hip to the ankle and what looks like a locator at the ankle.  An RP solver also has a round Rotation Plane at the hip.

Now you can move the foot up and down and the IK handle determines to position of the knee and hip (the inverse of the the hierarchy of the skeleton).
Be sure you have named your joints and handle (L_Leg_IK) at this point.   Creat the skeleton for the other leg in the same way you did the arm and add an IK handle to it.  Now when you animate the Bee's legs you will control them ONLY with the IK handle.  You will no longer rotate the hip, knee or ankle joints.  The leg movement will be controlled by the IK handlw while the foot will be controlled by the heel ? ball joints.
 
 

The Spine

Select all surfaces, joints and handles except the head and body and hide them.  In the side view draw the spine as is in the following diagram.

The first joint you place is the Root.  It should go at the pelvis (where the arrows are in the diagram).   The spine and the stinger joints should both flow from there.  There is also a second joint just barely above the Root (sometimes referred to as a false root) we will call this Main_spine.  Notice that as you rotate the Root the entire skeleton rotates, but if you rotate the Main_spine, it only rotates the upper portion, and not the stinger.   You will not be animating the joints in the head - they are there so that the head surfaces will have something to bind to.    To turn the bee's head you will rotate the neck joints.

Before we bind the joints to the surfaces, we want to set up a control for the spine.   The spine is made up of first, Main_spine, and the next joints up the spine Spine1, Spine2 etc., up to the neck.  When I say "up" in this case I mean up the spine.  The pelvis (Root) is actually the top of the joint hierarchy and the bones of the spine actually go "down" the hierarchy.  When we select the main Spine and rotate it we want the other spine joints to rotate as well, much the way a real spine would curve.

We need to set connections so that rotating Main_Spine causes the each of the other spine joints to rotate on their own axes to the same degree.  First, hide your head ? body surfaces.  We want to be sure that all of the joints of the spine are oriented the same way.  You can view the local rotation axis of each joint to do this.  When you select the Main_Spine,  the joints below it in the hierarchy (ie up the spine) are also highlighted because they will be influenced by Main_Spine, but they are not, in fact, selected .    Shift-select each of the spine joints starting at the neck and ending with Main_Spine, that way you can be sure that each joint in the hierarchy is selected (or select Main_spine, and type "select -hi" in the command line, which selects the whole hierarchy of your original selection).  Now Press (display> object component> local rotation axis)  Each joint should now display tiny XYZ arrows. The X axis of each joint should run along the bone.   However, the Y and Z may not be consistent.  This should be most apparent in the front view.


local rotation axis inconsistent

To adjust the axis you can rotate them - press F8 to toggle into component mode and use the selection mask that looks like a question mark to select the local rotation axes.  Keep the X along the bone.  It is not that important which way the Y ? Z  are oriented as long as you are consistent.  When you are done it should look more like this.  (F8 to toggle back into object mode)


location rotation axis corrected

Choose the spine joints again and toggle off the location rotation axis display (display> object component> location rotation axis)

Now we will connect the rotation attribute of the Main_Spine to the rest of the spine joints.   Select Main_Spine and press (window> general editor> connection editor). The Connection Editor window consists of two blank areas, one for input and one for output.  Make sure the from-to arrow is pointed to indicate the connections will be from the left to the right (from the output are to the input area).  With Main_Spine selected click Reload Left.  Every possible attribute for the object is displayed on the left hand side of the Connection Editor.  Scroll down to Rotate and click on the arrow next to it (NOT on the word).  You will see Rotate X, Rotate Y, and Rotate Z.  these are the only attributes we want to deal with.  Now select Spine1 joint, and click Reload Right.  The attributes for Spine1 are displayed on the right ahdn side of the Connection Editor.  Scroll down to Rotate and click on arrow.  Now click once on Main_Spine Rotate X and once on Spine1 Rotate X.  The order is important, click first on Main_spine's attribute, and second on the Spine1 attribute, and do it just once - if you click on them again you break the connection. Do the same for Yrotate  and for Zrotate.  Now these attributes are connected (they will be displayed in italics when connected).


The Connection Editor

When Main_Spine has an X rotation applied, so does Spine1 automatically.  Select Spine2, reload right, and repeat the process.  Each of the spine joints should be connected to Main_Spine.  When you are finished try rotating Main_Spine and you should get some nice curvature.  The individual joints of the spine now cannot be rotated on their own.  the only joint which can be rotated is Main-spine.  For this reason, you will want to stop connecting at the top of the body and use the next joint in the hierarchy  (located at the base of the neck) to rotate the base of the neck.  Also make sure you have a joint at the top of the neck to rotate the head so your character can nod his head.

The spine is nearly complete.  Once the character is bound, however it will be very difficult to select Main_Spine while you are animating, as it will be deep inside the body surface.  We need a handle which can be more easily selected.  Select the Main_Spine, and press (Display> Object Components> Selection Handle).   (You may remember doing this for the eye control).  A tiny + icon appears at the joint.  We need this handle to be well outside the boy surface so it can be easily grabbed.  To move the handle away from it's object, F8 into component mode, and use the selection mask that looks like a +.  Now you can select just the handle not the object and move it back along the Z axis until it is well behind the character.  F8 back into object mode and when you select this handle you have selected Main_Spine. Main_Spine will still rotate from its own local rotation axis not from that of the handle.

Now bind the head and body surfaces to the Root joint, and check for membership problems.  (remember cntrl-select removes a CV from a set, shift-select adds it to a set).

If you are feeling ambitious at this point you can create rigging for the antennae is much the same way as we did the spine.

*NOTE: For this project I have created joints for the limbs and bound them to the surfaces, bound the spine and head to those surfaces, and then connected the limbs to the spine hierarchy.  This way, (and since we have such a simple, segmented character) you can easily avoid having to do more set membership editing between the limb and body surfaces.  We had to edit set membership where the thumb joined the hand if you recall.

You should now have two Arms which are bound to joints.  You should have two Legs bound to joints and controlled by IK handles.  Body and Head surfaces should be bound to a spine hierarchy with a Root joint at the pelvis, and a Main-spine joint just above it which has its rotations connected to the other joints of the spine, and a selection handle to select Main_spine located behind the body.

Now we are ready to put all the skeleton parts together.  Make all the joints visible and turn off show surfaces in the perspective view.  Click on a hip joint, then on the Root (NOT Main_Spine) and press (skeleton> conncect joint) to parent the leg to the spine.  (make sure the option box for Connect Joint indicates parent rather than connect).  Repeat the process for the other leg, and then parent the shoulder joints to the top of the spine in the same way


The completed skeleton

Just a few more steps to complete the rigging. Make your surfaces visible.  If you select the Root now, and move it up along the Y axis, everything follows except the eyes and wings (and the antennae if you did not rig them).    Select the Eye Group (that is all of the eye surfaces)  then shift select the nearest joint (probably the tip of the nose), and press (edit> parent) or (p).  Do the same for the Eye_Control.  This way the eyes stay on the head surface and when you turn the head by rotating the neck the Eye_Control stays directly in front of the nose.  Parent the wings to a joint in the spine.  If you did not rig the antennae you can parent the surfaces to the joint at the top of the head.
 
 

Organizing the Character:

It is VERY IMPORTANT  to take some time now to organize your character in the hypergraph.  Notice that if you move the Root joint the entire character should move.  At frame one, set a key frame for the IK handles of the bee's legs.  You will notice that now, when you move the Root joint, the IK handles of the legs try to keep the feet in place.  This is correct.  We need a new node which will include these handles to move the entire character set-up intact.  Group the IK handles and name the node Bee_IKs. Select the Root, and  Bee_IKs and group them.  Rename this node Bee_Transform.  Animation of the body (doe he tip forward etc.) uses this node. Group again and name node Bee_Path With this node you can place the character on a motion path, and all of his parts should stay together. Make one more group and name it Bee_Master.

You will never modify the geometry of the surfaces for animating in this character.  The geometry should NOT be grouped with the skeleton. In the hypergraph, select all of the surfaces which you have bound to joints (NOT the parts parented to joints such as the eyes, wings and possibly the antennae), group them and name the group Bee_Geometry.   It is most likely that, for this project you will not use this node again.  Do not include it in any grouping hierarchy.


Hypergraph organization

Within the node called Bee_Root is the entire skeleton hierarchy.  This includes the Eye_Geometry, Eye_Control, Wings, and (if you did not bind them) the Antennae. since these items were parented to joints rather than bound.    Double click on a node to open it up and view the hierarchy.  Notice that Bee_Geometry stands alone and is not included in the Bee_Master hierarchy.
 

Note* Here is a problem you may encounter if you created some surfaces - such as the second arm or leg, by making a mirror duplicate - and forgot to freeze the transformations (see part 1).   These surfaces may seem to revert back to the original (non-mirrored) form when you are re-grouping the surfaces.  If this happens, they will seem to vanish when in fact they are now back on top of the surface they mirrored (ie L_arm is on top of R_arm).  to get them back you must find the mirrored object in the hypergraph, select it, and in the channel box, highlight all of the attributes which are locked (gray boxes).  With the locked attributes selected, LM over "channel" and pick "unlock selected".  (binding the surface locks the attributes)  With the surface attributes unlocked, change the X scale to a negative number, ( -1 if it now says 1).  It should go back into place.  Now press (modify> freeze transformations). You can now add that surface to the geometry group.

 rigged bee

SAVE YOUR MODEL IN A NEUTRAL POSE WITH NO ANIMATION

Try putting him in a few poses.  But before you do,  set a key frame on the IK handles of the legs at frame one in a neutral pose (just use hot key "s" to set a keyframe.  (assume preferred angle does not work with IK handles)

  

Go to Part 4. Animating