super nifty spine rig

Hey everyone. I have figured out a way to rig a chain of bones to a curve in Blender, and it’s really not that bad to set up. I’ll describe how to put it together. The beginning is probably the easier part to understand. It gets kind of confusing when I start to explain how the twisting is done. Here’s an animation that shows a tapered rectangle waving about, twisting, and doing a handspring/cartwheel type manuever =D. You could potentially do this with a normal curve deform, but the benefits of my rig is that it won’t experiance the up vector twisting issue like curves currently do, and you can place more children on any of these bones, which is necessary if you want to use this for a character’s spine, like I will be doing.

http://timmeh.org/wavez/twisty.jpg

I link to the blend at the bottom.

Simply put, I create a mesh that is a row of verts and I curve deform it, then I create emptys at each vertex and make them children of the verts, and then I IK constrain the bones to the emptys.

Instead of using Track To constraints, I use an IK constraint on all of the bones, except the first and last bones, because the IK constraint doesn’t have the up vector problem that the Track To constraint has. It’s also good to lock the Y axis of all these IK’ed bones, so that there is no twist at all (for this part of the rig). I also recomend turning the iterations down to 20, and don’t forget to set the ChainLen value to one, you’ll have very strange things happen if you set it to zero =). The first and last bones of the chain use Track To, and Locked Track. This means that they both need another empty to indicate the up vector. IMO, this method is the best and easiest to control for the animator.

What you would have at this point is a chain that can be rolled around the curve by changing the rotation of the root bone by moving it’s up vector object. The last bone of the chain is indipendant though, because it has it’s own up vector object.

We want this chain to twist between the first and last bones, so to do that you will want to create a new child bone for all the bones except the last two in the chain. The child bones need to be connected to the parents, and a simple extrude will create all of the new children at once. It’s important that the children match the parent’s other child’s rotation. The children should be given an IK constraint with identical settings to that of it’s parent’s other child. Now give all of the new children a rotation copy constraint, and use the very last bone of the chain as the target. By changing the influence setting, you will get more or less rotation. You want more rotation near the end that is close to the target, and less rotation at the other end =).

I hope this is helpful to someone, enjoy!!!

Here is the blend file. I am using bf-blender cvs, which I compiled on 11-1. I use emptys to move the curve, but I don’t like hooks so I wrote a script which I like better. You have to enable script links for this to work, and I have placed the button in the top right, so make sure you press that before you run the animation.
My blend file: twisty.zip

You need to fix the url to http://timmeh.org/wavez/twisty.zip. It leads to pic now.