This Cyber Monday Tuts+ courses will be reduced to just $3 (usually $15). Don't miss out.
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.
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'.
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.
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'.
Now create a chain of joints as mentioned in the image below for the joint setup, and rename it accordingly.
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.
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.
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'.
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'.
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.
Now select the 'feet_cntrl' curve and the 'Rl_base' and 'Parent' constrain them from the constrain menu.
Now select the the 'Feet_cntrl' curve, and from the channel box, click on 'Add attribute' from the edit menu.
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.)
Add another attribute 'Toe_roll', keep the data type on Float, set the Min value to -5, Max to 10 and Default to 0
Now go to Animate>Set Driven Key>Set... from animation module.
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.
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.
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.
Again select the feet_cntrl, and set the value of ball roll to -5 and Rotate Z of Rl_ball to -15.
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'.
When 'Toe roll' is at 10 Rotate Z of 'Rl_toe' is 70.
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.
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.
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.
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.
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.
Create one more group of 'Toe_ik_grp', rename it 'Heel_ik_grp', snap the pivot of this group to the ankle joint position.
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'.
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.
Select the 'foot_cntrl' and five attribute. First, set the 'Ball_roll' to Min 0, Max 10, default 0.
Second attribute, 'Toe_roll' Min 0, Max 10, Default 0.
Third attribute, 'Toe_tap' Min -10, Max 10, Default 0.
Fourth attribute, 'Toe_twist', Min -10, Max 10, Default 0.
And the last attribute 'Heel_twist', Min -10, Max 10, Default 0.
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'.
When the 'Ball Roll' of 'foot_cntrl' is at 10, set the 'Rotate X' of 'Ankle_ik_grp' to 30 and key it.
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.
When the 'Toe Roll' of 'foot_cntrl' is at 10, set the 'Rotate X' of 'Toe_ik_grp' to 60 and key it.
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'.
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.
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'.
Now, from here I’m going to explain the 'IK/FK switch' for the arm. Create a joint setup for the arm and rename it according to the image below..
First let's create a controller for forward Kinematics (FK), create three circles and snap them to the shoulder, elbow and wrist joints. Rename them 'Shldr_cntrl', 'Elbow_cntrl' and 'Wrist_cntrl' respectively.
'Freeze transformations' and delete the history of all three.
Select the 'Shldr_cntrl' and group it by pressing Ctrl+g on the keyboard, rename this group 'Shldr_cntrl_grp', follow the same process for the 'Elbow_cntrl' and the 'Wrist_cntrl'.
Select these groups individually and 'center pivot' for each one from the Modify menu, (Modify>Center Pivot).
These groups can be used to adjust the curve controller, by aligning properly to the joint.
Now select 'Shldr_cntrl', and Shift select the 'shoulder joint'. Then click on the 'Orient Constrain Options' from the constrain menu (Constrain>Orient).
Check 'Maintain offset' and click on the 'Add' button. Following the same process, 'Orient Constrain' the other two joints with the corresponding curves.
Select the 'Elbw_cntrl_grp', and middle mouse drag and drop it on the 'Shldr_cntrl'. This way the 'Elbw_cntrl_grp is now a child of the 'Shldr_cntrl'. In the same way make the 'Wrist_cntrl_grp' a child of the 'Elbw_cntrl'.
Now add a IKHandle with the IKRP solver selected, from the Shoulder to the Wrist joint.
Create a controller as shown below, rename it 'IK_cntrl'. Then select it, and shift select the 'IKHandle' and 'Point Constrain' it from 'Constrain' menu.
Create a controller and rename it 'Pole_vectr'. Place it as shown in the image below and Freeze Transformation, delete it's History, then select it and Shift select the IKhandle. Than click on 'polevector' from the Constrain menu.
Create one more controller and rename it 'IK_FK'. Add the “IK_FK” attribute in the channel box and keep the data type as Enum. Change the Enum names from Green and Blue, to IK and FK respectively.
Now go to Animate>Set Driven Key>Set, select the 'IK_FK' controller and Click on 'Load Driver' from the 'Set Driven Key' option.
Select 1. 'Shldr_cntrl', 2. 'Elbw_cntrl', 3. 'Wrist_cntrl', 4. 'IK_cntrl', 5. 'Pole_vectr' and 6. 'IKHandle1' in the outliner and click on Load Driven.
Now with IK highlighted for the IK FK attribute of 'IK_FK' controller.
Turn visibility OFF for the 'Shldr_cntrl', 'Elbw_cntrl' and 'Wrist_cntrl', and then Key them.
Keep the visibility ON for the 'IK_cntrl', 'IKHandle' and 'Pole_vectr', and also keep the 'IK Blend' set to 1 for the IKHandle, and Key them.
Now when 'FK' is highlighted for 'IK FK' attribute.
Turn visibility ON for the 'Shldr_cntrl', 'Elbw_cntrl' and 'Wrist_cntrl' and Key them.
Turn visibility OFF for 'IK_cntrl', 'IKHandle' and 'Pole_vectr', and set the 'IK Blend' to 0 for the 'IKHandle', and key all of them.