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
Maya rigging: Introduction to rigging a human torso

By Jahirul Amin
Web: Open Site
| Your Rating:
rating star fullrating star fullrating star fullrating star fullrating star full
(21 Votes)
| 82627 Views
| 2 Comments
| Comments 2
Date Added: 10th February 2014
Software used:
Maya

Adding the Spline IK

Now go Skeleton > IK Spline Handle Tool (Options) and leave everything as it is except for the Number of Spans. Increase this to 2. Then, in the Viewport, click on spineA_IK_jnt and then on spineEnd_IK_jnt. If you are doing this in the Outliner, activate the tool, select spineA_IK_jnt, and hold down the Ctrl and then select spineEnd_IK_jnt. Rename ikHandle1 to spine_IK and curve1 to spine_CRV.

Spline IK works different to the usual IK in that it is the curve that deforms the joints, not the IK handle itself. And to deform the curve, we need to go into component mode and translate the CVs, which isn't very handy for the animator. We could create a cluster for each CV and deform the skeleton in that manner. I am not going to use that method for this tutorial but here is how you can, should you want to experiment: select a CV from the curve (hit F8 to go into component mode) and then go Create Deformers > Cluster. You could now parent the cluster under a control, which the animator could easily grab.

I'm going to use a method that I learned from Jason Schleifer's Animator Friendly Rigging series of skinning the curve directly to some joints. This is one of the many golden nugget tricks you can pick up from his amazing series so I highly recommend checking it out. To do this, simply select chest_IK_jnt, midSpine_IK_jnt, hip_IK_jnt and spine_CRV. With the 4 selected, go Skin > Bind Skin > Smooth Bind (Options) and use the following settings: Bind to: Selected joints, Bind Method: Closest Distance, Skinning Method: Classic Linear and Normalize Weights: Interactive. Everything else can stay as it is for now. When we get into the final skinning of the character, we will look at these settings in more detail. Hit Apply and you should now be able to deform the spine using the 3 joints.

1838_tid_step03.jpg
Adding the Spline IK to drive the joint chain

Using a Python script to create the controls

Next we need some controls for the driving joints. We will be using the method of creating controls that I went through in the previous tutorial, only we will be automating the process using a Python script. Although you can rig without any scripting, I find that some knowledge can hugely increase your productivity, especially on repetitive tasks such as creating controls. The manner in which I picked up an understanding of how to structure a script was to look at the History in the Script Editor and pretty much copy and paste the commands. In the Script Editor, you can also reveal every action by going History > Echo all commands. Although you will get the MEL commands used, you can very easily rework them to Python by using the Maya Help Docs (F1) or stick to MEL if that works for you. The reason for my choice of Python is that it is easily transferable to other packages. So this is the Python script we are going to use and a brief explanation of how it works:

#create controls script

"""
How to use:

1. Select all the joints you want to add controls to, and execute the script.

"""
import maya.cmds as cmds

sl = cmds.ls(sl=1)

for s in sl:

ctrlName = s.replace("_jnt", "_ctrl")

ctrl = cmds.circle( nr=(0, 1, 0), r=1, n=ctrlName)[0]

group = cmds.group(ctrl, n=ctrl + "_auto")

offset = cmds.group(group, n=ctrl + "_offset")

cmds.parentConstraint(s, offset, mo=0)

cmds.delete(cmds.parentConstraint(s, offset))

cmds.parentConstraint(ctrl, s, mo=0)

So this is how it works: you first need to select all the joints that you wish to add controls to (they need to end with a suffix of _jnt). The script will then create a circle, copy the joints' name but replace the _jnt with a suffix of _ctrl. The circle will be grouped twice to create the control hierarchy using the _auto and the _offset nodes as explained in the previous tutorial. The _offset node will then be parent constrained under the relevant joint (with Maintain Offset disabled) to get it into the correct place and then that constraint is deleted. Finally, the joint is parent constrained to the control. Feel free to modify the script as needed. You could also save this script to the Shelf to use it more swiftly. I'll be editing the script here and there where needed as I go. For example, I may edit the line:

ctrl = cmds.circle( nr=(0, 1, 0), r=1, n=ctrlName)[0]

to

ctrl = cmds.circle( nr=(0, 1, 0), r=10, n=ctrlName)[0]

This would increase the radius of the control circle from 1 to 10. Or I may edit the final line from:

cmds.parentConstraint(ctrl, s, mo=0)

to

cmds.orientConstraint(ctrl, s, mo=0)
cmds.pointConstraint(ctrl, s, mo=0)

This will constrain the joint to the control using orient and point constraints as opposed to a single parent constrain. FK joints will only need to be orient constrained to the relevant controls so we will again edit this script to suit our needs. Test it out on a few joints beforehand.

1838_tid_step04.jpg
A quick Python script to speed up the process of creating controls

Creating the IK spine controls

So let's apply this to our IK control joints. First open up the Script Editor (Window > General Editors) and create a new Python tab hitting Ctrl+T or holding down the Right Mouse Button in the Input window and selecting New Tab. When the Source Type window pops up, make sure to select Python. Drag the createControls.py script into the Input section of the Script Editor or go File > Load Script (Ctrl+O). You will find the script in the Script folder within the 3dt_rigging project folder that comes with this tutorial.

Now select hip_IK_jnt, midSpine_IK_jnt, chest_IK_jnt and execute the script by going Command > Execute (Ctrl+E). You can also execute the script by highlighting all the text and hitting Enter on the Numpad. The 3 controls should now be created and the joints parent constrained to them. Should you wish to edit the shape of the controls or the placement to make them easily selectable, do so in component mode (F8). Whatever you do, do not edit the position, rotation or scale in object mode as this will stop you from being able to revert back to the default pose.

1838_tid_step05.jpg
The IK controls created using the Python script





< previous page next page >

 
1 | 2 | 3
Related Tutorials

Tutorial

Gallery Image.



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

Go to tutorial
rating star fullrating star fullrating star fullrating star fullrating star full (8)
Comments 1 Views 16060

Tutorial

Gallery Image.



Keywords: ZBrush, Maya, Photoshop, fantasy, beast

Go to galleries 1
rating star fullrating star fullrating star fullrating star fullrating star half
Comments 0 Views 4055

Tutorial

Gallery Image.



Keywords: modeling, head, body, animation,

Go to galleries 1
rating star nonerating star nonerating star nonerating star nonerating star none
Comments 0 Views 17707

Tutorial

Gallery Image.



Keywords: 3ds Max, Flex modifier, Animation, Object

Go to galleries 1
rating star fullrating star fullrating star fullrating star nonerating star none
Comments 0 Views 7914
Readers Comments (Newest on Top)
avatar
(ID: 276734, pid: 0) Korosh on Thu, 22 May 2014 7:01am
The Jahirul's rigging series are definitely the best tutorials for not only Maya rigging but for rigging fundamental concepts I've ever read.
avatar
(ID: 272288, pid: 0) KryX on Sun, 04 May 2014 5:49pm
I have been reading rigging tutorials for months and I have to say that this is probably the most straight forward one I've come across. Having it in both print and video helped to follow a lot. Thanks
Add Your Comment