PDA

View Full Version : Expression based animation


mblade
08-28-2003, 07:26 AM
I'm currently working on an animation of a bike chain. I have successfully created a single 'link' object for the chain and have animated it following the correct path using expressions for its X,Y and B channels. Now I want to create clones of this item (150!) and offset the animation for each one to make a complete chain.

I'm very keen to avoid having 3 sets of expressions for each object. My idea was to add an X-channel (basically an unused morph channel) and write my scripts so that each one used this x-channel as an offset. Thus setting the x-channel defines the position of the link in the chain. I make 150 copies and adjust the x-channel for each one.

The problem is that when I duplicate the object the scripts all reference the x-channel of the first object. What I really want is for my expression to take the x-channel from the current object. something akin to using the 'this' object in other scripting languages.

If this ain't possible (I'm guessing it isn't), does anybody have any other ideas...

thanks in advance.

glassefx
08-28-2003, 10:33 AM
This is probably WAY off considering I have no experience in Scripts besides AutoLisp but could one not just use some parenting set-up (parent the expression driven object to a null (150 of them) and simply just offset it the length of the link?

Then again does the expression control the rotation of where the links are connected?

This is something that really interestes me because I have always wanted to construct a better tank track by using expressions (just something besides the ole' morph'n'bones work-around.)

It would be "tit's" if one could just feed a variable a rate of speed (negative being one direction and positive the other and have all the links move and rotate correctly.

Good luck, there is always a way if you look deep enough.

Suede
08-28-2003, 04:18 PM
There is an "Tank tread tutorial" at:

http://www.cgfocus.com

I think you may get an answer from that.

glassefx
08-29-2003, 07:33 AM
That's so straight of you Suede...

Thanx!