Constructing a Character Rig In XSI
By Adam Sale
**** A slight update to the methodology used in this tutorial can be found by clicking on this link to a set of notes. This tutorial is still very useful however, just some minor changes.
Character Rigging hasn't changed that much for me in the last couple of years. The most important thing to consider when creating good rigging , is to make things as simply as possible. I don't bog down my characters with too many automated features because I still need to learn more about them before fully implementing seamlessly. Its amazing how many funky situations you can find a charcter in, and you'll quickly find out that not every rig works well in every situation. If you're working with twelve or thirteen characters for a series, then you may need out of necessity to automate your rigs more to meet production deadlines.
When I teach character rigging I tell students to make rigs that work best for themselves. Different studios do things different ways, so variety and consistency is the key to your success at this art.Animators need to be able to select and manipulate the various control pieces of the character quickly and without hesitation. If you spend too much time trying to get at the controls of your characters, guessing what each control does, I guarantee your characters performance will suffer.
Today, most users basic character setups are very similar in design. There are a couple of other setups available on the net. There is, however, a lot of overlap between all techniques. Michael Isner recently came up with a very simple, intriguing character rig recently, that is one of the best I've seen in terms of interactivity, however I haven't had the time able to deconstruct yet. It looks to advance rigging by simplifying the controls an animator has to work with, yet still allowing for precise adjustment of pose.
This tutorial describes the means I currently use to rig my characters. I consider it an older method of doing things, but the results I get are what counts The methods are constantly evolving as innovative, creative, technical artists and streamlined open ended software have incited a renaissance of sorts within the CG community.
Control Objects.
XSI allows the user to work with Implicit objects as control objects. Implicits are predefined primitive volumes that do not show up at render time. They do show up as shaded objects in an OGL view though, and I find this annoying. I feel that the only objects that should be shaded when animating your character is the geometry of the character. If any of the control objects end up being shaded they obstruct parts of the characters geometry.


When you keep all of your control objects and bones at a uniform scaling value, it helps make your function curve results a lot cleaner and easier to deal with. Transform>freeze active transform will reset the scaling of your curves when you have all axes of the scaling tab activated.
Rig Controls
Your rig needs to be able to allow you to accomplish some basic character movements. Outlined below, is a list of all aspects of a setup and animation you'll need to take into consideration when building your rig.
1) a means to adjust the position and orientation of the hips without having to readjust the position of the feet
2) a means to adjust the sway of the hips without having to readjust th position and orientation of the upper body.
3) A way to control the direction of the knees independent of the hips and feet
4) A means to rotate the feet 180 degrees in opposing directions
5) A means to rotate the heel independent of the movement of the legs.
6) A means to rotate the balls of the foot.
7) A means to rotate each toe individually
8) A means to rotate the upper torso without having to readjust the position of the head
9) A way to place a hand on a surface and lock it there
10) A way to pick up an object and put it down (see interacting with scene objects tutorial)
11) A way to control the direction of the elbow independent of the shoulder and wrist effectors
12) A way to twist the forearm
13) A way to raise the characters arms above his head without having the shoulder deform horribly. (see shoulder setup tutorial)
14) A way to make an arm reach across the body and touch the opposite shoulder without unsightly deformation .(see shoulder setup tutorial)
15) A way to animate the fingers without having to zoom in close to choose the correct bone (predefined poses or hand sliders) (see hand pose slider tutorial)
16) A way to animate facial expression without having to pull and push points while in the middle of production. (predefined expressions) (see facial setup tutorial)
17) A way to move all of the animation to a new position in 3D space without causing the character to break into a million pieces. Numerous times, you'll come across a situiation where your director likes the animation, but for composiiton sake or continuity skae needs the whole action to move or rotate over a few units in a given axis. A global parent for all your controls is a must. On top of that, it gives you a way to quickly copy and paste actions from character to character. In XSI, we'll use a Model Null as a characters parent .
IK or FK.
There are always heated debates on newsgroups over whether or not to use IK or FK when it comes to animating. Personally, I think the debate isn't so much about whether or not to use IK or FK for the whole character, rather it's a debate over whether or not to use either system for the arms. I prefer to use a combination of the two on my characters. IK legs, FK spinal system, FK neck and head, FK hands and fingers, and either FK or IK on the arms depending on the requirements of the scene. Generally, I can always count on using IK for the legs. I don't see why anybody would ever want to use FK on the legs for any scene where the character interacts with the ground. FK makes it far to difficult to animate a convincing interaction with the ground. The one instance where I might use an FK system on the legs is if the character were swimming, or dangling in the air.
Setup Theory
There are a number of different constraint types we'll be using to rig up the character. Read on below if you're unfamiliar with constraints or just need a refresher.
1) Position Constraint: A position constraint locks the center coordinates of a slave object to the center coordinates of a master object
2) Orientation Constraint: An Orientation Constraint causes the rotational x axis coordinate of a slave object to follow the rotational x axis coordinates of a master object.
3) Direction Constraint: A Direction Constraint causes the positive x axis of a slave object to point at the center coordinates of a master object.
4) Chain UpVector Constraint: A type of constraint that can only be used on a skeletal object. Similar to the functioning of a direction constraint, except the Positive Y Axis of a slave object points at the center coordinates of a master object.
A handy thing to keep in mind with constraints is that they affect the entire branch of a characters hierarchy if applied to the parent node. This will come in handy later. Lets begin with the control box for the hips and torso.
We'll start by aligning all of the axes of the master controlling object (the spline box) with those of the slave object.
One of the annoyances of an initial rig setup is having to constrain the master to the slave so you first line up the ceneter of the two participant objects, and then relax the relationship and reverse it. You reverse the constraint by selecting the slave and constraining it to the master. Unfortunately, this merry go round step tends to throw a lot of people. Thankfully, the guys and gals at Softimage have been hard at work maiking add on improvements to XSI's UI. Oliviero Ozouk created the Invert Constraints script which automates this process for you. The only thing you'll need to do is line up all of the master control objects centers with their respective slave object, and then run the invert script. It will relax all of the constraints, and then reverse the master slave relationship you initially set. We'll be grabbing the script later, first lets set up some relationships.
The Hips
The hips will use a Position and an Orientation Constraint to get the area under the control of the rig. When applied properly, this control box, when selected will allow you to move the character up and down side to side and back and forth in any axis. Rotating the box will allow you to adjust the contrapposto of the hips. When you apply this constraint, you'll want the hips to swivel and sway without affecting the movement of the upper torso.
Select the hip box (master object) and click on constrain>position. When your mouse displays a pick session choos the chain root of the pelvis chain as its target. The hip box should pop right over the middle of the character, lining up the centers so the box ceneter is right on top of the root center.
With the box still selected, click on constrain>orientation. Choose the pelvis bone as the boxes target.

The Legs and Feet
In its most basic form the leg setup will use a position and orientation constraint to control the position of the characters ankle as well as the rotational direction of the foot. Select another spline box and click on constrain>position. Click the end effector of a leg as a target. With the box still selected, click on constrain>orientation and click on the first bone fo the foot. Repeat the same steps to constrain a new box to the other legs effector and foot bone. Rememeber, your constraints will not work at the moment. However, they will all be reversed in a later step which will allow for them to function.

Automatic Foot Roll
If you are building legs and feet that automate the foor roll process, then your job will be a little more involved. I never built this step much into my workflow until I saw Chris Maraffi's method of dealing with it using linked parameters. I encourage you to read about it in his book. Softimage XSI Character animation & FX. His web site URL is: www.3dguidemagazine.com While not absolutely necessary, it does simplify the keying process a little once implemented. Without the automatic foot roll, I usually end up adding an additional 2 or 3 keys to get the same result. And results are what we're after here, so find the one that works best for you.
Arms and Wrist
Here, you have a choice of going with FK or IK. The Fk method is obviously just a matter of rotating the individual bones into position and saving a rotation key though you could set up a control hierarchy as well for more realisim. I'll explain how to go about creating an IK setup here.

Shoulder blades
If you are building a cartoony character, you can probably get away with using a simple shoulder setup, as described in the basic skeleton tutorial, but if you require a more realistic approach to the shoulder area, I suggest you read though this tutorial, and incorporate it into your rig. Link to shoulder setup tutorial Otherwise, read on: Get a new box and constrain>position it to the end effector of a main shoulder bone. Repeat this for the other shoulders effector.

Chain UpVectors:
The third dimension. When you're using solely IK for the arms and legs, you'll find that you can't quite get the poses you really want. The reason is because more than likely you're using 2D chains for your arm skeletons. They only operate in a 2D plane. 2D chain arms and legs prevent you from controlling the position or direction a characters elbow and knee point in . The ability to manipulate the position of the knee involves forcing the IK chain to use a third dimension to operate along. A chain up vector constraint will simulate the third dimension of freedom we need when animating these parts of the body. The constraint will be implemented in your rig by creating a control object, (I use text and create lettering ), and making sure that the center of your control object is in the center of your control,... not a mile away in cartesian space. This control object will end up being a master constraining object that will always cause a slave objects Y axis to point towards its center.


Controlling the Head using a position and orientation constraint
Make a control Object with the center situated near the bottom of the control and the objects local X axis pointing up and down along the global Y axis. This object will control the head bones Orientation, and will be controlled through a position constraint to the root of the head chain. This constraint setup will allow for the head to remain in a fixed orientation when you adjust the spine of your character through FK. Try moving your head as if you were about to peek around a corner by leaning to one side. Notice how your eyes pretty much stay parallel with the ground, while the spinal column adjusts. Many people simply prefer to use FK and adjust the position of each spine and head bone to animate. I don't really have a preference here. It really depends on the nature of the scene I have to animate.
Select the control and click on Constraint>Position. Pick the head bone as a reference. Next, click on Constraint>Orientation and click on the head bone as a reference. Your control should now have its position controlled by the head bone, and the controls rotational transforms controlled by the rotation of the head bone.

Invert the Constraints.
At this point, these 8 boxes represent the crudest level of control you need for your character. The boxes are also the only constraints you'll need to invert from now on. Select all 8 boxes Open up a netview and clcik on XSI net. In the constraint section of the scripitng page, download the invert constraint script. Click on view>custom toolbars>script. AN empty scripting toolbar will appear as a floating window. In your C viewport open up a browser and naviaget to the donwloaded script. Drag and drop the script icon onto the script toolbar. In the pop up that appears, accept the defaults.

When you've done so, make sure that the 8 cubes are still selected, and then click on the Invert Constraint script. It may take a couple of seconds, but when the script has finished executing, and the custom button returns to normal, try selecting the waist cube and moving your character around . Select each of the cubes and try either translating or rotating it. The legs, arm, waist and shoulder constraints can all be animated with Translations. The legs,arm, waist and head control can all be animated with rotations
Make sure you undo your testing so that the character remains in its default pose.
Fine Tuning and Parenting the Rig
Now that your rig is built, it still requires a polishing up of sorts. The parts of the rig all need to be assembled so that they wind up in the same hierarchy and Model Get a null. Name it OFFSET_COG. Make this null the parent of your skeleton chains root (should be the root at the waist of your character. ) The OFFSET_COG null should also be the parent of each foot control box and the waist control box. Select a foot control and make it the parent of the upvector control object that is controlling the Y axis of the thigh bone. Selecting the foot box as a branch, allows you to pivot the and move the foot in any axis, and have the knee move into the best determned position. You will need to adjust the upvector control at times, but manually, I think that this method of dealing with an upvector does a pretty good job at guessing where you want that knee placed. When dealing with the parenting of the arm up vector controls, I generally follow suit and make each arm box the parent of the respective up vector control. Moving the arm in branch mode again allows for automatic adjustment of the elbow plane, but the user can also go in and adjust the position of the up vector if desired. The head controller can be made a child of OFFSET_COG null.
Create one more control box and place it at the characters shoulder height in the middle of his spine. This box will not be constrained to anything, rather, make it the parent of the two control boxes that control the effector of each sholder. Now if you select this new control as a branch, you can control the shruging of the characters shoulders, or the rotation of the upper torso. You do, however, still have control over each individual shoulder blade if you select it as a node, and translate it around. This way, you can switch between macro and micro movements
Make the new control box a child of the last spine bone before the neck chain begins. Again, this parenting is optional, just one of many ways of dealing with this object. Rotate any spine bone, and the shoulders should move along with the whole structure.
You can go one step further by making one of the controls for the arm (the control at the wrist) a child of a shoulder control. If the arm control is a child of this shoulder control hierarchy, the you can swivel the whole upper torso by selecting either a bone in the spine, or by branch selecting the main shoulder control. Again, this is all dependent on your needs from scene to scene, so keep it flexible

Get another null and name it Global SRT. This null will act as the center of your characters worldspace. Your characters animations will be performed in its own local space, which in turn is referenced in Global Space. Having a Global SRT null allows the OFFESET_COG null to have a solid global reference when the OFFSET_COG is branch selected and moved around. Users will need to use the offset COG when creating Offset Maps in the mixer, or when repositioning an actors performance on the stage.
Make the GlobalSRT null, the parent of the OFFSET_COG null.
Create a Model Space
The last thing you need to do to finish off the rig is to create a model space for the rig to exist in. Branch select the GlobalSRT Null and in the model module, click on Create>Model>New. The character will be placed under a model node in the Explorer. Name the model node accordingly, and make the model an external model. The difference between an internal and external model is in how the information about the model is stored. An internal model is stored as a model within the scenes .scn file. An .mdl file is also created in the projects. Models folder. When you create an External Model, the model is not stored within the scene information. Rather, it is stored as its own entity as an .emdl file within the Models folder of your project. The advantages to an external model file is that they can be imported from scene to scene using the file>import>model command. They can also be imported as referenced models, which have some pretty interesting uses. When you import a referenced model into a scene it comes in as a red model icon, instead of the normal black. The model is only a reference to the .emdl file. If you make a change to the external model file, and then reopen the scene that contains the referenced model, you'll see that the changes have been applied to the reference model in the scene. This makes for a great way to swap out low res and hi res characters at render time, or to swap out low res skeletons for hi res skeletons when dealing with facial levels. Its also a great tool to swap out low and hi res set props, or lighting schemes. The other great thing about external models is that they be made internal models cy selecting the model and clicking on Create>Model>Make local.
Your rig is all built. The next step involves all of the naming, marking hiding and selectability decisions that go into perfecting this character's harness. I'll leave that for another time. The Softimage 3D tutorial on my site might offer some additional insight into the final stage of character prep.
I hope you've enjoyed this tutorial, and found it useful. You're almost ready to animate.
Rigging your character in XSI was written by Adam Sale, TD at Joncrow Entertainment, and a Softimage Certified Instructor at many schools throughout Vancouver. He can be reached at adam@joncrow.com