Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How to start expression at layer in point instead of comp start

  • How to start expression at layer in point instead of comp start

    Posted by Bill Russell on October 3, 2007 at 12:21 am

    Hi there. I’m a scripting newbie. I’m using decaying pendulum motion that starts as each layer “pops into the world”. The problem is the expression (which I borrowed from Dan) starts its math at the start of the comp instead of at the in point of the layer, so that as each successive layer appears in time, the motion is already decayed (not what I want).

    Is there a way to do this without having to nest the layer? and put the expression in there? Thank you!

    “THE LOST SKELETON OF CADAVRA”

    And more…

    Bill Russell replied 18 years, 7 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    October 3, 2007 at 3:03 am

    Give this a try:

    freq = 1.0; //oscillations per second
    amplitude = 50;
    decay = .7;

    t = Math.max(time – inPoint, 0);
    amplitude*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t)

    Dan

  • Bill Russell

    October 3, 2007 at 3:44 am

    Ah, an “inPoint”, thank you, Dan!!

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