Introduction

In this tutorial, we will start to create the rig for the legs. The process will be very similar to that of the arms. We'll make sure the animator can switch between FK and IK mode and add extra joints to reduce any candy wrapper effects when twisting.

The creation of the leg chain will be approached in a slightly less conventional method than you've probably seen in the past, but there is a reason for this. Usually, I would create a 5-joint chain (hip, knee, ankle, ball and toe) and then add the controls, IK handles etc to get things moving. What I find, however, is that when I rotate the ankle inwards and outwards (supination and pronation), I need to use more than one axis to keep the foot planted on the ground. This is due to the orientation of the ankle joint aiming towards the ball joint. To combat this, I am going to break the leg down into 2 chains (the leg chain and the foot chain) and then add an extra joint at the ankle that will be orientated to the world. The ankle chain will then be parented to this extra joint and the extra joint will be parented to the end of the leg chain so everything works as normal. By adding an extra joint rather than changing the orientation of the original ankle joint, we can still use the length of the joints to create stretchy limbs if we wish to, as the parent joint will still be aiming towards its child joint.

So, as they would say in theatre, let's break a leg…

Maya rigging – the legs

Creating the leg joints

In the side view, go Skeleton > Joint Tool and create a 3-joint chain going from the hip region, to the knee and then ending at the ankle. Add a slight bend to the knee as this will make it easier for the IK to calculate how the leg should flex. Then in the front view, position the root joint into the left leg geometry. Now, with the root joint selected, go Skeleton > Orient Joint Tool. Set the Primary Axis to Y, the Secondary Axis to X and the Secondary Axis World Orientation to X (+). To get the joint chain to sit into the leg correctly, use a combination of the Joint Orient and the Translate Y (length of the joint) attribute. Rename the joints from root to tip: l_upperLeg_jnt, l_lowerLeg_jnt and l_legEnd_jnt.

Next, we will add the joint that will handle the ankle twisting. In the side view, use the Joint Tool to create a single joint at the point of the ankle. I hold down the V key on the keyboard to activate Snap to Points so it is precisely at the end of the leg chain. Make this single joint larger by increasing the Radius in the Channel Box, and then rename the joint l_ankleTwist_jnt.

A breakdown of the leg joints

Drop back into the side view now so we can create the joints for the foot. Again, use the Joint Tool to create a 3-joint chain, starting at the ankle (hold down the V key once more to snap to the same position), then at the ball of the foot and finally at the end of the toes. I place the joint at the ball of the foot pretty close to the ground as I find that I get a more pleasing result during deformation. I also hold down the Shift key when creating the final joint in the chain as this will create a straight joint. Rename the joints from root to tip: l_ankle_jnt, l_ball_jnt and l_toeEnd_jnt. With l_ankle_jnt selected, go Skeleton > Orient Joint Tool. The settings should be set from beforehand so simply hit Apply.

Now parent l_ankle_jnt under l_ankleTwist_jnt. Then select l_ankleTwist_jnt and use the Joint Orient (using the Y channel) in the Attribute Editor to sit the joint chain in the foot properly. Lastly, parent l_ankleTwist_jnt under l_legEnd_jnt.