PDA

View Full Version : Tail Setup


AlanWeider
09-30-2008, 09:30 PM
I have an interesting rigging issue that I can't seem to wrap my head around. I am working on a setup for a curling tail that would essentially create a nautilus curve. My director wants a control that you can translate that would allow this curve to begin at the base of the tail and as you translate it along the length, the tail curls. The tail must also have FK control. Now at first I'm thinking to do a set driven key to on one chain for the curl, and have another FK chain riding on top. My director, however, says that SDKs can cause problems on large projects with many shots, and therefore I can't use that.

So... I attempted to take a test tail, create a spiral curve, assign the tail to the curve as a motion path, create a flow path, remove the connection to the motion path on the object, which leaves a nice lattice in the shape of the spiral. Then, I can translate the curve along the length and I get a fairly nice curl. Problem is creating some sort of FK control on this type of setup.

I'm just wondering if
A: What exactly is the issue with an SDK setup for the curl?
B: Am I approaching the initial curl correctly or is there a better approach?
C: If I am approaching this correctly, any thoughts of giving FK control?

I'm a bit stumped so any suggestions would be greatly appreciated!

Thanks,

~Alan

Boucha
10-01-2008, 01:32 AM
As far as I know there is no problem working with sdks. But the issue might be accidently deleting the sdks key animation curve which could create a big problem. So, I suggest you to lock those keys:

to lock keys (select the animCurve):

setAttr -l 1 ".keyTimeValue";


to un lock keys (select the animCurve):

setAttr -l 0 ".keyTimeValue";

Also regarding the tail, a simple fk solution could do the trick, or if you want a bit more control then go for ik (spline). Create some control joints along the spline curve and skin the spline curve. This way you will have ik as well as fk control....you could also create spiral curves by duplicating from spline curve and create a blendShape...

AlanWeider
10-01-2008, 05:10 PM
Thanks for the advice Boucha!

So for the tail setup, what you are suggesting is to create an IK spline chain, then have another joint chain that the spline is skinned to? I have never thought of doing that, but this sounds like an interesting solution. I'll have to give it a shot.

~Alan

AlanWeider
10-03-2008, 12:09 AM
The result I have gotten by has not been as accurate as I would have liked, and the automation of this seems to be pretty complicated (generation of spiral curve, duplication, straightening of curve, creation of bone chains, application of blendshape of the original spiraled curve, creation of splineIK setup, etc.)

I want to explore the thought of using an fk chain that a spline curve is bound to, and writing an expression on the fk chain that forces it to create a logarithmic spiral curve.

After some research (been a while since I've done any real math...), it appears the formula I want to create such a spiral is:

Angle = (1 / b) ln(r /a)

where b and a are arbitrary values ( I believe b is the distance between each ring) and r is the radius of the spiral from the origin.

I have created a controller with the values of a and b inputted by the user. It is the radius of the spiral that is stumping me.

I have tried a few setups to determine this, but none have worked. I am using a distanceDimension node to figure out this value, with one end constrained to the last joint in the tail chain, and the other end follows the first as it translates upwards. The problem with this is that I am assuming that the last joint in the chain is the location of the origin of the spiral which isn't true (especially when the tail is completely uncurled and straight).

Just wondering if anyone has a thought on how to track this value? I hope my explanation isn't too confusing.

What I am planning to do is allow the animator to adjust the values of a and b to automatically curl the tail in a nice spiral (much like a nautilus shell). This curl will drive a spline IK so that after the tail is curled, the animator can manually adjust anything that seems off.

I have tried SDK and while this works, I may have to set this up on numerous characters and I'd like an automation of this. I figured math would be the most straightforward way to do this.

Thanks!

~Alan

EightBit
10-03-2008, 04:26 AM
Maybe this will be useful:
http://www.ryerdesign.com/tutorials/dynamicBones/index.html

tpalamar
10-03-2008, 03:36 PM
Here is a really simple way to achieve the effect . It is done as an expression. Its not optimized, but you can see the results quickly.

joint2.rotateZ=joint1.rotateZ*1.1;
joint3.rotateZ=joint2.rotateZ*1.1;
joint4.rotateZ=joint3.rotateZ*1.1;
joint5.rotateZ=joint4.rotateZ*1.1;
joint6.rotateZ=joint5.rotateZ*1.1;
joint7.rotateZ=joint6.rotateZ*1.1;
joint8.rotateZ=joint7.rotateZ*1.1;
joint9.rotateZ=joint8.rotateZ*1.1;
joint10.rotateZ=joint9.rotateZ*1.1;

You could assign this to an attribute to give it some more control. You would also want to apply this to secondary nodes or pipe the expression into an average node or an addDoubleLinear node so that you could still have direct FK control.

AlanWeider
10-03-2008, 06:53 PM
Hey thanks for the suggestion tpalamar. I tried out the expressions and it wasn't quite "spiraly" enough. I took the 1.1 you were using and made that a user defined value to multiply by. I then created another attribute and used it as an exponent. So the result was:

joint2.rotateZ=joint1.rotateZ* pow(curlCtrl.A, curlCtrl.B);

This seems to get a pretty decent result, and the modification of A and B allows the animator to adjust the attributes of the spiral.

My next task is determining where the beginning of the chain will begin. This way if I only want to curl the tip of the tail and not the base, I can.

I checked out the dynamic bones as well, eightBit, and while interesting, it wasn't quite what I was looking for. Thanks though!

~ Alan

tpalamar
10-03-2008, 07:02 PM
Cool man, right on!

CGTalk Moderation
10-03-2008, 07:02 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.