Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Text box for more than one text layer?

  • Text box for more than one text layer?

  • Sean Kimber

    April 6, 2020 at 7:25 pm

    Hi all,

    I’m trying to create some text templates for work. One template I’d like to make is one where text layers stack on top of each other and animate in. I’d like the user to be able to add or subtract text layers for their needs and have a box that surrounds the text layers account for the addition of subtraction of those layers. I know how to create boxes that respond to the size of individual text layers. My question is, is it possible to have a dynamic expression where the box would change its size based on any new text layers that were added or subtracted?

    I suspect (if it’s possible), it would be through indexes, but I can’t figure out how to make it look at it as basically [index(0) through index(current -1)]. I know that’s not written correctly, but it’s basically what I’d want it to do.

    Sorry for the long explanation, but is this possible?

  • Tomas Bumbulevičius

    April 7, 2020 at 5:18 am

    Hey Sean, below is execution in a template, which allows controlling text boxes, based on chars per line.

    Find out more:
    Motion Graphics Design & After Effects Tutorials
    On YT
    On VH

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

  • Sean Kimber

    April 7, 2020 at 6:22 pm

    Thanks, Tomas! This isn’t quite what I’m looking for, though. I’m looking to create one big box around several text layers that works dynamically. This looks like it creates boxes around each individual line.

    Thank you, though!

  • Tomas Bumbulevičius

    April 7, 2020 at 9:19 pm

    Sean, thanks for your response, if thats the case – now I have a better understanding whats needed here!

    There questions here are:
    1. Where(in layers stack) new text layers added?
    2. What is the overall structure of comp setup?
    3. How many new texts might be added, and in what cases they can be removed, thus, to be subtracted from equation?

    Find out more:
    Motion Graphics Design & After Effects Tutorials
    On YT
    On VH

  • Sean Kimber

    April 8, 2020 at 12:54 am

    HI Tomas,

    Thanks! Regarding your questions…

    1. I plan on adding all text layers above the shape layer. I think this is the best way to work with the indexes. I’ll make the user duplicate a text layer (and, using the index, have that duplicate move a certain number of pixels, which have yet to be determined, on the Y position value).

    2. Not entirely sure what you mean here, but I plan on creating a template where the each text layer is stacked on top of another text layer. Then there will be a matte which allows the text to “come out” of the area where the previous text layer is. Once a text layer is duplicated, it would go at the bottom of the comp order, both in index number (but still above the shape layer), and in position.

    3. I want to give the user the freedom to choose the number of text lines that they need. I suspect, though, that they won’t need to add or subtract more than one or two lines. I anticipate having the base template have 4 lines.

    Hope this answers your questions!


  • Tomas Bumbulevičius

    April 9, 2020 at 11:04 am

    Hey Sean,

    Thanks for your answers! Its great to explore and break down whats needed, in order to provide possible approaches:)

    1. What IF, going from the bottom to the top of layers stack:
    ~ SHAPE layer – last.
    ~ MAIN text layer – non editable by the user – index-1 from shape.
    ~ USER-TEXT-LAYERS all other text layers, existing or ‘to be duplicated later’ – above of those two ^^.

    Now, I assume that each text layer duplicated by the user, will stand as a separate line. Is this correct?

    Then, in order to not necessarily deal with ‘re-positioning’ the texts.. What if you add all those texts from ‘USER-TEXT-LAYERS’ by expression, into text source of MAIN layer? Meaning, it would scan for layers, and then as much of them are found – add them into next line inside ‘MAIN’? And thus, SHAPE would readjust, and design stay in terms of lines spacing, as set in MAIN!

    2. About comp setup – I mean are there any additional design items/layers in the comp apart from setup layers described in 1st point in this message.

    Now you probably wonder – ok Tomas, but whats about user UX using such approach? They will duplicate a text layer, and what to do with it then? Well, I would suggest using those text layers as guide-layers only, which will give a glance of texts used, but will work as references only. SO, the duplicated layers will stand as references only.

    This suggestion is valid ONLY if single-style design text is OK. If custom/per line style customisation is needed, this approach is not OK ☺

    3. ++

    Based on above, we can shift this discussion one way or another !

    Find out more:
    Motion Graphics Design & After Effects Tutorials
    On YT
    On VH

Viewing 1 - 6 of 6 posts

Log in to reply.

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