Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions ‘ValueAtTime’ along With ‘Dan Ebberts Over Shot’!

  • ‘ValueAtTime’ along With ‘Dan Ebberts Over Shot’!

    Posted by Michel Salloum on August 27, 2014 at 7:15 pm

    This maybe a very noob question..
    i want to make a layer follow the rotation of other layer using ‘ValueAtTime’ expression. and it worked just fine.

    But i also want this layer to over shot using the great expression of ‘Dan Ebberts’
    so my expression looked like this

    thisComp.layer("Scound Squar").transform.rotation.valueAtTime(time -0.04) +value

    freq = 3;
    decay = 5;

    n = 0;

    if (numKeys > 0){
    n = nearestKey(time).index;
    if (key(n).time > time) n--;
    }
    if (n > 0){
    t = time - key(n).time;
    amp = velocityAtTime(key(n).time - .001);
    w = freq*Math.PI*2;
    value + amp*(Math.sin(t*w)/Math.exp(decay*t)/w);
    }else
    value

    But it didn’t work this way, the ‘valueAtTime’ get ignored..
    I appreciate any help..

    Michel Salloum replied 11 years, 8 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    August 27, 2014 at 8:01 pm

    That would be more like this:


    p = thisComp.layer("Scound Squar").transform.rotation;
    tDelay = time -0.04;
    val = p.valueAtTime(tDelay);

    freq = 3;
    decay = 5;
    n = 0;
    if (p.numKeys > 0){
    n = p.nearestKey(tDelay).index;
    if (p.key(n).time > tDelay) n--;
    }
    if (n > 0){
    t = tDelay - p.key(n).time;
    amp = p.velocityAtTime(p.key(n).time - .001);
    w = freq*Math.PI*2;
    val + amp*(Math.sin(t*w)/Math.exp(decay*t)/w);
    }else
    val

    Dan

  • Michel Salloum

    August 30, 2014 at 7:23 am

    Dan!! Thank you veeery very Much!

  • Michel Salloum

    September 2, 2014 at 12:48 pm

    hello again!! so i tried to work something on my own,
    so i added ‘+value’ to the end of the equation so i can use the key-frames to animate the child-layer separately…

    and it kinda worked! but sadly with no over-shot if animated with key-frames..

    p = thisComp.layer("Main Squar").transform.rotaion;
    tDelay = time -0.04;
    val = p.valueAtTime(tDelay);

    freq = 3;
    decay = 5;
    n = 0;
    if (p.numKeys > 0){
    n = p.nearestKey(tDelay).index;
    if (p.key(n).time > tDelay) n--;
    }
    if (n > 0){
    t = tDelay - p.key(n).time;
    amp = p.velocityAtTime(p.key(n).time - .001);
    w = freq*Math.PI*2;
    val + amp*(Math.sin(t*w)/Math.exp(decay*t)/w)+value;
    }else
    val

    Thanks in advance for all your help.

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