6 Replies Latest reply on Jun 26, 2017 5:19 PM by skull56

    Text in dynamic boxes?

    Robsta_8910 Level 1

      Hi experts,

       

      I'm trying to create a template file with basic text layers, that have coloured backgrounds.
      I want to set it up so when someone copy+pastes new text in, the background boxes (per line) draw themselves behind the text.
      Is this possible in After Effects?

      This is the effect I'd like to make as a template:

       

      Screen Shot 2017-01-23 at 16.03.35.png

       

       

       

       

      Thanks in advance.

        • 1. Re: Text in dynamic boxes?
          Mylenium Most Valuable Participant

          Simply use a box glyph from a font and two layers that are linked with a simple pickwhip expression on the source text property.

           

          Mylenium

          • 2. Re: Text in dynamic boxes?
            Szalam Adobe Community Professional & MVP

            Many text boxes are made with a SourceRecAtTime() expression. Multi-line might be tricky though.

            I like Mylenium's suggestion, but you would need to make sure that your font was monospaced for it to work.

            2 people found this helpful
            • 3. Re: Text in dynamic boxes?
              Robsta_8910 Level 1

              Cool! I'm trying this.

              Happen to know of any suitable fonts? I've got it working but not all the glyphs are solid boxes so it isn't quite working behind some of the characters.

              • 4. Re: Text in dynamic boxes?
                Mylenium Most Valuable Participant

                Depends on what look you are after. Futura-like fonts like you show in your screenshot will always be tricky due to the large differences in width, but e.g. many condensed font variants are almost monospaced. You should be able to find enough regular fonts with monospaced characteristics, too, you will just need to spend some time scouring font sites. Also do not forget that you can always use text animators to control kerning and character scale, so you may be able to cheat and get a solid area even with non-mono fonts. Finally of course one could setup some expression that places e.g. smaller boxes at higher densities and calculates the required number based on the input text. There's enough options, but as it is, you can only set this as fixed parameters once you actually know which font you will use. Font metrics are complicated and unfortunately AE's expressions are limited in that department, so there can be no "one fits all" solution.

                 

                Mylenium

                1 person found this helpful
                • 5. Re: Text in dynamic boxes?
                  Szalam Adobe Community Professional & MVP

                  Here is an example of using the SourceRectAtTime() expression.

                  1 person found this helpful
                  • 6. Re: Text in dynamic boxes?
                    skull56 Level 1

                    Hi could you please describe how I would set up box glyph from a font and two layers that are linked with a simple pick whip expression on the source text this up in AE? Or a link to a comp example. Much appreciated

                    Thank you.