Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Using an Expression Selector to animate position by Layer Marker with eases

  • Using an Expression Selector to animate position by Layer Marker with eases

    Posted by Christopher Rutherford on February 15, 2022 at 2:22 am

    So i’m trying to animate some text on screen using text markers since I need to time it to some audio. I have some code that I found from here long ago (a Dan Ebbert’s original if I recall correctly) that achieves a similar effect to what I’m going for, but it’s for bouncing text instead of eased look. Can’t seem to reverse engineer it, despite my best efforts. Ideally I’d be able to control the rate of easing as well, but I don’t think we’re able to do that with expressions yet are we?

    Would anyone be able to crack this? Included below is the code.

    freq = 3;
    decay = 5;
    startVal = [100,100];
    endVal = [0,0];
    dur = 0.1;
    try{
    t = time – marker.key(textIndex).time;
    }catch (err){
    t = 0;
    }
    if (t > 5){
    endVal
    }else if (t > 0){
    if (t < dur){
    linear(t,0,dur,startVal,endVal);
    }else{
    amp = (endVal – startVal)/dur;
    w = freq*Math.PI*2;
    endVal + amp*(Math.sin((t-dur)*w)/Math.exp(decay*(t-dur))/w);
    }
    }else
    startVal

    Christopher Rutherford replied 4 years, 6 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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