Adverti horiz upsell
Keeping Zero rottions with a SplineIk
Keeping Zero rottions with a SplineIk
ryokukitsune, added 2008-09-30 10:56:09 UTC 11,513 views  Rating:
(2 ratings)
Page 1 of 1

Solution 1: Joint/Curve moving.


When working with a SplineIK to quickly throw a character rig together it's a common problem to just throw it on the skeleton and hope for the best only to find that the curve that the SplineIK created has moved your joints to a non-Zero rotation screwing up your neutral pose.


There are a few work-around's of this problem but basically it just requires a bit of forethought and less reckless clicking.


As you can see in eg.1 I have a simple spine with a head attached (additional bones are hidden which are the spikes going off from the head joint) at this point is where you apply your SplineIK to the chain

The first solution is fairly easy and it conforms the curve to your joints rather than your joints conforming to your curve. Although this method requires a little compromise of the position of the joints its still better than losing your zero values of the rotations.



First select your CV curve tool from the curves tab (or by menu Create=CV Curve Tool) and create a curve point snapping the CVs to your joints. [eg2] as you can see in my joints the curve is not fallowing my joints very accurately.



Pretty much when the SplineIK is created it pretty much does the same thing but it doesn't do it very accurately so it moves your joints. The next step is to make the actual curve run roughly threw the pivot point of your joints. The first and last joints are fine but the two in the middle are a little out of position [eg3] for my curve all I had to do was select both CVs in the middle and scale them wider.



If you applied a SplineIK to the spine rite now it would still change the rotations because just moving the CVs of the control spline is inaccurate. Next we need to adjust the position of the joints to rest on our curve. Select your joints individually and press INSERT on your keyboard to turn on pivot mode and curve snap (hold down the "c" key) the joints to the curve roughly in the same position they where in. [eg4]



Good! Now the SplineIK will preserve the zero values of the joints but we have a small problem. Repositioning the joints, even slightly, has messed up our orientations. I usually find it easier to just remake the chain at this point. You could use the Orient Joint tool (Animation Menu Skeleton>Orient Joint=Option box) and select your joints, including the base of the spine joint and turn off the check box for "Orient Child Joints" [eg5] but I find it easier to just point snap a new joint chain over the old ones and delete the other chain.


This makes sure that all the joints are oriented correctly. I just unparented the joints connected to the head and then added them to the new chain, easy-peasy.


Now here is where we apply the SplineIk to our spine and see the glorious results of zero rotations but we have to make sure our settings are correct.


Select your SplineIk Tool (Animation Menu>Skeleton>Spline IK Handel Tool=Option box) in the tool option turn off the "Auto Create curve option" and it will wait for you to select a curve to use for the spine.



Select your base joint and your end joint then the last click select your curve. Congratulations, if you select your joints you'll see that they have zero rotations. You have preserved your bind pose and all is well with the animation gods.


This method works well with more joints in the chain but it does require more tweaking if you have more control points to manipulate, for chains used as: tails, hair or complex objects that require precise positioning of the joints you could position the curve using the "Curve Editing tool" under Surfaces Menu>Edit Curves=Curve Editing Tool.


You would select a point on the curve (not necessarily a CV) and move/snap it to the pivot of the joints however this has mixed results if you have less CVs than joints since the curve can't accurately fallow the joint chain.


Where you can use this tool to use the original joint chain the tool can be a bit awkward to use and often throws your CVs somewhere to maintain the shape of the curve depending on where you place the point on the curve. If you select a point on the curve that is nowhere near a CV it moves more than one CV to get the shape screwing up the placements and making rigging difficult on down the line.


Moving your joints ever so slightly is easier than animating with a control curve with really strangely rearranged CVs since later on you will be using clusters to move the CVs.


This option is less appealing than the former, this method requires you to either have your character in a completely straight spine position or compromise and just have your spine set up straight. This does not mean that they have to be aligned in one axis in fact you could have your joints pointing towards the end joint in the chain the trick is getting all the joints inline.



Based off the other chain I created a 2 joint chain going from the base of the spine (spine1) to the base of the neck (spine4) [eg7] I just parented the joint at the base of the neck to the base of the spine and deleted the other joints in the middle.


Orient your first spine joint (Animation Menu>Skeleton>Orient Joint=Option box) and make sure that "Orient Child Joints" is turned off so that this joint is now pointing directly at the neck. Next disconnect the neck joint from the base of the spine ("shift+p" keyboard shortcut) and select your first spine joint and duplicate it. If you don't disconnect the neck, when you duplicate you will duplicate any child joints in the chain, meaning that for each new joint you create you'll have another chain of head and neck joints.


click for larger version


Now we need to move it, activate your translate mode and go to the tool options and make sure "Object" mode is on and move it into position (down the X Y or Z axis, DO NOT move it in more than one axis or you will be responsible for screwing up the zeroed state). [eg8] repeat it for any other joints you should need in the chain, for mine it would be no more than two more joints.


Solution 2: straight spine


When working with a SplineIK to quickly throw a character rig together it's a common problem to just throw it on the skeleton and hope for the best only to find that the curve that the SplineIK created has moved your joints to a non-Zero rotation screwing up your neutral pose.


There are a few work-around's of this problem but basically it just requires a bit of forethought and less reckless clicking.


As you can see in eg.1 I have a simple spine with a head attached (additional bones are hidden which are the spikes going off from the head joint) at this point is where you apply your SplineIK to the chain

The first solution is fairly easy and it conforms the curve to your joints rather than your joints conforming to your curve. Although this method requires a little compromise of the position of the joints its still better than losing your zero values of the rotations.



First select your CV curve tool from the curves tab (or by menu Create=CV Curve Tool) and create a curve point snapping the CVs to your joints. [eg2] as you can see in my joints the curve is not fallowing my joints very accurately.



Pretty much when the SplineIK is created it pretty much does the same thing but it doesn't do it very accurately so it moves your joints. The next step is to make the actual curve run roughly threw the pivot point of your joints. The first and last joints are fine but the two in the middle are a little out of position [eg3] for my curve all I had to do was select both CVs in the middle and scale them wider.



If you applied a SplineIK to the spine rite now it would still change the rotations because just moving the CVs of the control spline is inaccurate. Next we need to adjust the position of the joints to rest on our curve. Select your joints individually and press INSERT on your keyboard to turn on pivot mode and curve snap (hold down the "c" key) the joints to the curve roughly in the same position they where in. [eg4]



Good! Now the SplineIK will preserve the zero values of the joints but we have a small problem. Repositioning the joints, even slightly, has messed up our orientations. I usually find it easier to just remake the chain at this point. You could use the Orient Joint tool (Animation Menu Skeleton>Orient Joint=Option box) and select your joints, including the base of the spine joint and turn off the check box for "Orient Child Joints" [eg5] but I find it easier to just point snap a new joint chain over the old ones and delete the other chain.


This makes sure that all the joints are oriented correctly. I just unparented the joints connected to the head and then added them to the new chain, easy-peasy.


Now here is where we apply the SplineIk to our spine and see the glorious results of zero rotations but we have to make sure our settings are correct.


Select your SplineIk Tool (Animation Menu>Skeleton>Spline IK Handel Tool=Option box) in the tool option turn off the "Auto Create curve option" and it will wait for you to select a curve to use for the spine.



Select your base joint and your end joint then the last click select your curve. Congratulations, if you select your joints you'll see that they have zero rotations. You have preserved your bind pose and all is well with the animation gods.


This method works well with more joints in the chain but it does require more tweaking if you have more control points to manipulate, for chains used as: tails, hair or complex objects that require precise positioning of the joints you could position the curve using the "Curve Editing tool" under Surfaces Menu>Edit Curves=Curve Editing Tool.


You would select a point on the curve (not necessarily a CV) and move/snap it to the pivot of the joints however this has mixed results if you have less CVs than joints since the curve can't accurately fallow the joint chain.


Where you can use this tool to use the original joint chain the tool can be a bit awkward to use and often throws your CVs somewhere to maintain the shape of the curve depending on where you place the point on the curve. If you select a point on the curve that is nowhere near a CV it moves more than one CV to get the shape screwing up the placements and making rigging difficult on down the line.


Moving your joints ever so slightly is easier than animating with a control curve with really strangely rearranged CVs since later on you will be using clusters to move the CVs.


This option is less appealing than the former, this method requires you to either have your character in a completely straight spine position or compromise and just have your spine set up straight. This does not mean that they have to be aligned in one axis in fact you could have your joints pointing towards the end joint in the chain the trick is getting all the joints inline.




Based off the other chain I created a 2 joint chain going from the base of the spine (spine1) to the base of the neck (spine4) [eg7] I just parented the joint at the base of the neck to the base of the spine and deleted the other joints in the middle.


Orient your first spine joint (Animation Menu>Skeleton>Orient Joint=Option box) and make sure that "Orient Child Joints" is turned off so that this joint is now pointing directly at the neck. Next disconnect the neck joint from the base of the spine ("shift+p" keyboard shortcut) and select your first spine joint and duplicate it. If you don't disconnect the neck, when you duplicate you will duplicate any child joints in the chain, meaning that for each new joint you create you'll have another chain of head and neck joints.


click for larger version


Now we need to move it, activate your translate mode and go to the tool options and make sure "Object" mode is on and move it into position (down the X Y or Z axis, DO NOT move it in more than one axis or you will be responsible for screwing up the zeroed state). [eg8] repeat it for any other joints you should need in the chain, for mine it would be no more than two more joints.


Now just parent the joints correctly and throw on a SplineIk.


click for larger version



Make sure that before you create your SplineIk that you turn back on "Auto Create Curve" since for this particular chain we don't need to make our own (Animation Menu>Skeleton>Spline IK Handel Tool=Option box)


This method does have zero rotations on your spine but it doesn't accommodate the position of the character unless your character is standing like a flag pole. This method could also work if you compressed the spine down to areas where you wanted more deformations (such as from the base of the spine to the base of the rib cage since the rib cage doesn't deform all that much due to the spine)


This method is quick and dirty and doesn't allow for the curvature of a real spine when at rest, use with caution because animation may be easy to fallow in the graph editor it is kind of weird to look at if the length of the spine is exaggerated to much. Honestly this method looks kind of mechanical in most situations so I recommend the first method over this one.


I hope this Tip/Tutorial helped someone and good luck in your future projects!

Ryoku