FORUMS: list search recent posts

Dan's Elastic Expression, but in 3D

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Navarro Parker
Dan's Elastic Expression, but in 3D
on Jun 20, 2013 at 10:11:32 pm

Hey I found Dan's cool elastic expression, but I believe it only works in 2D space.

Is there a way to make this work in 3D space? I want some layers to elastically follow a 3D null.


restLength = 20;
damp = .95;
leader = thisComp.layer("leader");

fDur = thisComp.frameDuration;
currFrame = Math.round(time / fDur);

p2 = position.valueAtTime(0);
v2 = 0;
for (f = 0; f <= currFrame; f++){
t = f*fDur;
p1 = leader.transform.position.valueAtTime(t);
delta = p2 - p1;
nDelta = normalize(delta);
a = 2 * nDelta * (length(delta) - restLength) * fDur;
v2 = (v2 - a) * damp;
p2 += v2;
}
p2


Return to posts index

Darby Edelen
Re: Dan's Elastic Expression, but in 3D
on Jun 21, 2013 at 5:25:36 pm

I don't see any reason why that expression wouldn't work in 3D. Are you having some problem with it?

Darby Edelen


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]