Keep up-to-date with Free tutorials!!

 

Sign up to our twice-monthly newsletter today for the latest tutorials, interviews and product information.

Sign me up to receive third-party emails from 3dtotal's partners, too!

- Latest news
- Exclusive Shop Offers
- Preview early content
- Plus much more

 

Not Ready to take that step? OK, Why not just Subscribe to the RSS Feed

 
submit tutorial
1 | 2 | 3
Introduction to rigging in Maya – the legs

By Jahirul Amin
Web: Open Site
| Your Rating:
rating star fullrating star fullrating star fullrating star fullrating star full
(5 Votes)
| 17715 Views
| 2 Comments
| Comments 2
Date Added: 28th March 2014
Software used:
Maya

FK IK switching

Now we will create the constraints to drive the main leg chain with either the FK or the IK leg chain. Select, in this order, l_upperLeg_FK_jnt, l_upperLeg_IK_jnt, l_upperLeg_jnt and go Constrain > Orient (Options). Make sure Constrain axes is set to All and hit Apply. Then select, in this order l_lowerLeg_FK_jnt, l_ lowerLeg _IK_jnt, l_ lowerLeg _jnt and go Constrain > Orient. In this order, select l_ankleTwist_FK_jnt, l_ankleTwist_IK_jnt, l_ankleTwist_jnt and again, apply the orient constraint. Lastly, select in this order l_ball_FK_jnt, l_ball_IK_jnt, l_ball_jnt AND GO Constrain > Orient.

Now that the original leg chain is following both the FK and IK joints, let's use SDKs to go between the 2 modes. Select the 4 orientConstraint nodes that we just created (you will find them under l_upperLeg_jnt, l_lowerLeg_jnt, l_ankleTwist_jnt and l_ball_jnt) and go Animate > Set Driven Key > Set. This should load the constraint nodes into the Driven window. Now select the fkIkSwitch_ctrl and hit Load Driver. Set the L Leg attribute to 0 (FK mode) on the fkIkSwitch. Then select the l_upperLeg_jnt_OrientConstraint1 node in the Driven portion of the SDK window. In the Channel Box, set L upper Leg FK Jnt W0 to 1 and L upper Leg IK Jnt W1 to 0. Do the same for the remaining 3 constraint nodes. Once all the FK W0 have been set to 1 and the IK W1 nodes have been set to 0, highlight L Leg in the top-right window of the SDK tool and highlight the weight attributes on the bottom-left window of the SDK tool. Then, hit Key on the SDK window. Now, simply set the L Leg attribute to 1 on the fkIkSwitch_ctrl, set all the W0 to 0 and the W1 to 1 on all the constraint nodes and hit Key once more.

1854_tid_fig_06.jpg
 
Setting up the FK IK switching using the Set Driven Key tool



Attaching the leg to the hip

Rather than parenting the leg chains directly under the hip joint, I want to keep them separate. That way, should I need to re-work any part of the rig, I can do so without disturbing other regions. So we are going to stick with using constraints to bring everything together. Select in this order, l_upperLeg_FK_jnt, l_upperLeg_IK_jnt, l_upperLeg_jnt and go Constrain > Point. Now select the newly created pointConstraint node (this will live under l_upperLeg_jnt) and go Animate > Set Driven Key > Set to load into the Driven portion of the SDK tool. Select fkIkSwitch_ctrl and click Load Driver. Set the L Leg attribute on the fkIkSwitch_ctrl to 0 (FK mode), the L Upper Leg FK jnt W0 to 1 and L Upper Leg IK jnt W0 to 0 on the pointConstraint node. In the SDK tool, highlight L _Leg on the top-right window and both weight attributes on the bottom-right window. Then hit Key on the SDK tool. Then set the value to 1 for the L Leg attribute on the fkIkStwitch_ctrl and reverse the weight values on the pointConstraint node. Hit Key once more on the SDK tool.

1854_tid_fig_07a.jpg
 
Using the Set Driven Key tool to control the pointConstraint node


Now, select in this order, l_upperLegDrive_IK_jnt, l_upperLeg_IK_jnt and go Constrain > Point. We now need a control that will be used to attach the IK leg to the hip. Select l_elbow_ctrl_offset, hit Ctrl+D to duplicate it and then Shift+P to un-parent it from its current location. Use the Search and Replace Names tool to rename _elbow to _hip_IK. Select l_hip_IK_ctrl_offset and parent it under l_upperLeg_IK_jnt. Zero out the translate and rotate values in the Channel Box for l_hip_IK_ctrl_offset and then un-parent it (Shift+P). In component mode (F8), edit its shape and position to make it more easily selectable. Now, in this order, select l_hip_IK_ctrl, l_upperLegDrive_IK_jnt and go Constrain > Point. Then, simply select l_hip_IK_ctrl_offset and parent it under hip_FK_ctrl. You can hide l_hip_IK_ctrl if you wish.

Let's take care of the FK leg next. Select in this order, l_upperLeg_FK_ctrl, l_upperLeg_FK_jnt and go Constrain > Point. Job done.

1854_tid_fig_07b.jpg
 
The addition of the l_hip_IK_ctrl; used to attach the IK leg to the hip control


Adding the twist joint


To create the twisting of the leg, we will create the same expression as we did for the arm. Open up the Expression Editor by going Windows > Animation Editors and create the following expression:

l_upperLegTwistA_jnt.rotateY = l_lowerLeg_jnt.rotateY * .25;
l_upperLegTwistB_jnt.rotateY = l_lowerLeg_jnt.rotateY * . 5;
l_upperLegTwistC_jnt.rotateY = l_lowerLeg_jnt.rotateY * .75;

l_lowerLegTwistA_jnt.rotateY = l_ankleTwist_jnt.rotateY * .25 * -1;
l_lowerLegTwistB_jnt.rotateY = l_ankleTwist_jnt.rotateY * . 5 * -1;
l_lowerLegTwistC_jnt.rotateY = l_ankleTwist_jnt.rotateY * .75 * -1;

Hit Create and then rename the expression l_legTwist_expr. The * -1 will make sure that the twisting of the lower leg does not go in the wrong direction. Select the l_lowerLeg_FK_ctrl and set the Rotate Order to YZX to reduce any funny business as we twist the lower leg. Let's now hook the knee twist up for the IK control. Open up the Connection Editor (Window > General Editor > Connection Editor) and load the l_leg_IK_ctrl into the left-hand side. Now load l_lowerLeg_IK_jnt into the right-hand side and connect kneeTwist (left-hand side) to rotateY (right-hand side).

1854_tid_fig_08.jpg
 
Using the Expression Editor to drive the leg twist joints

Cleaning up the leg rig

A bit of housework now. Select all the joint chains for the legs and l_leg_IK_ctrl_offset. Hit Ctrl+G to group them together and then rename this group l_leg_rig_grp. Open up l_leg_rig_grp, select all the joint chains in there and hit Ctrl+G to group them. Rename that group l_leg_jnt_grp. The last thing to do is color code the controls using the Drawing Overrides. All you need to do now is mirror the joints over and create the rig for the right-hand side.

Happy rigging.

1854_tid_fig_09.jpg
 
Both legs in place and the Outliner cleaned up



Related links

Jahirul's previous rigging tutorials can be found here:
Maya rigging: Introduction to rigging
Maya rigging: Introduction to rigging a human torso
Maya rigging: Introduction to rigging the neck and the head
Maya rigging: Introduction to rigging the shoulder and the arms
Maya rigging: Introduction to rigging the hands
Check out Jahirul's site for more




< previous page

 
1 | 2 | 3
Related Tutorials

Tutorial

Gallery Image.



Keywords: Bear, Cartoon, Making of, Tutorial, Maya, Mudbox, ZBrush, Photoshop, V-Ray

Go to tutorial
rating star fullrating star fullrating star fullrating star fullrating star half (20)
Comments 3 Views 17089

Tutorial

Gallery Image.



Keywords: Maya, Rigging, Hands, Fingers, Thumbs, Animation

Go to galleries 1
rating star fullrating star fullrating star fullrating star fullrating star full
Comments 1 Views 12583

Tutorial

Gallery Image.



Keywords: Animation, Rigging, Transformer, Decepticon, Modeling, Lighting

Go to galleries 1
rating star fullrating star fullrating star fullrating star fullrating star full
Comments 0 Views 14857

Tutorial

Gallery Image.



Keywords: Maya, Rigging, Animation, Hands, Arms, Shoulder, Character

Go to galleries 1
rating star fullrating star fullrating star fullrating star fullrating star full
Comments 0 Views 25359
Readers Comments (Newest on Top)
avatar
(ID: 266224, pid: 0) Andrew on Sat, 05 April 2014 7:04pm
Is that leg not going to be a bit flippy (kinda like this: http://blenderartists.org/forum/attachment.php?attachmentid=63811&d=1234792968 )?
avatar
(ID: 264387, pid: 0) Frank J. Guthrie on Fri, 28 March 2014 10:38pm
Great tutorial, again, but I can't see the videos...
Add Your Comment