Browse the wiki

04. Rigging the arm

The lesson will focus on the arms, and creating FX and IK controls.


We now move on to the arms. Here we’ll be mimicking the underlying skeletal structure by creating digital equivalents of the clavicle, the scapula, the humerus and the radius/ulna. This is where we will also introduce the concept of FK/IK blending, giving the animator the option on what mode he/she would like to animate with. We’ll also introduce joints that will aid in the deformation during pronation and supination of the forearm.

001. Shoulder test


002. Creating the joints


Let’s start things off by working on the clavicle. In the Front view with the Joint tool, create a two-joint chain. The first joint should originate close to the center line, below the neck (imagine how it attaches to the sternum), and the second joint should terminate at the acromion process. Switch to the perspective view and translate the root joint of our new chain out slightly so that it sits pretty close to the chest.

Now let’s orient the joint so that Y points down the chain and we get the same orientation behavior as we have defined with our torso and our head. With the root joint selected, go Skeleton > Joint Tool. Set the Primary Axis to Y, Secondary Axis Z, Secondary Axis World Orientation to X (+), and hit Apply.

Once you’ve done so, test out the joint rotations and double-check the placement of the joint in the perspective view. I ended up rotating the joint and increasing the length of the joint slightly (Translate Y). Don’t forget to freeze the transformations so that the rotations get passed on to the Joint Orient. Now rename the joints from root to tip, l_clavicle_jnt and l_clavicle_end_jnt.

Let’s look at the scapula now. Jump to the Back view and create a three-joint chain that mimics the spine of the scapula and the medial border of the scapula as illustrated in Fig.01c. Translate the joint chain into the correct position (I found this easier to do in world mode), and go through the process of orientating the joints and freezing the transformations just as we did for the clavicle. Rename the joints, from root to tip: l_scapulaSpine_jnt, l_scapulaMedial_jnt, and l_scapula_end. Then parent l_scapulaSpine_jnt under l_clavicle_jnt.

Now for the humerus, radius, and ulna. In the front view, use the Joint tool to create a three-joint chain. I place the first joint where the ball of the humerus would meet the scapula, the second joint around the elbow, and the end joint at the wrist. With the root joint of this new chain selected, use the Orient Joint tool with the following settings: Primary Axis: Y, Secondary Axis: Y, Secondary Axis World Orientation: Z (+).

Make sure to test that these new joints rotate with the same behavior as the clavicle. Now, in the Top and Perspective views, translate and rotate the joints to fit better within the arm. I tend to add a slight bend to the joints as this makes it easier for the IK to figure out which way the joint chain should bend.

With the joints in place, make sure to freeze the transformations. One thing I’d like to do now is edit the orientation of the end joint of this chain. This makes it easier to attach the hand rig to it later on. To do this, select the end joint and in the Orient Joint tool, enable Orient Joint to World, and hit Apply. Now rename the joints from root to tip as follows: l_humerus_jnt, l_radUlna_jnt, and l_armEnd_jnt. Parent l_humerus_jnt under l_scapula_end_jnt.

Note: in the video, I call the end joint of the chain l_carpals_jnt, but change it to l_armEnd_jnt later.

003. Low-res arm geometry


The next thing to do is chop up the model (make sure to duplicate the original mid-res model first) and parent the relevant parts to the arm joints. Rename the geometry using the naming convention we’ve established and delete the history from the chopped up pieces.

004. Creating the FK arm controls


At the moment, we have one arm chain. This chain will be bound to the model (with additional twist joints) and will be driven either by an FK joint chain or an IK joint chain. Let’s create those additional joint chains now. Start by selecting l_humerus_jnt and hitting Ctrl + D to duplicate the joint chain. If you open up the hierarchy for our new joint chain in the Outliner, you’ll find that the geometry has also been duplicated. Select those parts and delete them.

Rename all the joints to have an _fk_jnt rather than the current _jnt, and also delete the 1 from the end of l_humerus_fk_jnt1. Next, select l_humerus_fk_jnt and hit Ctrl + D to duplicate it. This time, rename the joints to end with an _ik_jnt rather than the current _fk_jnt, and again delete the 1 from the end.

We’ll now create the controls for the clavicle, scapula, and FK arm joint chain. Before we do, select both l_humerus_jnt and l_humerus_ik_jnt, and hit Ctrl + H to hide them. Now select l_clavicle_jnt, l_scapulaSpine_jnt, and l_scapulaMedial_jnt, and load the script. Make sure the final line is set to create orient constraints, then execute the script. With the controls created, jump into component mode (F8) and reshape the controls to be more easily identifiable and selectable.

The next thing to do is to create the control hierarchy. Select l_scapulaMedial_ctrl_offset and parent it under l_scapulaSpine_ctrl. Parent l_scapulaSpine_ctrl_offset under l_clavicle_ctrl. Select l_scapulaSpine_ctrl, Shift-select l_scapulaSpine_jnt (or Ctrl-select in the Outliner) and go Constrain > Point. If we need to translate the scapula, we now can, allowing the animator more freedom over the rig. I’d like to do the same for the clavicle, so select l_clavicle_ctrl, Shift-select l_clavicle_jnt, and go Constrain > Point.

Let’s turn to the joints for the FK arm now. Select both l_humerus_fk_jnt and l_radUlna_fk_jnt, and execute the script. Reshape the controls in component mode, and then the last thing to do is to create the control hierarchy to get the correct behaviour. Do this by parenting l_radUlna_fk_ctrl_offset under l_humerus_fk_ctrl, and parenting l_humerus_fk_ctrl_offset under l_clavicle_ctrl. Test out the controls of the entire arm to make sure they are working as expected.

005. Creating the IK arm controls


Moving on to the IK controls now, start by selecting l_humerus_fk_ctrl and hitting Ctrl + H to hide the current controls. Then hide l_humerus_jnt and l_humerus_fk_jnt, and un-hide (Shift + H) l_humerus_ik_jnt. I find this is easier to do in the Outliner rather than in the viewport.

Now we need to add the IK handle. Go Skeleton > IK Handle Tool (Options) and set the Current solver to Rotate-Plane Solver. This allows us to use an additional control to aim the joint in the middle between the root and the tip of the chain. (In this case, the elbow joint.)

In this order, click on l_humerus_ik_jnt (the root of the arm) and l_armEnd_ik_jnt (the end of the arm). You should now have an IK handle that you can grab and use to manipulate the arm. This IK handle is in World space so make sure you undo it to go back to its creation position if you do play with it. Rename the IK handle l_arm_ik.

To create the control for l_arm_ik, go Comet > Shapes > cube. Rename the cube l_arm_ik_ctrl and hit Ctrl + G twice. Rename the top group node to l_arm_ik_ctrl_offset and the next group down to l_arm_ik_auto. As the IK handle is in World space and has no rotations applied to it, we can simply point snap the new control into place. So select l_arm_ik_ctrl_offset, hold down the V key on the keyboard and drag it onto the IK handle.

Jump into component mode now, and reshape the cube to better fit around the character’s wrist. Then take l_arm_ik and parent it under l_arm_ik_ctrl. You can now drive the IK arm with the new control and get it back to its default position by zeroing out the translation values.

For the elbow, I’d like a control which resembles a locator. We could create a new one, but instead let’s duplicate an existing control and rename it. Select l_eyeball_ctrl_offset and hit Ctrl + D. Hit Shift + P to bring it out from its current hierarchy and then zero out the translation values to center it to the World center. Then go Modify > Search and Replace, and in the Search for field, type l_eyeball, and in the Replace with field, type l_elbow. Hit Replace to rename the control, and then delete the 1 that will be hanging on the end of l_elbow_ctrl_offset.

Positioning the elbow control correctly will be a bit of a process as the arm has a slight bend to it. It’s best to do this correctly, or you can get a slight popping in the joints, which is never a good thing. To get the elbow control into place, start by selecting in this order: l_humerus_ik_jnt, l_radUlna_ik_jnt, and l_armEnd_ik_jnt. In the Outliner, Ctrl-select l_elbow_ctrl_offset, and go Constrain > Point (Options). Make sure Maintain Offset is disabled and hit Apply. The control should now be sitting in the middle of the arm chain.

Select l_radUlna_ik_jnt, Ctrl-select l_elbow_ctrl_offset, and go Constrain > Aim (Options). Reset the settings and hit Apply. The control is now positioned and aligned correctly. We can now take the two constraint nodes living under l_elbow_ctrl_offset and delete them. Then set the Move tool to Object mode, select l_elbow_ctrl_offset, and translate it out along its X-axis to a suitable position. Select l_elbow_ctrl, Shift-select l_arm_ik and go Constrain > Pole Vector. Hopefully, there was no movement in the joints and you should be good to go.

006. Creating the FK IK switch


We now want to create a control allowing the animator to switch between the FK controls and the IK controls. Go Create > Text, and in the Text field type FkIk and feel free to pick any font of your choosing. Don’t worry about the size as we’ll be scaling the control to make it more easily selectable. Hit Apply and you should now have four curves at the World center.

At the moment, we can select each letter independently. I want to be able to select any letter and have it pick the set as a whole. To do this, jump into the Outliner and open up the Text_FkIk_1 group. Select all four curves within that group, hit Shift + P to bring them out, and then delete Text_FkIk_1.

Still in the Outliner, hold down the RMB and enable Show Shapes. Select curveShape6, curveShape7, and curveShape8 (all shape nodes), and then Ctrl-select curve4 (the transform node) last. In the MEL command line, type:

parent –r –s;

Execute that command and all the shape nodes should now jump under the single transform node. Next, we can delete the old transform nodes. Selecting any one of the letters now will result in selecting the whole word. You’ll next have to jump into component mode to reposition the letters and scale them up to make them more easily selectable.

With the letters re-organized, disable Show Shapes in the Outliner. Rename the curve fkIk_ctrl, center it, and then go Modify > Freeze Transformations, and Modify > Center Pivot. Then position the control somewhere behind the character. (I pop it behind the hips.)

Now parent fkIk_ctrl under COG_ctrl so it follows along with the rest of the rig. If you like to, you can freeze the transformations for the fkIk_ctrl again, but it’s not really necessary.

With the fkIk_ctrl selected, now highlight all the Translate, Rotate, and Scale channels, hold down the RMB and Lock and Hide Selected. We’ll now add some custom attributes so we can switch between FK and IK mode. With the control still selected go Modify > Add Attribute and create the following attributes with these settings:

Long nameData TypeMin, Max, Default
l armfloat0, 1, 0
r armfloat0, 1, 0
l legfloat0, 1, 1
r legfloat0, 1, 1

For our control, 0 will indicate that we’re in FK mode and 1 will indicate that we are in IK mode. So by default, are arms will be in FK mode (easier to swing our arms with) and the legs will be in IK mode (easier for interaction with the ground).

007. FK IK blending


To drive the original arm chain with the FK or the IK joint chain, we’ll be driving the weight values for orient constraints. Open up the hierarchy in the Outliner so you can see all three arm chains. Select in this order: l_humerus_fk_jnt, l_humerus_ik_jnt, and l_humerus_jnt. Go Constraint > Orient (Options). Reset the settings and hit Apply.

Select in this order: l_radUlna_fk_jnt, l_radUlna_ik_jnt, and l_radUlna_jnt, and again create an orient constraint. If you now translate the IK controls or rotate the FK controls, you should notice that the original joint chain follows both with equal weighting. Let’s now use our custom attributes to define which arm chain (FK or IK) the arm should follow.

Make sure the controls are all back to their default positions and go Animate > Set Driven Key > Set. Select the fkIk_ctrl and hit the Load Driver button in the SDK window. Select the two orient constraint nodes (l_humerus_jnt_orientConstraint1 and l_radUlna_jnt_orientConstraint1) that we created (under l_humerus_jnt and l_radUlna_jnt), and hit Load Driven in the SDK window.

In the bottom-left window, select l_humerus_jnt_orientConstriant1, and in the Channel Box, set L Humerus Fk Jnt W0 to 1 and L Humerus Ik Jnt W1 to 0. Then select l_radUlna_jnt_orientConstraint1 and, in the Channel Box, set L RadUlna Fk Jnt W0 to 1 and L RadUlna Ik Jnt W1 to 0. We have now enabled the FK joint chain to drive the arm, and disabled the IK joint chain from doing so. Select the fkIk_ctrl and make sure L Arm is set to 0 (FK mode).

Back in the SDK window, in the top left box, highlight fkIk_ctrl (the driver object) and in the top right box, highlight L Arm (the driving attribute). In the bottom left box, highlight l_humerus_jnt_orientConstraint1 (the driven object), and in the bottom right box, highlight both L Humerus Fk Jnt W0 and L Humerus Ik Jnt W1. Hit Key on the SDK window and then do the same to the l_radUlna_jnt_orientConstraint1 too.

Now we need to reverse the settings. Select the fkIk_ctrl and set the L Arm to 1. Then reverse the weight values for the l_humerus_jnt_orientConstraint1 node, and hit Key once more in the SDK window. Do the same for the l_radUlna_jnt_orientConstraint1 node and then test out the arm. You should be able to drive the main arm with either the FK set of controls or the IK set.

008. Adding the twist joints


Start by un-parenting the geometry that’s currently attached to the arm joints. As we are adding additional twist joints, we will need to chop this geometry up further and add each new slice to the new twist joints. Hide the geometry, the FK and the IK joint chains, and the FK and IK controls. Select l_humerus_jnt and bring up the Joint Splitter tool. Click Select Start Joint, set the Jnt Qty to 3, and hit Split Joints. Following that, select l_radUlna_jnt and split the joint with the same settings.

We now have our twist joints but the constraint nodes that were associated with the original joints have also been duplicated. Under each new joint (not l_humerus_jnt and l_radUlna_jnt), go in and delete the duplicated constraint nodes. Now a bit of reorganizing of our arm chain is in order. Start by selecting l_radUlna_jnt and hit Shift + P to unparent it. Then select split1_JNT, split2_JNT, and split3_JNT, and parent them all under l_humerus_jnt. Now take l_radUlna_jnt and parent it back under l_humerus_jnt. Next, let’s do the same for the forearm. Select split1_JNT1, split2_JNT1, split3_JNT1, and l_armEnd_jnt, and parent them all under l_radUlna_jnt.

It’s time now for some renaming. Using the cometRename tool, rename the twist joints of the humerus: l_humerusTwist1_fk_jnt, l_humerusTwist2_fk_jnt and l_humerusTwist3_fk_jnt. Then rename the twist joints for the radius/ulna like so: l_radUlnaTwist1_jnt, l_radUlnaTwist2_jnt and l_radUlnaTwist3_jnt.

We’ll leave the twist joints here for now. Later on, once we’ve rigged the hand, we’ll drive the radius/ulna twist joints using the palm control.

The last thing to do here is to chop up the arm geometry so that each slice can be parented under one of the new twist joints. Once you’ve done that, test out the rig thoroughly.

Tip 001. Always Another Way

As with everything in life there are usually many ways to reach to the same end goal, so do try out different methods and techniques as you may find something that feels more comfortable for you. For example, we’ve used Set Driven Keys to allow the blending between FK and IK. This does the trick just fine but you can also do the same thing using Blend Color nodes. You’ll find these nodes in the Hypershade, under Create > Color Utilities, or just press Tab in the Node Editor and start typing blendColors. Experiment and see if you can get this technique working to control the FK/IK blending.

Leave a Comment