Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE AFTER EFFECTS: ForumAE BasicsAE ExpressionsTutorialsArticlesPodcastsMotion GraphicsTrainingCinema 4D

How to animate dots as if trailing each other connected by elastic?

Cow Forums : Adobe After Effects Expressions
How to animate dots as if trailing each other connected by elastic?
by Jason Allen on Aug 22, 2005 at 11:57:41 am

Hi All,

I have a collection of 5 dots. I want to animate the first dot and have the other four follow along it's path, but I don't want the space between each dot to remain static and constant. I want it to be as though each is connectde to the next by a piece of elastic, so as the tension is taken up between two dots the non moving one will accellerate up to the leaders pace, and the reverse when the line of dots comes to a rest.

I hope that makes sense.

I'm thinking I need to parent them somehow, but will this just kepp their positions constant relative to each other? I'm sure i'm overlooking an obvious solution.

Thanks for your time and help everyone. Greatly appreciated.

Jason Allen
Melbourne, Australia

Respond to this post   •   Return to posts index

Re: How to animate dots as if trailing each other connected by elastic?
by Ghekkomanic on Aug 22, 2005 at 1:08:20 pm

If I understand you correctly you might try shifting the position keyframes of the 4 dots back so they're all staggered, then adjust the easy-ease handles to get the desired effect.

Roving keyframes might also help

Respond to this post   •   Return to posts index

Re: How to animate dots as if trailing each other connected by elastic?
by Dan Ebberts on Aug 22, 2005 at 1:15:07 pm

It's not trivial, but this post by George Polevoy might get you headed in the right direction:

http://forums.creativecow.net/cgi-bin/new_read_post.cgi?forumid=2&postid=38...

Dan

Respond to this post   •   Return to posts index


Re: How to animate dots as if trailing each other connected by elastic?
by friendcow on Aug 22, 2005 at 1:39:06 pm

At first ,I had the same idea with Ghekkomanic.And while I was trying it in AE,Dan Ebberts pointed out an other way.I think it must be the best way to create such effect.However if you do not think so,Ghekkomanic's idea can work too.This way is easier especially when you were trying to make a simple animation of the dots.Here is the project file I had just made:
http://www.seaair.com.cn/cow/dots.aep
wish to be helpful.

Respond to this post   •   Return to posts index

Re: How to animate dots as if trailing each other connected by elastic?
by Joshua Stanley on Aug 22, 2005 at 2:28:12 pm

I was messing with the code that gerge had posted to create a spring between objects:

// AE expression by George Polevoy


// www.creativecow.net





// attaches an object to a "Controller" object with a "spring"


// You need another "Controller" which will drive animation of this one





// parameters


conserveMotion = 0.95; // valid range: 0.5 to 0.995


springResistance = 10; // positive values


prerollTime = 2; // value in seconds. greater values give more precise result





//


fps = 1.0 / this_comp.frame_duration;


if ( prerollTime > time ) prerollTime = time;


dt = this_comp.frame_duration;


frame = time * fps;


integrationTime = time - prerollTime;





s = [0,0];


p = this_comp.layer("Controller").position.value_at_time( integrationTime );





i = frame - prerollTime * fps;


for (; i < frame; i++, integrationTime += dt )


{


c = this_comp.layer("Controller").position.value_at_time( integrationTime );


d = c - p;


s = s + d * springResistance;


s = s * conserveMotion;


p = p + s * dt;


}


p;


When I do it I keep getting the warning "expression must be of dimension 2, not 1.

Anyone know what Im doing wrong?

Josh


Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINEDVDsBOOKSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]