Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

self-sizing rectangle to textsize with typewriter effect?

Explorer ,
Feb 28, 2019 Feb 28, 2019

Hi,

I want to make a rectangle behind a text to grow with the text.

Looking at some tutorials, I got achived that. Now I want to apply a  typewrite effect. Problem is, that the actually size of the textfield doesn't change with the typewriter effect. Hence the boxsize doesn't change dymnamically with the text being written.

Any ideas on how to solve that?

3.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 28, 2019 Feb 28, 2019

Right off the top of my head, the easiest option may be to use a monospaced font, apply the typewriter effect, duplicate the text layer, set the blend mode to difference to turn the letters black, change the of the top copy font to a dingbat and change all of the letters to "n" to give you a solid square, adjust the kerning, scale and baseline offset so the square covers the letters, add a stroke and you're done. If both text layers were green the project would look like this:

     Screenshot_2019-02-28 08.51.43_MrkNtZ.png

If you want more control, add a shape layer rectangle bigger than the final text layer below the dingbat layer, set the dingbat layer to a track matte, move the typewriter layer to the top and adjust your colors. You'll get this:

Screenshot_2019-02-28 08.51.07_dChhPH.png

If you are not using a monospaced font then you could individually adjust the scale of each character using the character panel to line things up but I would probably just add a shape layer rectangle below the type layer and animate the horizontal width.

The other option would be to use the sourceRecAtTime expression and try and modify the size by adjusting the horizontal size based on the percentage of the range selector. The top two examples took me about two minutes, it might take a half hour to figure out an expression to do the trick, but the expression would still require a monospaced font to work perfectly.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 28, 2019 Feb 28, 2019

Hi Rick,

thanks for the quick answer. I actually found a guide on doing something simular, but in a single layer:

Boxed Text for Motion Graphics After Effects Tutorial - YouTube

However, I would like to have round corners, which why I am still hoping for a way to do it with a shape layer.

Animating it manually of course is always an option, but I will have to do a lot of this texts and maybe having to change font-size later on. Automatisation would be a time saver.

Adjusting the  horizontal size based on the percentage of the range selector would give me a problem a soon as I have more then one lines, right?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 28, 2019 Feb 28, 2019

You would need multiple rounded rectangle shape layers to get multiple lines.

Personally, I would probably use the duplicate text layer + dingbat track matte solution and add a stroke then add Matte Choker to round the corners. That would work with either solution 1, difference mode, or the track matte solution I posted above. This is a bunch of N's with the matte choker applied:

Screenshot_2019-02-28 11.17.31_IKPkA0.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 28, 2019 Feb 28, 2019
LATEST

Matte Chocker is indeed a good idea to round the corners. It also works with the solution I posted.

Just found out, doing the typewriter with animate property to "Scale" to 0,0 instead of having it just change the Opacity to zero, does the trick! That way the actual textbox-size scales. That works now with any solution (rectangle box sourceRecAtTime) as well as this one:

Boxed Text for Motion Graphics After Effects Tutorial - YouTube

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines