Now I'll move onto the character rig. I'll be demonstrating the setup separated from the character then showing how this was implemented at the end.
The first important point is to remember to set your tool set to Animation at the top left. Then on the Skeleton drop down menu select the Joint tool. This can also be accessed from the Animation tab on your shelf.
Start out by clicking where the start of bones would be in the shape of a leg. From the top you have hip, knee, ankle, ball and toe bones. It helps to do this in side view. While doing this try to add a bend in the leg, later on this will be important.
After this, orient the joints by going to Skeleton > Orient Joint. Set your options to these:
This sets the Y axis down the bone, the Z forward and the X sideways. This allows you to rotate along the X axis for the legs which is the same as the world axis.
Next, create a controller for the foot. Make it look like a foot, much the same as the car. Freeze the transforms and name it. We'll come back to this later.
Now we'll add IK handles. Again, go to Skeleton > IK Handle Tool or activate it from your animation shelf. Click on the hip joint then the ankle joint. You'll see a line connecting them. This means they are now in a joint chain. Do the same from the ankle to the ball joint and finally the ball to the toe joint. The reason we added the slight bend in the leg is Maya determines which way the leg bends and if there isn't enough bend, it can become confused and break the leg.
You should have a leg similar to this with 3 IK handles attached. Rename these handles e.g. IK_Ankle, IK_Ball, IK_Toe. Eventually you'll need to label these Lft and Rgt since you'll need two legs.
At this stage we need to group these IKs together so they function correctly with one another. We'll name these groups and move the pivots as this is where the controller comes into play. For this we'll assume you are starting with the left leg, if not adjust the prefix Lft to Rgt.
- With your Ankle IK selected, Ctrl+G to create a group and rename it to Lft_Ball_Lift.
- The second group is the Ball and Toe IK handles, group these together and name it Lft_Toe_Lift.
- The next group is the two groups you just made. Select both the groups and group them again. Call it Lft_Toe_Roll.
- Lastly, select the group the Toe_Roll group and group it again calling it Lft_Ankle_Grp
This now means each IK has their own independent pivot. We now need to move the pivot point to the corresponding joint. Highlight a group and press Insert to move the pivot. Snap it, by holding V, to the joint labelled here.
Now we'll be adding the constraints from the controller to the groups. Point and Orient constrain the controller to the Lft_Ankle_Grp. Remember to keep Maintain Offset on.
Next add some attributes to the controller, like we did for the car. Modify > Add Attribute...
Add a Ball Lift attribute, set minimum to -10, maximum to 10 and default to 0. Then add a Toe Lift attribute with the same values.
Here we start to add in SDKs. For the Ball Lift, set the Driver to the Ball Lift attribute on the Controller and the Driven to the Rotate X on the Lft_Ball_Lift group we made earlier.
- Key 0 to a standing position.
- Key 10 on Controller to the highest elevation you feel it should go to.
- Key -10 to the lowest.
Do the same with the Toe Lift. Driver is Toe Lift attribute on the controller and the driver is the Lft_Toe_Lift group.
Now by typing numbers in between your min/max values on the controller, you're able to move the leg.