Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions velocityAtTime for variables

  • velocityAtTime for variables

    Posted by Arne Münch on May 27, 2015 at 8:18 am

    Hi Community

    For building up some expression rigs I need the velocityAtTime result for variables.

    For example
    L =thisComp.layer(“layer_name”)
    var = L.toComp (L.anchorPoint);
    gives the absolute (Comp)Position of an layer. How do I get the Velocity Value for “var”?

    The only walk-around I could find out is to set up an extra Null-object, put that above expression on the position of that Null and link to that via:
    thisComp.layer(“Null 1”).transform.position.velocityAtTime(time)

    but its nasty to have an extra Null object just for that if you are planning to use this in complex rigs.
    Is there maybe another solution for getting the velocity of the absolute Position, or also for Rotation and Scale?

    Thanks

    Arne Münch replied 10 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    May 27, 2015 at 4:43 pm

    I think the best you can do is probably something like this:

    L =thisComp.layer(“layer_name”);
    p1 = L.toComp (L.anchorPoint,time+thisComp.frameDuration/2);
    p0 = L.toComp (L.anchorPoint,time-thisComp.frameDuration/2);
    v = (p1 – p0)/thisComp.frameDuration;

    Dan

  • Arne Münch

    May 27, 2015 at 11:13 pm

    Clever again, thanks

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