Next, we will handle the Heel Twist and the Toe Twist. In the SDK tool, highlight Heel Twist in the top-right window, highlight l_heel_loc in the bottom-left window and Rotate Y in the bottom-right window. With everything in the default pose, hit Key. Then increase the Heel Twist attribute to -10 and rotate the l_heel_loc inwards; I ended up setting the Rotate Y value to -50. Hit Key on the SDK tool. Then set the Heel Twist attribute to 10 and set the Rotate Y attribute to 50 on the l_heel_loc to rotate the foot outwards. Once again, hit Key on the SDK tool.
Next, we will create the ability to roll the foot to the side using the Side To Side attribute. To do this, first select l_footOuter_loc and l_footInner_loc and then hit Load Driven on the SDK tool. Highlight Side To Side in the top-left window, both driven objects in the bottom-right window and the Rotate Z attribute in the bottom-right window. Hit Key to set the default pose. Then set the Side To Side attribute to 10, set the Rotate Z on the l_footOuter_loc to -50. Make sure both driven objects are highlighted in the SDK tool and then hit Key. Now set the Side To Side attribute to -10, set the Rotate Z on the l_footInner to 50, highlight both driven objects once more in the SDK tool and hit Key.
You should now be able to use the extra attributes on the l_leg_IK_ctrl to create a wide range of poses with the foot.
Using the Set Driven Key window to drive the side-to-side motion
Adding knee controls
For the knee, we will create a similar control to that of the elbow. First select l_elbow_ctrl_offset and hit Ctrl+D to duplicate it and then Shift+P to bring it out from its current hierarchy. Then, use the Search and Replace Names tool (you'll find this under Modify) to replace _elbow with _knee. Also, get rid of the 1 on the end of the offset node. To position the control correctly, do the following: select in this order; l_upperLeg_jnt, l_lowerLeg_jnt, l_legEnd_jnt, l_knee_ctrl_offset and go Constrain > Point. Then select in this order: l_lowerLeg_jnt, l_knee_ctrl_offset and go Constrain > Aim. Now delete the 2 constraint nodes living under l_knee_ctrl_offset. You can translate l_knee_ctrl_offset along the Z-axis. Make sure you do this in Object translate mode.
To drive the knee with the control, select in this order; l_knee_ctrl, l_leg_IK and go Constrain > Pole Vector.
Placing the knee control correctly in Object translate mode
Auto knee follow
In this step, we will add the ability for the knee to automatically follow or not follow the foot. Start by creating a locator (Create > Locator) and rename it l_kneeFollow_loc. If you need to increase the size of the locator, remember to use the Local Scale in the Channel Box. Then parent l_kneeFollow_loc under l_ankleTwist_jnt, zero out the translate and rotate attributes in the Channel Box to snap it into place, and then un-parent the locator.
Now, we will constrain the locator to l_ankle_loc so it follows along. Select, in this order; l_ankle_loc, l_kneeFollow_loc and go Constrain > Point. Make the same selection again, in the same order and then go Constrain > Orient (Options). Set the Constrain axes to Y in the options box and hit Apply. Next, we will parent constrain l_knee_ctrl_offset to l_kneeFollow_loc. (NB I do this later on in the video).
So, select in this order: l_kneeFollow_loc, l_knee_ctrl_offset and go Constrain > Parent (Options). Make sure Maintain Offset is turned on and hit Apply. The knee control will now follow the l_leg_IK_ctrl. We want the ability to turn this on and off. To do this, we will just turn off the weight values for the 2 constraint nodes that we added.
First we need to add a new attribute to the knee. Select l_knee_ctrl and go Modify > Add Attribute. Give it a long name of kneeFollow. Make the Data Type an Enum and give it 2 Enum Names: foot and world. Now select the 2 constraint nodes that live under l_kneeFollow_loc and go Animate > Set Driven Key > Set. This should load the constraint nodes into the Driven window. Select l_knee_ctrl and hit Load Driver. Set the Knee Follow attribute to foot, highlight the pointConstraint and the orient Constraint node in the bottom-left window and L Ankle Loc 0 in the bottom-right window and hit Key. Now set the Knee Follow attribute to world, reverse the weight values on the constraint nodes and hit Key once more. You should now be able to dictate if the knee control should or should not follow the foot control.
Creating an attribute that allows the animator to decide if the knee control should or should not follow the movement of the foot
Cleaning up the foot rig
Start by selecting l_kneeFollow_loc and parent it under worldFollow_loc_grp. Then rename worldFollow_loc_gp to follow_loc_grp. Then parent l_knee_ctrl_offset and parent it under l_leg_rig_grp. Hide all the locators that are surrounding the foot by hitting Ctrl+H. We are not quite finished yet as we need to add the ability to bend the toes. We will do this in the next step.
A bit of spring-cleaning in the Outliner
Adding the toe flap
To add the ability to flap the toe, we will drive the l_toeFlap_loc with a custom attribute on the l_leg_IK_ctrl. Start by selecting l_leg_IK_ctrl and going Modify > Add Attribute. Give it a long name of toeFlap and give it a Minimum of -10, a Maximum of 10 and a Default of 0. Select l_toeFlap_loc and go Animate > Set Driven Key > Set so it loads it as a driven object. Select l_leg_IK_ctrl and hit Load Driver.
Highlight Toe Flap in the top-right window, Rotate X in the bottom-right window and hit Key. Then increase the Toe Flap attribute to 10 and rotate the l_toeFlap_loc by -40 in the X. Hit Key once more in the SDK tool. Now, set the Toe Flap to -10 and the Rotate X to 40 on the l_toeFlap_loc. Hit Key one last time on the SDK tool.
That should be the foot and the leg good to go. Next time we will go Set Driven Key crazy on the fingers. Happy rigging.
Adding the ability to raise and lower the toes
Check out the previous chapters:
Maya rigging: Introduction to rigging
Maya rigging: Introduction to rigging a human torso
Maya rigging: Introduction to rigging the neck and the head
Maya rigging: Introduction to rigging the shoulder and the arms
Maya rigging: Introduction to rigging the hands
Maya rigging: Introduction to rigging the legs
Check out Jahirul's site
To see more by Jahirul Amin, check out Beginner's Guide to Character Creation in Maya
and 3ds Max Projects