Realtime Character Rigging

I`ve been threatening this for a while but I finally got around to doing it. Below is a tutorial I wrote a while ago now on how to create a basic character rig in Maya. Although it was created in an earlier version of Maya the process should work in current versions, and give you the basics of rig creation. Once you have followed this process you can then rework and adapt this rig to any other character or creature, adding more joints and controls to make animation easier.

Note: Please let me know if any part doesn’t make sense, or needs updating.

When creating a rig for use in a game engine you always have to consider the restrictions. How many joints are you allowed? When exported, will there need to be a specific hierarchy in place or certain nodes added to act as weapon or prop placements. These tend to just be joints, null nodes or even a simple locator which the engine picks up on and then knows where these objects should be.

Enough about that for now, lets move on and build our basic rig.

Rig Construction – The Base Skeleton

During this section we will briefly go over the basic skeletons construction which will also help explain some of the key features. At a later date you can always add to this joints for facial or hand animation if you wish.

• Using the Skeleton > Joint Tool begin by creating a basic skeletal structure.

• Once joints are placed press Insert and move the joints into position. We need the rotations to be kept at 0, 0, 0 so don’t rotate any of the joints at this stage.

• Import your character mesh and place the characters geometry in a new display layer and set it to Template.

• Using the character mesh as guide you can now build in joints that lie down the centre of the limbs. Create four for the arm starting from the clavicle and create five for the legs starting with the hip. You can see both of these in the figure below.

• Rename the joints to reflect the areas they will animate so starting with the clavicle call this L_Clavicle, L_Shoulder, L_Elbow and finally L_Wrist. Do the same with the leg joints calling these L_Hip, L_Knee, L_Ankle, L_Ball and L_Foot_Tip.

• For the spine, neck and head create seven joints. Starting at the base of the spine work your way up to the base of the neck then create a joint that will control the head, place this just below the ear. Place the final joint just out in front of the head so its looks like it is sticking out of his mouth.

• Rename these joints to Root, LowerSpine, MiddleSpine, UpperSpine, Neck, Head and HeadDirection.

• Now parent the L_Clavicle joint to the UpperSpine joint, and then parent the L_Hip joint to the Root joint at the base of the spine.

The left side of the skeleton is complete so next we need to create the right. This is done easily using the Skeleton > Mirror Skeleton Tool.

• Open the Mirror Skeleton Tool’s options and set Mirror Across to YZ as this will mirror the joints from +X to –X. Leave Mirror Function set to
 and in Search For put L_ and in Replace With type R_. What this will do is rename all of the mirrored joints beginning with L_ so they begin with R_.

• Now select the L_Clavicle joint in the main view and click

• Finally select the L_Hip joint and click Apply again.

The base skeleton is now complete so next we need to go in and check the rotational axes. Each joint has an X, Y and Z axis which it rotates around. Depending on how these lie the joints could rotate incorrectly so we need to go in and fix them.

• First of all we need to see the rotational axis so select the Root joint then go to Edit > Select Hierarchy before then going to Display > Component Display > Local Rotational Axis. Now we can see them we can clearly see they need fixing.

• To fix the rotational axes we will use the Orient Joint tool found in the Skeleton menu. Open this up and set Orientation to None and enable Hierarchy Orient child joints.

• Now select the Root joint and press Apply. All the rotational axes will be reset.

• Now select the hip joints and the clavicle joints. Set Orientation to XYZ and click Apply.
This will point X down each bone.

• What you may need to do now is go in and edit the rotational axes for the arms and legs manually with the component editor. Try to keep the axes as straight as possibly with Z either pointing forwards and Y pointing directly up or down.

With the rotational axes cleaned up the base skeleton is now complete. What we can now do is apply a rig to this, which will enable us to animate it quicker and easier. Create a new display layer called
Skeleton and place the skeleton into it.

Rig Construction – Control Arms

The first controls we will add will be for the arms. Currently the arms rotation is dependant on the clavicles, rotate the clavicle and the arm rotates too. What we will now add is a Control Arm, which will give the arm its independence, meaning it can hang free from the clavicle as it moves.

• First duplicate the main left arm for the shoulder making sure the duplicate isn’t parented to the clavicle.

• Move the new arm back so we can see it.

• Rename each joint in this new arm to L_ConShoulder, L_ConElbow and L_ConWrist.

• With the control arm created we can now wire it up so it controls the main skeleton. To do this we will use
Orient Constraints. Select the control shoulder first, (L_ConShoulder) and then holding Shift add the main skeletons shoulder to the selection.

• With those selected now go to Constrain > Orient and open the options, (seen below).

Maintain Offset is a very useful tool, it allows the constraint to keep its initial values if they defer on each object. In this instance the rotations on both joints should be at 0, 0, 0 so we don’t need this enabled. Set Constraint Axes to All and click Apply.

Now when the control shoulder rotates the main skeleton will follow, what’s more is the arm is now free from the influence of the clavicle.

• Repeat this procedure for the rest of the arm, making the control elbow and wrist control the corresponding joints on the main skeleton.

Now the full arm can be manipulated via the control arm. The next step is to lock the control arms position to the shoulder, to do this we use another constraint, this time the
Point Constraint. This will make the control arm exist in the same place as the main skeleton so first I would recommend creating a new display layer called Rig_Controls and place the control arm in here. Next we will make the display handles visible so it’s easier to select.

• Select each joint of the control arm and make its display handles visible. Do this by going to Display > Component Display > Selection Handles.

• Next select the control arm and press F8 to go into Component Editing mode. Select display handles from the status line and move the handles on the control arm out so they are clearly visible.


Now we can apply the Point Constraint, which works in much the same way as the Orient Constraint but only effects the translations.

• Select the L_Shoulder on the main skeleton first this time and then the L_ConShoulder joint on the control arm.

• Next go to Constrain > Point and set the options so they are the same as the Orient Constraint, leaving Maintain Offset disabled.

The control arm will then snap to the main skeleton, this means that as you animate it the control arm will lie in exactly the same place as the main skeletons arm.
That’s the main arm controls created; next we will add control to the wrist, allowing us to animate it freely without influence from the rest of the arm.

• First duplicate the control wrist joint, (L_ConWrist) and move it behind the character for now so we can see it as we work. Rename this new joint L_ConHand.

• Next select the L_ConHand joint and then the L_ConWrist joint and apply another orient constraint.

• Now hide the display handle on the L_ConWrist joint by selecting it and going to Display > Component Display > Selection Handle.

• Finally select the L_ConWrist joint followed by the L_ConHand joint and apply a point constraint causing the new wrist joint to snap to the position of the main skeleton.

Now the wrists movement is completely independent of the arm. With that done we will now add IK control.

• First we need to create the main IK handle so go to Skeleton > IK Handle Tool and create an ikRPSolver from the control shoulder to the control wrist.

Now the IK is applied we have two choices. We can either animate the IK with the handle supplied; this could potentially cause problems as you cannot reset the default IK handles translations to 0, 0, 0. Instead we can create another handle that will control the IK.

Our new handle will be created from a basic NURBs shape, which can easily be created in Maya.

• Got to Create > NURBS Primitive > Circle and point snap the new circle to the wrist joint by holding V as you move it.

• Rename this circle to L_ArmIK.

• Next rotate it so it matches the orientation of the arm, then go to Modify > Freeze Transforms to bake the attributes back to zero.

• Finally delete the history on the curve, to do this select it and go to Modify > Delete By Type > History.


Now we need to make it control the IK handle we can do this firstly by parenting the handle to the curve. Next we need to wire in the ability to turn the IK on and off, to do this we will look in the animate menu.

• Select the L_ArmIK controller then add the IK handle to the selection.

• Next go to Animate > IK/FK Keys > Connect to IK/FK.

• Now, using the Enable IK Solver tool in the IK/FK Keys menu you can turn the IK on and off, allowing you or the animator the freedom to animate however they choose.

We now have one more step to cover before the arm is complete. We now need to add in a controller that will help us pose the characters elbow when IK is in

First of all we need another icon, we could use another circle but we need it to be distinguishable from the rest so you can quickly tell what control it is.

• Using Maya’s curve creation tools create a new icon; it can be anything really so long as its simple, you could even use text.

• Point snap this new icon to the elbow joint, then move it back slightly, freezing the transforms when done.

• Now we will connect it to the IK. Select the new icon first, then the IK handle and go to
Constraint > Pole Vector.

Once IK is being used the animate the arm the elbow will now always point towards this icon.

The arm is now almost complete, all that remains is to use the Channel Control window to lock off all the attributes we do not need to use, if we leave these open to be animated the rig will soon be broken. When done hide the IK handle, and then proceed to follow the same procedure to create the controls for the right arm.


Rig Construction – Control Feet

Lets now move onto the legs. These will take a bit more work to setup, as we will be adding extra controls onto the feet to enable us to rotate the toes and pose the feet easier.

• First of all we will create the controls that will move the feet so select each ankle joint and duplicate it, giving us a copy of the joints that make up each foot.

• Hide the main skeleton and add both the new feet to the Rig_Controls layer so we can concentrate on them.

We now need to reverse the order of each of these feet; this is so we can animate the feet backwards. If we wanted to have the foot planted on the floor and rotate it around the ball joint we would need to rotate the ankle joint, and then try and match the ball joint up, with the joint order reversed we can just rotate the ball joint.

• To reverse the order of each foot select the toe joint and go to Skeleton > ReRoot Skeleton.

• Before you move on quickly go through the new joints and rename them accordingly. So L-Ankle1 would become L_ConAnkle etc.

• Now hide the Rig_Controls and bring back the main skeleton, we will now add the IK into its legs.

Create an ikRPslover from each hip to the ankle joints, an ikSCSolver from the ankle to the ball joints and finally another from the ball joints to the ankle joints.

• You should have six new IK handles. Parent each of these to the joints they lie over on the control feet.

Now when you move the hips around the feet remain planted to the ground. What we need to do now is add further controllability to the feet making them easier to animate and pose. What we need first is a new icon so quickly create something that will represent the feet; in this instance we will use a simple square shape.

• Position each icon next to the foot it will control, freezing the transforms when done.

• Now point snap its pivot point to the ankle joint on the control feet.

• Finally parent the control feet joints to the icons by selecting the end, toe joints then the icon and pressing P. With the main controls in place we can now add extra attributes, its through these attributes we will pose the feet.

• Select both feet icons and go to Modify > Add Attribute.

• Add three new Float attributes called Tip_Toe, Ball_Rotate, Foot_Twist and Toe_Rotate. Make sure not to specify a minimum or maximum value on any.

Now the attributes exist on the icons we can proceed to prepare the rest of the foot to we can quickly wire them up.

• First of all select each IK handle on the end of each foot, (the ones overt the very end toe joints) and group it to itself, call these two groups ToeRot.

• Now point snap their pivot points to the ball joints on each foot.

• Next select the very end joints and parent those to themselves, calling each FootTwist.

• Again, point snap each of the new groups pivot points to the ball joints.

We will now use the Connection Editor to connect the attributes to the new groups. First open the Connection Editor by going to Window > General Editors > Connection Editor.

• Select the LeftFoot icon and click Reload Left. This will load the objects attributes into the left hand side of the Connection Editor.

• Next select the L_ConFoot_Tip joint, which is the end toe joint on the foot and click Reload Right, this will load the attributes onto the right hand side of the connection editor.

• Now connect the LeftFoot`s Tip_Toe attribute to the L_ConFoot_Tip`s Rotate Y attribute.

• Next load the L_ConBall joint into the right hand side, then connect the LeftFoot`s Ball_Rotate attribute to the L_ConBall`s Rotate Y attribute.

• Load the FootTwist group into the Inputs section, then connect the LeftFoot`s Foot_Twist attribute to the FootTwist`s Rotate Y attribute.

• Finally load the ToeRot group into the right hand side, then connect the LeftFoot`s Toe_Rotate attribute to the ToeRot`s Rotate Y attribute.

Now you can use these attributes to pose the foot without having to physically go in and edit the joints. Apply this now to the right foot before we move on and add the final controls to the legs.

As with the arms we need to allow the animator the freedom to point the knees in any direction they require. To do this we will use the same technique we adopted for the elbow positions.

• Start by creating another new icon to represent the left knee’s position, call this L_KneePos.

• Point snap the icon to the actual left knee joint before moving it forwards so it lies directly in front of the knee. Freeze the transforms when done.

• Next select the knee position icon, and then add the IK handle that lies over the ankle. Go to Constrain > Pole Vector to restrict the pole vector to the knee icon.

• Finally parent the knee icon to the left foot icon. This will allow the knee to move naturally as the foot does, while also allowing you the freedom to animate the knee independently if you require. As a final option lets add the option to turn all the IK handles off, this will allow for FK control over the legs.

• Select the foot icon and then while holding shift, add the three IK handles on the left foot to the selection.

• Now go to Animate > IK/FK Keys > Connect to IK/FK.

Now we have exactly the same control over the legs IK as we do the arms. With the left knee complete move across and create a knee controller for the right leg. When done all that remains is to clean up the legs so first make sure the IK handles are hidden then use the Channel Control tool to lock off all attributes that are not needed.

Note: Make sure you also lock off anything you can’t see like the FootTwist and ToeRot groups.

Rig Construction – Torso

We now have full control over all the limbs so lets move on and work on the main torso area. The first place we will work on is the waist.

• We need two new icons here so create a NURBS circle and point snap it to the Root joint on the main skeleton. Alter its scale and orientation so it wraps around the characters waist then rename it to Root_Control.

• Duplicate this circle and move it up slightly. Next scale it down and move its pivot so it exists in the same place as the first spine joint. Rename this circle to Waist_Control.

• Before we can wire these up so they control the main skeleton, select the main
Root joint of the skeleton and group it twice. Call the first group WaistControl and the second group RootControl.

• Select WaistControl and point snap its pivot point to the first spine joint, LowerSpine.

• Next select the RootControl group and point snap the pivot to the main Root joint.

• Now we can begin to connect the controls to the skeleton. First select the Root_Control icon then select the RootControl group. Apply both a Point and Orient constraint to these.


• Next select the Waist_Control icon and then the WaistControl group and apply just an orient constraint to them.

• Finally parent the Waist_Control icon to the Root_Control icon.

At present the waist control doesn’t seem to do much but once we apply the spine controls all will become clear. We now need three more icons so use Maya’s curve tools to create ones to represent points on the spine. Call these
Lower_Spine, Middle_Spine and Upper_Spine.

• Position these just behind the character and in line with the spine joints they will control.

• Point snap each ones pivot to the corresponding spine joint.

• Next select each icon in turn, then the spine joints they will control and apply an Orient constraint.

• Finally parent the Upper_Spine control to the Middle_Spine control. The Middle_Spine control to the Lower_Spine control and then the Lower_Spine control
to the Root_Control icon.

Not only do we have complete control over the spine but if you rotate the Waist_Control icon the hips now move independently too.

The next area we will look at is the shoulder. We could just use a basic control that we could rotate to pose them but a more intuitive way would be to allow us to select the shoulders and physically move them into position. We will now setup the left shoulder leaving the right hand side for you to complete.

• As usual we need an icon so switch to the side view then go to Create > Arc Tools > Three Point Circular Arc and create a shallow arc just over the shoulder area. Call this new arc L_ConClavicle.

• Now switch to the perspective view and move the arc so it’s above the left shoulder.

• With the icon in place make sure the pivot is snapped to the shoulder joint then freeze its transforms.

• Now we will make the shoulder icon control the actual shoulder joint. Select the L_ConClavicle icon first then the L_Clavicle joint on the main skeleton. Next go to Constrain > Aim and open the options.

• Enable Maintain Offset, set Aim Vector to 1, 0, 0 and Up Vector to 0, 1, 0 then click Apply.

The shoulder will now follow the position of the icon. Repeat this for the right shoulder but this time set the Up Vector to 0, -1, 0 as the joints rotations are different. When done parent both the icons to the UpperSpine icon, and then clean them up locking off the rotate, scale and visibility attributes.

Now we will move onto the final area to rig, the neck and head.

Rig Construction – Neck and Head

On other rigs the head and neck are usually controlled with basic rotation attributes. This can work well but what if you need the character to stay focused on one spot while he does something else. For this rig we will add the ability to animate the head in both the traditional way and a new way allowing for the head to stay locked on one spot.

Lets first rig the neck, which will be controlled via a simple rotation based setup.

• First create a simple NURBS circle, calling it NeckControl.

• Now rotate and translate it so it wraps around the characters neck, snapping the pivot to the actual neck joint.

• Next simply select the NeckRotation icon, and then the neck joint and apply an
Orient Constraint.

That’s the neck more or less done. Now we ill take a look at the head rig.

• We first need an icon that firstly will house all the controls for the head but secondly will act as a focal point when we want the head to stay locked, call this HeadControls. With this created position it out in front of the main head of the character.

• Next create an ikSCsolver Ik handle from the main head joint to the head tip joint.

• Parent this to the HeadControls icon then move the actual handle out so it lines up with the icon.

Now as you move the head controller around the actual head joint will follow it. This gives us the ability to lock the heads position; lets now add the ability
to also control it with just the rotations.

• To start we need to add some new attributes to the HeadControls icon so select it and go to Modify > Add Attribute.

• Now add a Boolean attribute called HeadLock and a Vector attribute called HeadRot.

• Select the HeadControls icon then group it to itself calling the new group HeadRotation.

• Snap the pivot for the HeadRotation group to the main head joint, then to keep it locked in this position select the head joint, then the HeadRotation group and apply a Point Constraint.

• Now open the Connection Editor, (Window > General Editors > Connection Editor) and load the HeadControls icon into the left, Inputs section and the
HeadRotation group into the right, Outputs section.

• Connect the HeadRot attributes to the HeadRotations Rotate attributes. This now allows us to control the heads rotation through the head icon.

Now we will add the ability to switch between the two, to do this we will use Set Driven Keys.

• Open the.Set Driven Key window by going to Animate > Set Driven Key > Set and opening up the options.

• Select the HeadControls icon and click Load Driver, then select the actual HeadRotations point constraint node, (which should be called HeadRotation_pointConstraint1) and click Load Driven.

• Next select the HeadLock attribute in the left side of the Driven section and the HeadW0 attribute next to the Driver section.

• Press Key to store these attributes current values.

• Now set the HeadLock attribute to on and the HeadW0 attribute to 0 and press Key again.

What this setup allows you to do is animate with the head free from the bodies influence or locked to it.

To finish this section lock off all the rotate, scale and visibility attributes, just leaving the Head Lock and Head Rot attributes available to edit.

All that is left to do now is clean up the scene, and then you can bind the mesh to the base skeleton. The scene will then be ready to be passed on to an animator.

• To do this first run File > Optimize Scene Size, this wills can the scene for any redundant nodes, which can be removed.

• Next place all the rig controls, (except the RootControl group) into a nice neat group called RigControls.

All Done

And there you have it, the main rig is complete. I will add a link to the Maya file soon so you can see the rig in action.