Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Focused Typography sequence – is it possible to script?

  • Focused Typography sequence – is it possible to script?

    Posted by Ash Curkpatrick on December 11, 2014 at 12:31 pm

    Hi, I’m trying to replicate this kind of thing in AE:

    https://www.spritzinc.com/

    As I’m currently doing it manually, I’m desperate to find an alternative to streamline the process, as some of the blocks of text I am working on can reach up to 400 words long(!). As you can imagine, typing and positioning them all is incredibly tedious, especially as I know very little to do with scripting..

    I’ve tried different ways of manually doing it, such as creating a massive list of the words and track-matting them to a position on the comp, manually setting positional keyframes – but even this is taking a long time to colour the second letter and position it so that it aligns. I would appreciate any suggestions!

    I had also attempted with playing around with opacity and position text animators, and whilst I can get it to cycle nicely between displaying each word on separate layers (using the range for start = index-1, end = index), coming up with a way to position/each word is causing headaches.

    I’m sorry if I’m not making sense. Combination of stress and lack of sleep. I’d be happy to explain in more detail, and if you have any suggestions, I would be incredibly thankful.

    Ash Curkpatrick replied 11 years, 7 months ago 2 Members · 5 Replies
  • 5 Replies
  • Dan Ebberts

    December 11, 2014 at 5:22 pm

    I’d say it’s do-able, but not simple. The trick to scripting something like that is coming up with the algorithm. You have to define how it is that you decide which letter in each word to line up. Then you can use some trickery with sourceRectAtTime() to find the horizontal center of that character so that you can position the word correctly. Even if you know scripting, I’d say it would take you a few hours or more to sort it out.

    Dan

  • Ash Curkpatrick

    December 12, 2014 at 4:17 am

    Hey Dan, thanks for your quick reply. I’ll be honest, I don’t really know a whole lot about scripting – so a lot of what I come up with is hacked together.

    Currently I’m calling up a txt file with an array to be output into the source text depending on which frame the time is on. From there I’ve fed in the length of the strings in to the start and end nodes of an opacity range selector on the text. See here (please forgive my messy code – I’m really a beginner):

    I’ve duplicated the layer 2 more times so that I can slightly adjust the ranges, dividing it all up in to 3 sections. This all works, but now I’m going to be looking at the positioning so as to keep the second letter in a fixed position.

    You’ve mentioned the sourceRectAtTime() – do you have any recommendations of where I can chase down a thorough explanation of it and how to use it? I’ve tried looking through the documentation here, but haven’t been successful in finding it:

    https://helpx.adobe.com/after-effects/using/expression-language-reference.html

    I will tinker around and see what I can do, anyway.

    Thanks again for you initial assistance and patience. Really appreciated.

  • Ash Curkpatrick

    December 12, 2014 at 5:01 am

    Doh. I’ve just realised I’m been talking in terms of scripting, rather than expressions. My bad.

    Expression-wise, do you think it’s possible?

    Ash

  • Dan Ebberts

    December 12, 2014 at 5:04 am

    Ah, I thought you were trying to do it with scripting, not expressions. I don’t think there’s a good way to do it with expressions. You’ll find sourceRectAtTime() in the AE scripting guide, but there’s a bit of a learning curve to be able to use it to find the center of a particular character, which is what I think you need to get the positioning right. So I think it could be done with a script, but it wouldn’t be simple.

    Dan

  • Ash Curkpatrick

    December 12, 2014 at 5:20 am

    Right, I see. Yeah, I’ve had a quick look at the documentation at it’s definitely a bit too deep for me at the moment. For the time-being I’ve got the problem solved of the coloured letter’s positioning so I guess it’s not too bad! I’ll just step through each frame and nudge them to the necessary positions. I’ll be diving down the rabbit hole in to scripting in the future though!

    Thanks again for your help Dan

    Ash

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