Original Link
Ranjit Singh Rana on May 23rd 2011
Tutorial Details
- Software: Autodesk Maya 2011
- Difficulty: Intermediate/Advanced
- Length: 61 Steps
- Project Files: None
Final Product What You'll Be Creating
In this tutorial, new Cgtuts+ author Ranjit Singh Rana will be covering the process of setting up a “Reverse foot lock” rig in Maya. First Ranjit will show us how to create it using a ‘chain of joints’ and then again using ‘groups’. Finally Ranjit will show us how to setup an “IK/FK switch” for an arm. We’ll also take a look at adding ‘Set Driven Keys’ for both the Reverse foot lock and IK/FK switch.
Step 1
To start, first create a joint setup as mentioned in the image below, and rename the joints accordingly. So Hip to ‘Hip_jnt’, Knee to ‘Knee_jnt’, Ankle to ‘Ankle_jnt’, Ball to ‘Ball _jnt’ and Toe to ‘Toe_jnt’.
Step 2
Now go to the Skeleton menu and click on ‘IK Handle Tool’ options, and then from the ‘IK Handle Settings’ select IKRPsolver and create a IK handle from the Hip to Ankle joint.
Step 3
Again go to the IK Handle settings and select IKSC solver and create two IK handles, first from the ‘Ankle’ to ‘Ball’ joint, and the second from the ‘Ball’ to ‘Toe’ joint. So now the ‘IKHandle1′ is from the ‘Hip’ to ‘Ankle joint’, the ‘IKHandle2′ is from the ‘Ankle’ to ‘Ball’ joint and the ‘IKHandle3′ is from the ‘Ball’ to ‘Toe joint’.
Step 4
Now create a chain of joints as mentioned in the image below for the joint setup, and rename it accordingly.
Step 5
Select the ‘Rl_base’ joint and Press Ctrl+A, from the Attribute editor go to ‘Drawing Overrides’ and check ‘Enable Overrides’, and choose a different color.
Step 6
Also increase the radius size from attribute editor, increase the radius for ‘Rl_toe’, ‘Rl_ball’ and ‘Rl_ankle’ the same way. Now it will be easier to select any joint from this hierarchy independently.
Step 7
Select ‘Rl_base’ and move the joint up while pressing the X key on the keyboard (snap to grid), now ‘Rl_toe’ is snapped with ‘Toe_jnt’, ‘Rl_ball’ with ‘Ball_jnt and ‘Rl_ankle’ with ‘Ankle_jnt’.
Step 8
Now select the ‘Rl_ankle’ joint first, and then select ‘IKHandle1′ and go to the Constrain menu and click on ‘Point’ constrain. Using the same method, apply a point constrain between ‘Rl_ball’ and ‘IKHandle2′ and ‘Rl_toe’ and ‘IKHandle3′.
Step 9
Next, create a controller like the one shown in the image below, ‘Rl_base’, press D first, then V while holding the first key, then snap the pivot of the curve to the ‘Rl_base’ using the middle mouse button. ‘Freeze transform’ from ‘Modify’ and Delete by type History from edit menu.
Step 10
Now select the ‘feet_cntrl’ curve and the ‘Rl_base’ and ‘Parent’ constrain them from the constrain menu.
Step 11
Now select the the ‘Feet_cntrl’ curve, and from the channel box, click on ‘Add attribute’ from the edit menu.
Step 12
Add attribute ‘Ball_roll’, keep the data type on Float, set the Min value to -5, Max to 10 and Default to 0 (as shown.)
Step 13
Add another attribute ‘Toe_roll’, keep the data type on Float, set the Min value to -5, Max to 10 and Default to 0
Step 14
Now go to Animate>Set Driven Key>Set… from animation module.
Step 15
Select ‘feet_cntrl’ and click on the ‘Load Driver’ from the ‘Set Driven Key’ option box. Select the ‘Rl_ball’ joint and click on the ‘Load Driven’. Now you’ll see ‘feet_cntrl’ in the left pane of Driver section and their attributes in the right pane, including two attributes that we’ve added ‘ball_roll’ and ‘Toe_roll’. ‘Rl_ball’ in the left pane of the Driven section and their attributes in the right pane.
Step 16
Now select the ‘ball_roll’ attribute of ‘feet_cntrl’ and the ‘Rotate Z’ attribute of ‘Rl_ball’, rotation axis can be confirmed by rotating the ‘Rl_ball’ joint in the viewport. Now click on the key and you’ll see the ‘Rotate Z’ attribute of the ‘Rl_ball’ turns pink, this means the connection has been created for the default value of the ‘ball_roll’ attribute.
Step 17
Now select ‘feet_cntrl’, which can also be selected by clicking it in the ‘Set Driven Key’ option, and set the value of ‘Ball roll’ to 10, select ‘Rl_ball’ and rotate it on the Z axis, or manualy give it some value. In my case it’s 40 and than click on key.
Step 18
Again select the feet_cntrl, and set the value of ball roll to -5 and Rotate Z of Rl_ball to -15.
Step 19
Now select ‘Rl_toe’ from the outliner and Create Set Driven Keys as we’ve created for ‘Rl_ball’. When ‘Toe roll’ is 0 click key on the default value of ‘Rl_toe’.
Step 20
When ‘Toe roll’ is at 10 Rotate Z of ‘Rl_toe’ is 70.
Step 21
And when ‘Toe roll’ is -5 Rotate Z of ‘Rl_toe’ is -8. And here we are done with the first method of Reverse foot lock.
Step 22
This is the second method of creating ‘Reverse foot lock’. Follow Steps 1 to 3 and then rename the ‘IKHandle 1′ to ‘Ankle_ik’, ‘IKHandle 2′ to ‘Ball_ik’ and ‘IKHandle 3′ to ‘Toe_ik’, as shown.
Step 23
Now select the ‘Ankle_ik’ and group it by pressing Ctrl+g, rename the group ‘Ankle_IK_grp’, and snap the pivot of this group to the ball position.
Step 24
Select the other two IK handles ‘Ball_ik’ and ‘Toe_ik’ and group them. Rename this group ‘Ball_toe_ik’, and snap the pivot of this group to the same ball joint position.
Step 25
Now select these two groups ‘Ankle_ik_grp’ and ‘Ball_toe_ik’ and group them by pressing Ctrl+g, rename this group ‘Toe_ik_grp’, and snap the pivot of this group to the toe joint.
Step 26
Create one more group of ‘Toe_ik_grp’, rename it ‘Heel_ik_grp’, snap the pivot of this group to the ankle joint position.
Step 27
Now create a controller curve ‘Foot_cntrl’ as we did previously in Step 9, and snap the pivot of this controller curve to the ball joint position. Freeze transform and delete the history of ‘foot_cntrl’.
Step 28
Select the ‘Heel_ik_grp’ from the outliner, and then Shift select the ‘foot_cntrl’ and press P on the keyboard. You can lock and hide the scale attributes of foot_cntrl.
Step 29
Select the ‘foot_cntrl’ and five attribute. First, set the ‘Ball_roll’ to Min 0, Max 10, default 0.
Step 30
Second attribute, ‘Toe_roll’ Min 0, Max 10, Default 0.
Step 31
Third attribute, ‘Toe_tap’ Min -10, Max 10, Default 0.
Step 32
Fourth attribute, ‘Toe_twist’, Min -10, Max 10, Default 0.
Step 33
And the last attribute ‘Heel_twist’, Min -10, Max 10, Default 0.
Step 34
Now go to Animate>Set Driven Key>Set, and select ‘foot_cntrl’ and click on ‘Load Driver’. Select ‘Ankle_ik_grp’ and click on ‘Load Driven’. Create a set driven key between the ‘Ball_Roll’ attribute of ‘foot_cntrl’ and the ‘Rotate X’ attribute for the ‘Ankle_ik_grp’.
Step 35
When the ‘Ball Roll’ of ‘foot_cntrl’ is at 10, set the ‘Rotate X’ of ‘Ankle_ik_grp’ to 30 and key it.
Step 36
Now select the ‘Toe_ik_grp’ and click on Load Driven. Create a Set Driven Key between the ‘Toe Roll’ attribute of ‘foot_cntrl’ and the ‘Rotate X’ for the ‘Toe_ik_grp’ and key it.
Step 37
When the ‘Toe Roll’ of ‘foot_cntrl’ is at 10, set the ‘Rotate X’ of ‘Toe_ik_grp’ to 60 and key it.
Step 38
Select the ‘Ball_toe_ik group’ and click on Load Driven. Create a Set Driven Key between the ‘Toe_tap’ attribute of ‘foot_cntrl’ and the ‘Rotate X’ for the ‘Ball_toe_ik’.
Step 39
In the same way, create a set driven key between the ‘Toe_twist’ attribute of ‘foot_cntrl’ and the ‘Rotate Y’ attribute of ‘Toe_ik_grp.
Step 40
And the ‘Heel_twist’ attribute of ‘foot_cntrl’ with ‘Rotate Y’ of ‘Heel_ik_grp’. And with this, you’re done with the second method of the ‘Reverse foot lock’.