Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Different text size after the decimal point via expressions

  • Dan Ebberts

    October 14, 2015 at 5:04 pm

    You could scale them, but not change the font size. You could use two text layers and use a sourceRectAtTime() expression to maintain the horizontal alignment.

    Dan

  • Kevin Camp

    October 14, 2015 at 5:29 pm

    you could do it with one text layer and a couple text animators…

    select your text layer and choose animation>animate text>scale and then also choose tracking from the same menu.

    set the scale text animator property to something smaller that 100, say 50%(you can adjust later)

    twirl down the range selector properties and add this expression to the start value:

    num = text.sourceText;
    wholeNumLength = num.split(‘.’)[0].length + 1;
    100 * wholeNumLength / num.length

    that should scale down the numbers following the decimal.

    the decimal values are likely spread out further than you’d like, so go to the tracking settings for the animator and set the amount as needed to make them look correct.

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

  • Emilian Arabadzhiev

    October 14, 2015 at 5:30 pm

    Thank you very much, Mr. Ebberts for your input!

    I was thinking to make it with 2 layers and mask out after the decimal on the first and vice versa on the other, but it will only work with monospaced fonts. In my case the font isn’t monospaced.

    I’m not very familiar with sourceRectAtTime(), it is fairly new expression. I used it once for dynamic lower fields based on ECA tutorial. I will research now how I can accomplish that alignment with it.

    EA

  • Emilian Arabadzhiev

    October 14, 2015 at 5:47 pm

    Thank you very much, Mr. Camp!

    It works! I just removed “+ 1”, because I just realized that the big decimal point looks ugly 🙂
    Also added the same expression to the Тracking Start, so I can control the tracking only after the integer.

    ЕА

  • Kevin Camp

    October 14, 2015 at 7:00 pm

    you can also add (or move) the tracking properties into the same animator that is controlling the scale to avoid having the two animators/expressions. but having both will work just fine.

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

  • Emilian Arabadzhiev

    October 14, 2015 at 8:04 pm

    Didn’t find a way to move it, but adding it to that particular animator works. Great addition to make it cleaner. I have much expressions in this project, so cleaner is (always) better 🙂
    Thanks again, Kevin!

    EA

  • Kevin Camp

    October 14, 2015 at 8:16 pm

    i am mistaken… i though you could move a property from animator to another, but you cannot.

    but if you ever wanted to have multiple text animation properties controlled by a single animator, when you add the property, have the animator selected, and it will be a part of that animator.

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

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