Awesome Spine Setup
“Awesome Spine” Setup
|A few people have showed interest in how I create what I call the Awesome Spine. So here is my tutorial. I hope you enjoy it. Click on the images to make them larger.|
- Create a spine with 5 joints like Figure 1. and orient the joints correctly.
- Name the joints to avoid future confusion. I named the first set Spine_#_ik, replace the hash with a number. Duplicate the all the joints and rename them Spine_#_bind. See Figure 2.
- Duplicate the spine_1_ik and duplicate it again so you have two joints. Name them hip_joint, shoulder_joint respectively. Snap the shoulder_joint to the top spine joint.
- Now create an splineIK from spine_1_ik to spine_6_ik, with the attributes in Figure 3.
- Now select the spine_curve, hip_joint, and shoulder_joint. We are going to smooth bind these joints to the splineIK curve. Skin->Bind Skin->Smooth Bind. Use the selected joints and default settings for the rest. The hip and shoulder joints now control the spine. This is awesome because now we have independent control of the shoulder and hips. By rotating either joint we can get nice curves quickly. The only thing it can’t do yet is twist down the length of the spine. This is what we are going to spend the rest of the tutorial setting up.
- Create ikRPSolver for each joint in the spine_#_bind joints. A quick way of doing this is to go to Skeleton->IK Handle Tool-> optionBox and selecting the spine_1_bind, then shift-select spine_2_bind. Repeat for the rest of the joints. Figure 4 shows an ikRPSolver at each joint. The reason for applying the ikSolvers at each joint is so that we can have individual control of the twist at each joint.
- Parent each ikHandle to the respective parent + 1. what I mean by this is look at where the first ikHandle is. It located at the second joint in the bind chain, so parent the first ikHandle to Spine_2_ik, and so on. Also, you will need to point constraint the spine_1_bind to the spine_1_ik. so select spine_1_ik and shift-select spine_1_bind and click point constraint. Now if you move the hip or shoulder joints the spine_#_bind spine will follow.
- Create 5 locators. Exactly the number of ikHandles we have. Snap them to each joint, except the last one, and move it a few units from the spine. See Figure 4
- Create an empty group and snap it to the first joint in spine_#_bind. Then Parent the first locator to
the group. Do this for the rest of the locators. Now if you rotate the group along the twist axis of the spine it will rotate the locator around the spine. This is exactly the behavior we want. See Figure 5 for a snap-shot of what the locators and groups look like.
- Now select the first locator, and shift_select the first IKhandle and click pole vector constraint. Do this for all the locators and ikHandles. This is what will control the twist of the spine.
- Once all the locators are grouped parent the groups to the corresponding spine_#_ik joint. Now since the twist axis of the spine joints is the X-Axis, we need to select the all the groups we just parented
and Freeze Transformations. Now the groups will rotate about X and orbit the locators around the spine. You can see this better if you select all the spine_#_bind joints and turn on the Local Rotation Axis, Display->Transform Display->Local Rotation Axis. Figure 6.
- Now we are going to distribute the twist equally along the spine. Open up the HyperShade. And drag the hip_joint, shoulder_joint, and the locator groups into the HyperShade. This part might get kind of confusing, that’s why I am including a large picture of my HyperShade (figure 7) so you can see how I connect the nodes. But I will still try my best explain.
- I first created a plusMinusAverage node, known from now on as a pma. Name it spine_3_pma. With the attribute editor I changed it from Sum to Average. I connected the rotateX of the hip_joint to the
input1D of the pma. Then I connected the rotateX of the shoulder_joint to the input1D of the pma. I connected the output1D of the pma to the locator3_grp.rotateX. Now if you rotate the shoulder_joint 100 degress in rotateX, locator3_grp will have rotated 50 degrees.
- Now move on to locator2_grp. Create another pma. Name it spine_2_pma. Connect the output1D of spine_3_pma to the input1D of spine_2_pma. Then connect the hip_joint.rotateX to the input1D of spine_2_pma. Connect the output1D of spine_2_pma to locator2_grp.rotateX. With the shoulder_joint still rotated 100 degrees, the locator2_grp will now be rotated 25 degrees.
- Create another pma, name it spine_1_pma. Connect the hip_joint.rotateX to spine_1_pma.input1D.
Connect the spine_1_pma.output1D to locator1_grp.rotateX. We want locator1_grp to only get its rotation from the hip_joint. This seems like a waste of a utility node, but I included it for organization and so the HyperShade would make more sense.
- Create another pma, name it spine_4_pma. Connect the spine_3_pma.output1D to the spine_4_pma.input1D. Connect shoulder_joint.rotateX to spine_4_pma.input1D. Connect the spine_4_pma.output1D to locator4_grp.rotateX.The locator4_grp should now have a 75 degree rotation.
- Create another pma, and name it spine_5_pma. Connect the shoulder_joint.rotateX to the spine_5_pma.input1D. Connect the
spine_5_pma.output1D to locator5_grp.rotateX. Don’t forget to
change each plusMinusAverage node to “Average” instead of “Sum”.
- If we did everything right this is what it should look like Figure 8. Twist both the hip and shoulder_joint around to see how it works. It definitely twists past 180 without flipping.
- Now to add a few controls for easy selection and to finish it off. Create a NURBS circle, name it hip_ctrl. Duplicate it and name it shoulder_ctrl. Snap the shoulder_ctrl to the top of the spine. Select hip_ctrl and hip_joint and parent constraint it. Select the shoulder_ctrl and shoulder_joint and parent constraint it. Figure 9 shows the controls and the spine twisted and manipulated.
- I really hope this tutorial is helpful. If you have questions, comments, or critiques feel free to state
them. Let me know if there are errors and i’ll fix them as soon as i can. If enough people are interested I can show how to make the spine squash and stretchy. Its not that hard just takes a bit more work. Let me know and I’ll add an addendum to this post.
Here is a link to the file, change the .doc extension to .ma. It is a 2008 file, but you can change the header to work for your version of maya. awesomespine1