Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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:
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:
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.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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:
Copy link to clipboard
Copied
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
Find more inspiration, events, and resources on the new Adobe Community
Explore Now