Tutorial
Spline IK Setup in Maya
How to turn any spline IK joint setup into a soft body and use it in your animations

Page 1 of 2

clik on image ti view avi
click on image to view avi
click for better view
Click on images for larger view
This tutorial will show you steps you can take to turn any spline IK joint setup into a soft body and how you can use it in your animations. Spline IK has many uses. You can use it to make a character's back stretch; you can use it on a creature's tail, or tentacles. It's often considered confusing and complicated, but I'll show you how to bring it all together.

In a typical production pipeline, a dynamic spline IK setup would be done by Rigging or FX. It could be used by the animator to add to the performance, or it might be used by the FX department for collisions and dynamically driven systems. But before you begin, you should have some idea of what you'd like to achieve first. Write it down on paper, draw an outline. Decide what you can and can't do without. It is important to have an end goal in mind. Have you looked at other options first? Is spline IK the best method for what you need to accomplish? What is the final "look" you're trying to achieve? These are all questions you should ask yourself before you start. Preproduction is always important. [an error occurred while processing this directive] I am going to show you how to do this with a polygon cylinder. For those of you with characters already modeled, rigged and ready to go, you still need to read through each step and apply it to your character Once you've gone through the tutorial, you should have a good idea of how to do a dynamic spline IK setup. I'll try to cover some advanced notes and procedures at the end.

Each step will give you a good starting point from which you can build. If you get stuck on something, there are plenty of notes to help guide you through, especially for less experienced Maya users It would also be very helpful to read the Maya documenation to get a general idea of Soft Bodies, Spline IK, and their uses. We'll start out by creating the geometry for our spline IK setup.

click on images to enlarge    
click on image to enlarge

click on image to enlarge

click to enlarge
1. Create a polygon cylinder

create > polygon primitives > cylinder (click the option box).

Make the following adjustments to your settings:

set the radius to 1

height to 2

subdivisions around axis 5

subdivisions along axis 5

subdivisions on cap 1

You don't need to worry about axis or texture. Click "create."
click to enlarge

click to enlarge

click to enlarge

click to enlarge

click to enlarge

click to enlarge

2. Create a chain of joints in the cylinder.

We're going make one joint per division on the cylinder. Make sure you have the animation menu selected (you can hit F2 if you don't.)

Go to: skeleton>joint tool (you don't need to change any of the default settings).

Create your joints by changing to an orthographic view (hot key: space bar)

You cannot create joints in your perspective window, you must create them in either top, side or front. Start from the very bottom of the cylinder, hold down shift, and click on each division, stopping at the top.

You should now have five joints in a straight line going from the bottom to the top of the cylinder. If you want to orient your joints, you can, but it's really not necessary for this tutorial. Name each joint -- it's good practice to always name your joints. It doesn't matter what you name them,as long as it makes sense to you. I'll name mine from bottom to top "jointA, jointB, jointC, jointD, and jointEnd".

At this point, you need to duplicate your joints for future use. You can do this by going to edit > duplicate (leave default options). Once they are duplicated, rename them something like "splineIKJointA , B, C, D, End". You'll need these joints later on in the tutorial.

Finally, you need to constrain the original chain to the duplicated chain. To do this, first select the root (first joint in a chain) of the splineIK joints, then select the root joint of the original chain. In the animation menu click:

constrain > point (leave the default settings),


constrain > orient
(leave the default settings).


click to enlarge

click to enlarge
3. Smooth bind the cylinder to the original joint chain.

To bind the cylinder to the chain, we're going to use Maya's smooth binding option. First select each joint in the original chain individually (you can hold down shift and select them one at a time).

Now shift + select the cylinder.

Finally, go to skin>bind skin>smooth bind (click the option box).

change your settings as needed:

bind to: selected joints

bind Method: closest distance

max influences: 3

dropoff rate: 3

Click the "bind skin" button.
click to enlarge 4. Create the spline IK

skeleton > spline IK Handle Tool (leave the default options).

You should now have a cross-hair cursor, click once on the root joint, and then click on the last joint in the chain. A spline IK handle, a curve, and an effector node are created. The joints can now only be moved by editing the curve associated with the handle. Unlike regular IK handles, spline IK cannot be translated and rotated. There are actually only a few editable attributes which will affect the IK handle itself. You gain control by creating clusters.
click to enlarge

click to enlarge

5. Rebuild the spline IK curve

I feel it is important to have one CV for each joint in the chain to really get the necessary control. So let's say you had five total joints. Your curve should then have five CV's, one for each joint. You need to "rebuild" the curve. Select the curve and then press F3 to switch to your modeling menu-set. Go to:

edit curves > rebuild curves (click the option box).

What we are most concerned with is the number of spans the curve actually has. There is one span between two CV's. The first and last span do not count when rebuilding your curve. When you rebuild, it actually adds or removes spans from the middle. Since we have five joints, we need five CV's. In the "number of spans" section of the window, enter two. This will create two spans between the default two on the outside, giving us a total of five needed CV's. Come on, it's just a little math...It won't kill you!


click to enlarge

click to enlarge

click to enlarge

6. Make the curve a Soft Body

You now need to make your spline IK curve a Soft Body. To do this, first select the curve. Change your menu to Dynamics by hitting F4 on your keyboard. With your curve selected, go to:

Soft/Rigid Bodies > Create Soft Body (click the option box).

Change the following settings:

Creation Options : Duplicate Make Original Soft

Duplicate Upstream Graph (leave checked)

Hide Non-Soft object (leave unchecked)

Make Non-Soft a Goal (check this box)

Weight = 1.000

Click the "Create" button.

There will now be "curve1", your original Spline Curve, and "copyOfcurve1", the goal curve. Maya also created a particle object for the Soft Body, which can be found under your original curve. The particle object has important settings, such as goalPP (that means the goal weight per particle), and goal smoothness (this number determines how stiff or flexible the object is, the higher the number the more flexible it becomes).


7. Create the clusters

Since we now have all the necessary curves, and the right number of CV's, we need to make clusters. A cluster is a deformer in Maya that gives you control over a set of CV's, which can be determined either by selecting the CV's, or weighting the deformer. We want one cluster per CV. To do this, select your curve and enter into component mode (press F8 on your keyboard). Now select the CV's one at a time and go to deform > create cluster in the animation menu (leave the default settings). Do this for each CV in the curve, giving you a total of five clusters.


8. Parent the clusters

Select each cluster and group it once (hot-key CTRL + G). Select all the groups and do a Modify > Center Pivot . Then parent each group to its respective joint in the SplineIK chain. Now your "goal curve" will move with the animated joints, and cause the original curve (the one with the particles) to follow it.








9. Set the GoalPP for each particle

For each CV on your goal curve, one particle was created. So, since there are a total of five CV's, you created five particles when you made the curve into a Soft Body. Makes sense, right? Now what you need to do is give each particle an individual weight. This weight is referred to as GoalPP (or Goal Per Particle). The weight for each particle will determine its pull towards the goal curve.

To set this up, first select the particle object under "curve1". Then go into component mode by pressing F8 on your keyboard. Select all the visible particles, then go to the component editor under Windows > General Editors > Component Editor . Click on the Particle tab, which is the last tab in the right hand corner. You'll see different columns, but the one you need to change is "goalPP". Set each particle to be weighted differently. I weight my particles so that the first particle in the chain has a weight of 1 and then it falls off from there. I have good results with the following settings:

pt[0] 1.0
pt[1] 0.976
pt[2] 0.900
pt[3] 0.850
pt[4] 0.700


Another important setting to note is the goal smoothness. This is located on your particle object. Select the particle object and you'll see in the channel box the goal smoothness attributes default is set to 3. Once you start animating and your character or object is moving around, you'll be able to play with these settings to get the results you want.


10. Animate the spline IK

You're finally ready to test it out! You will be animating the new spline IK chain, not the original one. It will follow the spline IK chain based on the goalPP and goal smoothness settings. If you set some keyframes on the spline IK joints rotation and translation, you can play back your animation and watch the cylinder follow around the joints. In the scene file I've provided (top of this page), you can see an example of how everything should work if it was put together the right way.
   


Now that you have a "dynamic" setup, you can use Maya's very powerful Dynamics to effect the particles. You can use fields, rigid bodies, create particle collision events, or use a combination of these to dynamically animate your characters and creatures. The possibilities are endless, really. Go and see what you can come up with!

For those of you who are more familiar with Maya, you can continue onto the next section. I will briefly explain a few advanced topics and their use as it applies to Spline IK.





1 2 Next

Related sites: • Animation ArtistDigital AnimatorsDigital Post ProductionDigital ProducerHollywood Industry
Related forums:
[an error occurred while processing this directive]