Rigging the Basic Spine
In this post we are going to set up a basic spine for a character. In later posts we will make it have have the ability to stretch to match the controller’s position, and squash to maintain volume.
A biped spine is the two hard masses of the rib cage and the pelvic bone held together by spline wrapped in squishy stuff. So this is how we will set up the spine in Maya. We will have a pelvis joint, a chest joint, and several joints that make up the spine that are driven by a spline ik system.
Lets Start:
SETTING UP THE JOINTS
The first thing to do is to import your bind skeleton into a new scene. Delete the arms, legs, neck, and head, leaving only the pelvis, chest, and spine joints.
I like to make a duplicate of this heir achy and put it in a display layer and set it visualization mode to template. The helps to make sure that while you are doing your setup your joints do not drift away from the rest.
We need to separate the top of the spine from the chest joint. There is a Maya tool to do this called “disconnect joint”. This command will make break the joint chain and make a new joint for the missing end of the spine. Make sure you zero this new joints rotate and jointOrient Values after using the command.
We will also unparent the spine from the pelvis joint. Rename all your joints to something that will denote them as joints in the animation rig, and not to be directly bound to the skin later on. I like to use the postfix “CTR” for control. So , for example, you would name your spine joints, spineACTR, spineBCTR, ect, ect. It is always a good idea to name your end joint something unique. I use the obvious END so spineCtrEND.
Next we need to make root locators for our newly broken hierarchy. The root locator is a transform that acts as a buffer for translate, rotate, scale information, so that the joint itself can have all it’s values at zero when at rest.
For the first joint in the chest, spine and pelvis repeat the following
-
create a locator and give it a name that denotes it as a root locator. I like to use CHN or RUT, ie spineRUT or spineCHN
-
parent the root locator to the root joint in the chain and zero out all it’s transformations. This should snap the locator to the exact spot of the joint chain.
-
Unparent the locator and repartent the joint under the locator
Once you are done your scene and outliner should look something like this:
CREATING THE CONTROL OBJECTS
Now we are going to go about creating controls for the whole upper body, the chest and the hips. We want the chest and the hips to be siblings under the upperBody controller so that they can move independent of one another.
You can use any shape, but for the sake of simplicity I am just going to use nurbs circles. Make three, and name them in such a way to denote that they are controller objects. I tend to use the postfix “CON” ie hipsCON, chestCON, and upperBodyCON. We are also going to make root locator for our controllers. They serve the same buffering function as the root locators for the joints.
Create three locators and name them in such a way that denotes them as root locators for your controller objects. I like to use NUL or OFS for “offset” ie hipsNUL, chestNUL ect ect.
Parent your controller objects under their respective locators. Now point snap (hold down the “v” key) the chest locator were the root of the chest joint is. We want the hips controller object and the upperbody controller object to sit in between the base of the spine and pelvis bone.
To do this select the spine and pelvis joints and then the upperbody locator and pointConstrain with maintain offset turned off. This will snap the locator (and it’s children) to a point directly between the two selections. Delete the pointConstraint you just made and point snap the remaining hips locator to the upperbody.
Also select all your controller objects and run a edit > delete by type > history to get rid of any construction nodes that make up the nurbs curve.
When it is finished it should look something like this:
CREATING THE SPLINE IK
We are now going to create the spline ik to connect the hips to the chest. Hide your controller objects, chest joints and pelvis joints so that they are not distracting.
We need a nurbs curve for the ik solver to use to rotate the spine. Go to create > EP curve. Now, by holding down v, snap the first point of the curve to the base of the spine joints and the second to the end of the spine. Go into the curves attribute editor (make sure your are on the shape and not the transform) and turn on the display cvs under the component display tab.
As always rename the curve to something that denotes it as a curve. I use the postfix CRV. In this case I have called the curve spineIkCRV.
We are now ready to create out ik. Go to skeleton > Ik Spline Tool and open the options box. Uncheck all the option boxes. Your mouse cursor should be a crosshair now denoting that Maya is now in a building mode. Holding the crtl button on the keyboard, in the outliner, select the base of the spine, the tip of the spine, and then the curve.
You will now have an ikHandle1 in world space, and an effector1 node under the last joint in the spine. Rename these two objects to something useful. I used spineIkHND and spineikEFF.
Now if you move the cvs of the curve you can see that the joints snake along with it. Pretty cool, but this is not effective for animation. We are going to bind the curve to joints at the top and bottom of the spine os that we can use those to indirectly control the spine.
Create two locators. These will be the root locators for the joints that will bind the curve. Name them something like spineikCrvANUL, and spineikCrvBNUL. Now create two joints named spineikCrvAJNT, and spineikCrvBJNT. Parent these under their respective locators.
Point and oritnet constrain, without offset, spineikCrvANUL to the first joint in the spine hierarchy, and spineikCrvBNUL to the last. Now Delete the constrains as they were only to position these joints.
You should now have something that looks like this:
Now that our joints are in place, we can bind the curve to them. Go to skin > bind skin > smooth bind option box.
Set “Bind to” to “Selected Joints”, “Bind method” to “closest distance”, and “skinning method” to “classic linear”. Now select your two new joints and press the “bind skin” button. Now when you move one of the new joints the spine joints snake along. The bottom will act strange right now b/c we turned off “root on curve” when we made the ik, but we will fix that when we parent everything together.
We need to adjust the weight of the cvs so that the top two cvs are only affected by the top joint and vise versa with the bottom.
Hide your joints by toggling their view off in the viewport through show > joints. Select all the cvs of the curve and go to windows > general editors >component editor. Under the smooth skins tab you will see entries for the four cvs and the two joints. Cv[0], and [1] should be 1.00 for jointA and 0.00 for B. Cv[2], and [3] should be 0.00 for jointA and 1.00 for B. once you are done with this turn the joints visibility back on.
CONTROLLING THE SPINE TWIST
Notice that if we rotate either joint on it’s aiming axis we get no twisting action in the spine. This is because curves have no rotation data in Maya. We will use the splineIk’s advanced twist feature to control the twisting of the spine. The advanced twist is basically another aim calculation built into the solver node, and as such has many of the same options. For more information on aim constraints see my post on them.
So we can better see what is happening with our spine, turn on the local rotation axis for all of the spine joints except for the start and end. Also turn on the local rotation axis for the bind joints we just made
Select the splineIkhandle and open the attribute editor. Under Iksolver attributes > advanced twist controls toggle on “enable enable twist controls”. Now yo will see you local rotation axis flip and spin. Not to worry this is only because we have not set the proper parameters yet.
Set the “world up type” to “Object rotation Up start/end”. Now simply type in the name of the joint at the base of your some in “World Up Object” Field and the name of the joint at the top of the spine in “World Up Object 2”. You should now see your local rotation axis are back to normal.
Here are The setting mentioned above and what they pertain to in the rig:
so now when we twist the two end joints we get nice distributed twisting long the length of the spine joint chain. It is also a good idea to increase the radius of the two bind joints so that they are easier to select.
PUTTING IT ALL TOGETHER
Wow that was a lot to take in. Luckily the hard part is over, all we have left to do is parent the systems together. Unhide the other elements of the spine that we hid while setting up the Ik.
We want to parent everything that moves with the pelvic bone to the hips controller object, so that would be the pelvis locator, the bind joint at the base of a the spine, and the spine itself.
We want to parent everything that moves with the chest under the chest controller object, so that would be the chest joint locator, and the bind joint at the top of the spine. Finally we want to move the entire system with the upperBody so we parent both the locator above the chest controller object and the locator above the hip controller object to the hips controller object.
Here is what your outliner will look like when all that is done:
- Figure 12
We still have a few nodes that are not tucked away yet. The curve that drives the spine ik and the ik handle should never be touched or moved by an animator. So, we will put them under a “noTouch” null. Select them both the curve and the splineIkhandle and press crtrl+g. This will put them under a transform that sits at the origin. Rename this group something like spineNoTouch.
There is still one small problem with our setup. If we take the hips and rotate them in z we can see that our spine top pulls away from our chest base.
This is an easy fix. Zero the rotations in the hips. Select the spine tip and the root locator of the chest joint and point constrain. Now when we rotate the hip the chest sticks to the top of the spine while still following the orientation of the chest controller object.
Now all we do is group the noTouch and the upperBody locator into another group called spineRigNUL. If everything has gone to plan if you toggle the visibility of this new group on an off you should see no difference in the spine setup and the joint we templated at the beginning of the tutorial.
Having all the controller object the same color is boring and visually confusing. Lets fix that. Select the hips and chest controller objects, and press the down arrow key. What you have just done is select the shape node of the curve. Go to display > wireframe color and pick a color from the menu that pops up.
Now Just delete the template joints and the display layer and now you have yourself a working spine right…go you!!!
CHEERS
B.
































