Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Dan’s Elastic Expression, but in 3D

  • Dan’s Elastic Expression, but in 3D

    Posted by Navarro Parker on June 20, 2013 at 10:11 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

    Darby Edelen replied 13 years, 2 months ago 2 Members · 1 Reply
  • 1 Reply
  • Darby Edelen

    June 21, 2013 at 5:25 pm

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

    Darby Edelen

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy