Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Setting Y maximum to a moving text

  • Setting Y maximum to a moving text

    Posted by Michele Cazzaniga on January 24, 2019 at 11:37 am

    Hi guys,
    I’m trying to create a falling text using an animation based on position and with the expression below (following a youtube tutorial).
    I would like to know if there is a way to allow characters to go only over my ending “land line”, like setting a max value of the “y” position.
    Thank you very much

    delay = .1; myDelay = delay*textIndex;t = (time - inPoint) - myDelay; if (t >= 0) {freq =3; amplitude = 50; decay = 12.0; s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);[s,s]}else {value}

    Michele Cazzaniga replied 7 years, 3 months ago 2 Members · 4 Replies
  • 4 Replies
  • Kalleheikki Kannisto

    January 25, 2019 at 7:01 pm

    I’m not understanding your question. The final position is where you set it, which would be your “land line” and the position animator y offset amount is how far up it starts. What are you trying to do differently from that? Are you trying to limit how far up the letters can go?

    Kalleheikki Kannisto
    Senior Graphic Designer

  • Michele Cazzaniga

    January 26, 2019 at 5:16 pm

    Thanks to the expression (freq =3; amplitude = 50; decay = 12.0) the letters jump a little bit above and below the “land line” before stopping in their final position.
    I would like that the letters jump only above the “land line” before stopping, maybe like setting a maximum amount that the y value should have.
    Sorry for the not clear question.

  • Kalleheikki Kannisto

    January 27, 2019 at 10:02 am

    Ok, I see now. You’re talking about bouncing instead of overshooting. I think if you change the line that calculates the value of “s” to this, it should do it. (If this goes in the wrong direction, then put a minus in front of amplitude.)

    s = amplitude*Math.abs(Math.cos(freq*t*2*Math.PI))/Math.exp(decay*t);

    Math.abs gives the absolute value, i.e. it removes the minus from negative values.

    Kalleheikki Kannisto
    Senior Graphic Designer

  • Michele Cazzaniga

    January 28, 2019 at 1:38 am

    Now it really works!
    Thank you very much for your great help!

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