Search the wiki
07. Rigging the feet
Without the reverse foot setup, it will be pretty tricky for the animator to create the necessary poses for the character to make contact with and push off from the ground. We’ll also introduce some additional joints and controls for the individual toes so the foot does not feel too stiff when animated.
001. Reverse Foot Locators
To drive the reverse foot, we will need a series of locators. These locators will be organised in a parent-child hierarchy allowing the IK foot to pivot from different positions. Create the first locator by going Create > Locator and call it l_heel_loc. If it is a bit small, increase the Local Scale in the Channel Box, under SHAPES. We want to position this locator at the back of the foot as well as orient the locator to match the angle of the foot.
First, parent the l_heel_loc under l_ankleTwist_jnt, zero out the translate values and only the value in Rotate Y to match the position and the angle of the foot. We will be duplicating all the other locators from this one so that their orientations will all match the angle of the foot. Do not zero out the value in Rotate X. We want to leave this as it is so positive Y equals up in World space.
Once you have positioned and orientated the locator correctly, hit Shift + P to un-parent it. Now translate the locator down slightly and towards the heel of the foot. To make it easier, activate Snap to Points (hold down the V key) and snap it to one of the vertices on the back of the foot.
With l_heel_loc selected, hit Ctrl+D to duplicate it and then rename it l_ball_loc. Use Snap to Points to snap it to l_ball_jnt. You may want to hide the geometry to do this so it does not snap to any points on the mesh. Duplicate l_ball_loc and rename the new locator l_toeFlap_loc. Leave this locator in its current position. Now duplicate l_toeFlap_loc and rename it l_toeTip_loc. Use Snap to Points to snap this locator to l_toeTip_jnt.
We now need 2 more locators for the inside and the outside of the foot. Duplicate l_toeFlap_loc and rename it l_innerFoot_loc. Translate this to the widest part of the inside of the foot, then duplicate l_innerFoot_loc and rename it l_outerFoot_loc. Position this locator on the widest part of the outside of the foot.
We should now have a total of 6 locators spread around the foot.
002. Reverse foot hierarchy
We’ll now create the hierarchy for the reverse foot and also add the additional IK handles that will allow the reverse foot to happen. Start by taking l_toeFlap, l_ball_loc and parent them under l_toeTip_loc. Now take l_toeTip_loc and parent it under l_innerFoot_loc. Then take l_innerFoot_loc and parent it under l_outerFoot_loc. And then take l_outerFoot_loc and parent it under l_heel_loc.
We now need to add some IK handles into the equation. Go Skeleton > IK Handle Tool (Options) and set the Current Solver to Single-Chain Solver. Now click on the l_ankleTwist_ik_jnt and then on the l_ball_ik_jnt. Rename this IK handle l_ball_ik. Now jump back into the IK Handle Tool (press Y to reactivate the last tool) and click on l_ball_ik_jnt, and then on l_toeEnd_ik_jnt. Rename this new IK handle to l_toeTip_ik.
Now it’s time to add the IK handles to our hierarchy for the reverse foot. Select both l_ball_ik and l_toeTip_ik, and parent them under l_toeFlap_loc. Then select l_leg_ik and parent it under l_ball_ik. Rotate the locators to test if the hierarchy has been created correctly and that you can create all the motion needed for a walk cycle and more.
003. Adding custom attributes
We now need to connect the reverse foot to the rest of the leg as translating the l_leg_ik_ctrl currently has no effect. I first want to neutralise the rotate value that currently lives on the l_heel_loc. To do this, with nothing selected, hit Ctrl + G to create an empty group node, and rename this to l_heel_loc_offset. Now take l_heel_loc_offset, parent it under l_heel_loc, and then zero out the translate and rotate values to snap it into place. Then with l_heel_loc_offset selected, hit Shift + P to un-parent it. Now select l_heel_loc and parent it under l_heel_loc_offset. l_heel_loc should now have no values for the translate and the rotate attributes. The next thing to do is select l_heel_loc_offset and parent it under l_leg_ik_ctrl. The hierarchy should now be complete and the foot should now be connected back to the leg.
Next, we want to add some custom attributes to drive the reverse foot. Select l_leg_ik_ctrl, go Modify > Add Attribute and add the following:
|Long Name||Data Type||Min, Max, Default|
|footRoll||Float||-10, 10, 0|
|heel||Float||-10, 0, 0|
|ball||Float||0, 10, 0|
|topTip||Float||0, 10, 0|
|heelTwist||Float||-10, 10, 0|
|toeTwist||Float||-10, 10, 0|
|sideToSide||Float||-10, 10, 0|
|toeFlap||Float||-10, 10, 0|
With our custom attributes created, we’ll next use SDKs to drive the locators.
004. Driving the foot with SDKs
So we’ll start with the footRoll attribute. The footRoll will be the main attribute that we’ll use for animating the walk cycle. With this attribute, we will be able to roll the foot back onto the heel (for the contact pose), then onto the ball of the foot and as the foot prepares to lift off, and then onto the tip toes as it does finally leave the ground. Although we could handle this with multiple controls, I find having them all under one attribute makes it simple for the animator to use and it’s less animation curves to balance and refine. We will however, give the animator the choice to use individual attributes to drive the foot or even add an offset from the main footRoll attribute. This will be handled by the heel, ball and the toeTip attributes.
Open up the SDK window by going Animate > Set Driven Key > Set and load l_leg_ik_ctrl as the Driver object. Then select l_heel_loc, l_ball_loc and l_toeTip_loc, and hit Load Driver.
Make sure the Foot Roll attribute on the l_leg_ik_ctrl is at 0 and all the rotate channels for the locators are also at 0. Then in the top-right box of the SDK window, highlight Foot Roll and in the bottom-left box, highlight all the driven objects. Then in the bottom-right box, highlight Rotate X. With everything highlighted, hit Key to set the default pose.
Next, set the Foot Roll attribute to -10, then select the l_heel_loc and set the Rotate X attribute to around -50. Then highlight all 3 driven objects in the SDK window and hit Key again. Going from 0 to -10 on the Foot Roll attribute should now roll the foot back onto the heel. Now set the Foot Roll attribute to 5 and use the Rotate X on the l_ball_loc to roll the foot onto the ball. I set the Rotate X to around 40. Again, highlight all 3 driven objects in the SDK window and hit Key.
Now set the Foot Roll attribute to 10 and zero out the rotations on the l_ball_loc. Then, set the Rotate X on the l_toeTip_loc to a value of around 70. Highlight all 3 driven objects once more and hit Key on the SDK window. The Foot Roll attribute should now drive the necessary motion needed to plant the foot and for the foot to take off.
Let’s now tackle the Heel, the Ball and the Toe Tip attribute. These attributes will allow the animator to work on top of the Foot Roll, or use these 3 independent attributes instead of the one. I’ll describe the process for the Heel attribute and leave you to handle the Ball and the Toe Tip. First make sure all the attributes on l_leg_ik_ctrl are set to 0. Then in the SDK window, highlight Heel in the top-right box, highlight l_heel_loc in the bottom-left box and Rotate X in the bottom-right box. With everything in its original pose, hit Key on the SDK window. Now increase the Heel attribute to 10 and use the Rotate X on the l_heel_loc to rotate the foot back onto the heel. I set it Rotate X to -50; this is the same amount as we did using the Foot Roll attribute. Hit Key when ready on the SDK window.
Using the same method, repeat the process for Ball and the Toe Tip attribute.
Next, let’s introduce the Heel Twist and the Toe Twist. In the SDK window, highlight Heel Twist in the top-right box, highlight l_heel_loc in the bottom-left box and Rotate Y in the bottom-right box. With everything in the default pose, hit Key. Then increase the Heel Twist attribute to -10 and rotate the l_heel_loc so the foot rotates inwards. I ended up setting the Rotate Y value to -40. Hit Key on the SDK window when you are happy with the pose. Then set the Heel Twist attribute to 10 and set the Rotate Y attribute to 40 on the l_heel_loc to rotate the foot outwards. Once again, hit Key on the SDK window. Repeat the process for the Toe Twist attribute, using the l_toeTip_loc as the driven attribute.
Now we want to add the ability to roll the foot from side to side and we’ll do that with (surprise, surprise) the Side To Side attribute. To do this, first select l_outerFoot_loc and l_innerFoot_loc, and then hit Load Driven on the SDK window. Highlight Side To Side in the top-left box, both driven objects in the bottom-left box, and the Rotate Z attribute in the bottom-right box. Hit Key to set the default pose. Then set the Side To Side attribute to 10, set the Rotate Z on the l_outerFoot_loc to -45. Make sure both driven objects are highlighted in the SDK window and then hit Key. Now set the Side To Side attribute to -10, set the Rotate Z on the l_innerFoot_loc to 45, highlight both driven objects once more in the SDK window and hit Key.
The last attribute to work with now is the Toe Flap. In the SDK window, highlight Toe Flap in the top-left box, l_toeFlap_loc in the bottom-left box and Rotate X in the bottom-right box. With everything at 0, hit Key on the SDK window. 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 window. Now, set the Toe Flap to -10, the Rotate X to 40 on the l_toeFlap_loc and hit Key one last time on the SDK window.
At this stage, all the attributes for the l_foot_ik_ctrl should now be working. Make sure to test them out.
005. Finishing up the knee setup
We are now going to add a feature that will let the animator decide if they would like the knee control to automatically follow the foot control or not. This is one way to reduce knee popping when the leg is raised quite high.
Start by creating a locator (Create > Locator) and rename it l_knee_follow_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_leg_ik_ctrl, zero out the translate and rotate attributes in the Channel Box to snap it into place, and then un-parent the locator.
Next, we want the locator to be driven by the foot. Select in this order: l_leg_ik_ctrl, l_knee_follow_loc and go Constrain > Point. Then with the same selection, go Constrain > Orient (Options). In here, set the Constrain Axes to only Y and hit Apply. You can orient constrain the X and Z axes if you wish but I find it causes a bit too much movement to the knee control, especially when you twist the foot from side to side.
Now we want l_knee_follow_loc to drive the _offset node of our knee control. So, select in this order l_knee_follow_loc, l_knee_ik_ctrl_offset and go Constrain > Parent (Options). This time, make sure you have Maintain Offset enabled and hit Apply. Translating the IK foot control now will carry the knee with it.
We now want add the ability to turn this feature on and off. Let’s add a custom attribute to the knee control to drive enable this. Select l_knee_ik_ctrl and go Modify > Add Attribute. Give it a Long name of kneeFollow. Set the Data Type to Enum and add the following Enum Names: foot and world.
Open up the Set Driven Key window now and load l_knee_ik_ctrl as the Driver object and the parent constraint that we just added (it should be living under l_knee_ik_ctrl_offset) as the Driven object. Make sure the Knee Follow attribute is set to Foot, the L Knee Follow Loc W0 is set to 1 (on the parent constraint) and hit Key on the SDK window. Then set the Knee Follow attribute to World, the L Knee Follow Loc W0 is set to 0 and hit Key once more on the SDK window. Test out the results and we should be good to go.
006. Rigging the toes
I won’t go into so much detail regarding rigging of the toes as they were handled in much the same way as the fingers. I will, however, give you a brief run-down and then more importantly, go over how I connected the toes up to the rest of the foot.
Starting with the creation of the joints, for each toe, I created a metatarsal joint and then a joint for each phalanx. Using the createControls.py script, I then created a control for each joint (minus the end joints). The controls were then organised in a parent-child relationship so that they would mimic the FK setup of the joints.
After this, it was a case of connecting the toes to the foot rig. First, all the root joints for each toe were parented under l_ball_jnt. Then it was a case of getting the toes controls to follow both the FK and the IK foot controls. We could simply parent the top node of each control to l_ball_jnt, like we have for the joints, but I’d like keep the joints separate from the controls. So, here is how I went about doing this. First I created an empty group node. To do this, hit Ctrl + G with nothing selected. Call this node l_toes_ctrl. With that node selected, hit Ctrl + G to group it to itself. This will be used as an offset node. Rename this node to l_toes_ctrl_offset. Now take the _offset node, parent it under l_ball_jnt, zero out the Translate and Rotate values to snap it into place, and then hit Shift + P to un-parent it.
Now take all the top nodes for each of the toes controls and parent them under l_toes_ctrl. With all the control hierarchies for the toes now living under a single group, we will simply parent constrain that group to l_ball_jnt. So, select in this order: l_ball_jnt, l_toes_ctrl_offset and go Constrain > Parent. The toes should now follow the foot correctly but do make sure to test it out in both FK and IK mode. Make sure to do this for both legs and then move on to the next stage, which is to do a little spring cleaning.
007. Cleaning up the foot rig
With both legs complete, it is time to tidy up the Outliner. Start by selecting l_knee_follow_loc and r_knee_follow_loc, and hit Ctrl + G to group them together. Rename this group to knees_follow_loc_grp and parent that group under rig_doNotTouch_grp. Then select l_toes_ctrl_offset, group it to itself and then call that group l_toes_ctrl_grp. Do the same for the right-hand side. Select both l_toes_ctrl_grp and r_toes_ctrl_grp, and parent them both underneath rig_ctrl_grp.
That’s it for the leg. Next, we’ll do some major tidying up to prepare us for the skinning stage.