Rigging Hips in Softimage|XSI 2.01

Topics : Constraints, Expressions, Scripts, IK, Inheritance and Custom Parameters

By Michael Donovan

Inspired by: Stephan Anderson, Anthony Rossano

 

EST Completion time:

Newbie : 30 minutes

Experienced : 5 minutes

Purpose :

This tutorial will teach you one way to set up hips for a character. This setup is designed to give the animator maximum flexibility and at the same time drive the character through the use of a number of expressions. At no time is the animator restricted by the result of any of the expressions and at all times has the capability to compensate or override the results of said expressions.

A quick not on the controls for the feet : The icons MUST be BRANCH selected for this setup to work (see my leg tutorial for a clearer explanation)


The result : A fun, fast and flexible rig to animate.


Please contact me with any comments, questions or corrections at mdonovan@shimmerstudios.com.

 

 

Provided Files  
Hips_Start.scn Start scene.
Hips_Done.scn Completed scene.
Tans Icon.vbs Script to create a Translation CTRL icon.
HipIcon.vbs Script to create a Hip Icon

 

Preparing the Scene

 

If you have not completed my Leg Rig tutorial, you should do that now. If you want to skip that step altogether … drag this scene into XSI through Netview.

 

Branch Select CTRL_RIG

Add to the selection by holding down the sift key and Branch Selecting L_Rt_Leg

 

Duplicate the selection by pressing CTRL-D

 

Rename all of the duplicated nodes to reflect the right side of the body.

 

EXAMPLE:  L_Ctrl_Heel1 becomes R_Ctrl_Heel

 

Make R_Ctrl_Heel a child of the original Null_Ctrl_Origin

Make R_Ctrl_FloorHeight a child of CTRL_RIG

 

Your schematic should look like this now:

 

  (click to enlarge)

 

Branch select R_Ctrl_Heel and move it over –2 in the global z by typing in –2 in the X (you need to do this translation in the X because this branch is inheriting a 90 degree rotation from its parent Null_Ctrl_Origin)

 

Do the opposite for the Left side.

 

Your scene should look like this  :

  (click to enlarge)

Creating the Hips

HipsIcon

This object, created from a script, serves as the pelvis of the skeleton.  It has three single point clusters, which serve as attachment points for the skeleton through constraints. It will be the parent of the leg and spine chains.

 

Create a HipIcon using the script mentioned at the top of this tutorial.

 

Scale it down to .29 its original scale by entering .29 in the scale transform X,Y,Z boxes.

 

Freeze the history on this object by clicking Freeze in the edit portion of the MCP. This will remove the center operator that was created when we scaled the object down.

 

Translate it in Y and Z until it fits in between the two leg roots.

 

Open an explorer and navigate to the cluster collection on the HipsIcon.

 

 

Select R_Rt_Leg and using Constrain-Object to Cluster constrain it to the R_HipCluster cluster.

 

Select L_Rt_Leg and using Constrain-Object to Cluster constrain it to the L_HipCluster cluster.

 

Select HipsIcon and make it the parent of R_Rt_Leg and L_Rt_Leg

 

You may be wondering why I needed to use constraints here. The reason is simple. Yes through parenting the leg roots will move, but unless we constrain them to the HipsIcon it is possible to for them to become inadvertently offset by accident during animation. (i.e. you moved them directly or something)

 

 

Nulls

We need to create several nulls to handle different actions on the hips. It is interesting to note that there will be no direct animation on the hips at all. All of the animation will be derived indirectly from control objects through the use of expressions.

 

Using Get-Primitive-Null create six nulls and name them as indicated below.

 

Null_BetweenHeels:

This Null indirectly contributes to the base translation values of the hips through the Null_HipTrans node. It also controls the position of Null_HipAdjParent.

 

Using Constrain-2 Points constrain this null to R_Ctrl_Heel and L_Ctrl_Heel

 

Make this node a child of CTRL_RIG

 

Null_HipAdjParent: 

This node serves as an origin for Ctrl_HipAdjuster. By being its parent, it zeros out the SRT values of Ctrl_HipAdjuster. It will also be positionally constrained to Null_Between Heels and thus will control the position of Ctrl_HipAdjuster. It resides in the CTRL hierarchy, separate from the skeleton.

 

Align this null to HipsIcon using Transform-Align Objects

Translate this null approx. 2 units behind HipsIcon

Enable compensation mode by clicking the Comp button in the Constrain portion of the MCP.

Using Constrain–Position constrain Null_HipAdjParent to Null_BetweenHeels

Exit compensation mode by clicking the Comp button again.

 

Make this node a child of CTRL_RIG

 

Ctrl_HipAdjuster:

Create a TransIcon using script mentioned at the top of this page.

Rename it Ctrl_HipAdjuster

Align this node to Null_ HipAdjParent

Make Null_HipAdjParent the parent of Ctrl_HipAdjuster

 

This node, derived from a script, gives the animator complete control over the translation and rotation of the hips. For example if you wanted to squat your character down, you could drag this icon down in Y and the hips would follow. It can be translated of rotated and keyed directly. Its can be thought of as an override to the expressions in the setup.

 

  (Ctrl_HipAjuster and Null_HipAdjParent)

 

Null_HipTrans:

This node is the parent of the rotation nodes of Hip setup. It directly controls the translation of the hips through propagation. Its values are derived from Null_BetweenHeels and Ctrl_HipAdjuster.

 

.Posx

Null_BetweenHeels.kine.local.posx + Ctrl_HipAdjuster.kine.local.posx

.Posy

Ctrl_HipAdjuster.kine.local.posy + 10.743 (this current value of this null ... it is the only constant in the setup and sometime I make it a custom parameter so that I can tweak it easily after setup)

.Posz

Null_BetweenHeels.kine.local.posz + Ctrl_HipAdjuster.kine.local.posz

 

Rotational Nulls: The following Nulls are necessary in order to avoid gimble lock.

ALIGN these nulls to HipsIcon.

 

Null_Hips_RotY: (color this green)

This null directly controls the Y rotation of the Hips. Its values are derived from the rotation of the feet and the rotation of the CTRL_HipAdjuster.

 

.Roty

av( L_Ctrl_Heel.kine.local.roty, R_Ctrl_Heel.kine.local.roty ) + Ctrl_HipAdjuster.kine.local.roty

 

Null_Hips_RotZ: (color this blue)

This null directly controls the Z rotation of the Hips. It is this rotation that contributes to the contraposto pose that is found in a natural stance and in a natural walk. Much of Michelangelo’s work incorporates this idea. It’s basically a pose in which one part of the body twists away from another part, the weight of the body being balanced on one leg rather that two.

 

.RotZ

cond( L_Ctrl_Heel.kine.local.posy > R_Ctrl_Heel.kine.local.posy, -( L_Ctrl_Heel.kine.local.posy - R_Ctrl_Heel.kine.local.posy ) , abs( L_Ctrl_Heel.kine.local.posy - R_Ctrl_Heel.kine.local.posy ) ) + Ctrl_HipAdjuster.kine.local.rotz

 

Null_Hips_RotX: (color this red)

This null controls the tilt of the torso. It is directly controlled by the x rotation of the CTRL_HipAdjuster.

 

.Rotx

Ctrl_HipAdjuster.kine.local.rotx

 

 

 

Hips Rotational Hiearchy

  • Make Null_HipTrans a parent of Null_Hips_Roty
  • Make Null_Hips_Roty a parent of Null_Hips_Rotz
  • Make Null_Hips_Roty a parent of Null_Hips_Rotx
  • Make Null_Hips_Rotx a parent of HipsIcon

A note about rotational inheritance of effectors :

1) Reparenting the Feet to an overall Null

You may notice that the feet twist in X when the hips are moved to the sides of the body.

Here is how to correct that.

 

(click to enlarge)

2) Disabling the inherited rotations of the leg effectors from their roots.

Originally I thought that THIS step was the only thing I needed to do to correct the forementioned problems,

but I was incorrect. I kept this step in the tutorial because I believe that it is supposed to accomplish the same

thing. Let me know what you find out.

 

 

Now you have an supercool simple to animate rig that can really boogey down. hehe.