(UPDATED) Dynamically auto-scale text to fit in a box using expressions in After Effects

Спорт

Make your life easier!
Sports cities, names and teams all have different character lengths for text. Instead of changing your font size every time, you can automatically scale your text to fit within a box.
Shorts Playlist:
www.youtube.com/@BallerFX/shorts
===
👉Subscribe: / @ballerfx
Motion Templates:
ballerfx.com/
Visit our website:
www.ballerfx.com/work
Find me on the web:
/ petersonjustin18
vimeo.com/petersonjustin
www. motion_jp
www.Twitter.com/motion_jp

Пікірлер: 17

  • @VictorKirilovVisuals
    @VictorKirilovVisuals Жыл бұрын

    Great one, thank you for sharing :)

  • @BallerFX

    @BallerFX

    Жыл бұрын

    Thanks Victor, glad you found it helpful!

  • @dadakhan.
    @dadakhan.5 ай бұрын

    great

  • @dooyow3328
    @dooyow3328 Жыл бұрын

    More mogrt tutorials, thank you

  • @BallerFX

    @BallerFX

    Жыл бұрын

    I will put it on my list! In the meantime, check out @MographMindset for some mogrt goodness!

  • @PulockMaheen15
    @PulockMaheen15 Жыл бұрын

    Great tutorial as always! Is there any way to make the words move to next line depending on the word count? For example, if the word count is more than 3, the text will go to next line to fit better?

  • @BallerFX

    @BallerFX

    Жыл бұрын

    If I've needed to do this up to this point, I use a text box to constrain the width so it automatically goes to the next line. If you figure out a better way, please let me know!

  • @PulockMaheen15

    @PulockMaheen15

    Жыл бұрын

    @@BallerFX Yeah, That's what I've been doing, but was wondering if there is a 'expression' way of doing it. Thank you!

  • @martinradin
    @martinradin7 ай бұрын

    is it possible to do this in a text block? That is, if I need more than one line, and for example, 2 lines are placed in a text block and the text changes size because there will already be a lot of 3. Can you make a video on this topic or tell me how to do this? Thanks!

  • @BallerFX

    @BallerFX

    7 ай бұрын

    Hi Martin, not sure if I'm fully understanding your question. When you click + drag to create a text box, you're naturally creating width limits, and also height limits. If you're asking about it autoscaling the text size to fit inside, I believe there's a new update in the October release that's related to this, but I haven't had a chance to explore that yet. In short-term you could add a slider that would allow you to quickly adjust the text size, or you could write an expression that counts the characters and auto scales down if it's larger than x character length. If I come across a better idea or different way of doing this with the Oct update, I'll make a video.

  • @martinradin

    @martinradin

    7 ай бұрын

    @@BallerFX thanks for the answer! I think this is what I need. How can I add this slider that would resize the text inside the text box?

  • @BallerFX

    @BallerFX

    7 ай бұрын

    @@martinradin I'll add to my list...you get into source text expressions and styles and add font Size that you can tie to a slider.

  • @nihadspahic1353
    @nihadspahic1353 Жыл бұрын

    Great tutorial! Can we add a text animator and have an animation like this? When I add text animator it just scales down text all the way. Cheers!

  • @BallerFX

    @BallerFX

    Жыл бұрын

    Yes, when using the sourceRectAtTime(), we didn't put anything in the () at the end, but if you put a number in there, the scale will look at the width of the text at a specific time and use that width for the expression. So, if you put sourceRectAtTime(3).width, it will take the width at 3 seconds an hold it throughout the animation to avoid being wonky as it's animating on before the 3 second mark.

  • @nihadspahic1353

    @nihadspahic1353

    Жыл бұрын

    @@BallerFX Hey, thank you so much for the reply. Unfortunately, it doesn't work. My idea is to have a text animation like in your video. It starts with a bigger font and just keeps getting smaller if I add more characters. It only works when I type the text, but when I put text animator to reveal it character by character all characters have the same font weight. Cheers!

  • @BallerFX

    @BallerFX

    Жыл бұрын

    ​@@nihadspahic1353 When I show that, it's a screen record. Best way to do it is probably an expression on the source text. Look up how to do a text type on effect using source text, and that should get you there. Let me know if not, and I'll add it to my list for a future video!

  • @nihadspahic1353

    @nihadspahic1353

    Жыл бұрын

    @@BallerFX Hey, thanks for the reply. I am aware that it is a screen recording and you are just typing :) The only problem for me was when I added a text animator to type out the text it didn't scale down as it goes further. Expressions are evaluated separately from text animators, and sourceRectAtTime() provides the dimensions of the text layer. So it could be achieved probably only with expressions on the source text. Would be a great tutorial and useful to know. Cheers!

Келесі