Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Can you ease a text-generating expression…with an expression?

  • Can you ease a text-generating expression…with an expression?

    Posted by Jordan Willox on October 8, 2016 at 2:10 pm

    Hey everyone… bear with me here…

    I am a building a Live Text template, so I would like to end up with a slice of text (which would animate on in a pretty way) that I can just quickly swap text in and out of in Premiere.

    I would like it to animate from the center and stay center justified. I also have an expression that uses the SourceRecAtTime function to animate a shape layer along with the text as it animates on.

    However, as near as I can tell, animating on by scale/character uses the anchor point OF THE FINAL LAYOUT, and not what is one screen at any given time.

    Now, I was able to automate the characters typing on AND keep the text center justified with the following expression:

    charPerSec = N;
    idx = Math.floor(time*charPerSec);
    value.substr(0,idx)

    (thank you for your 2011 post about this Dan)

    …. but that doesn’t look quite right. It’s much too abrupt. I can get it to ease from the beginning by linking a slider to the “charPerSec” function, but it still hard stops at the end.

    Is there any way to automate some easing of this, regardless of what and how much gets typed in?

    Thanks in advance for your help, any and everyone!

    Jordan Lee Willox
    \”We are the music makers, and we are the dreamers of dreams.\” — Ogden Nash.

    Jordan Willox replied 9 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    October 8, 2016 at 4:06 pm

    Try this:

    charPerSec = 10;
    tTotal = value.length/charPerSec;
    t = easeIn(time,0,tTotal,0,tTotal);
    idx = Math.floor(t*charPerSec);
    value.substr(0,idx)

    Dan

  • Jordan Willox

    October 10, 2016 at 5:28 am

    Oh thanks, Dan! I’ll try that on Monday.

    Can you break down what is going on in that for me briefly?

    charPerSec = 10; –> how many characters get revealed per Second.
    tTotal = value.length/charPerSec; –> something divided by the charPerSec
    t = easeIn(time,0,tTotal,0,tTotal); —This string ive seen around in other threads, but I’m not sure what it all points to…
    idx = Math.floor(t*charPerSec);Ya lost me
    value.substr(0,idx)huh?

    Thanks so much, Dan. You have sent my workflow to the stratosphere over the years, so thanks so much. 🙂

    Jordan Lee Willox
    \”We are the music makers, and we are the dreamers of dreams.\” — Ogden Nash.

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