How To Create An Autoscale Text Box In After Effects

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey everyone this is Owen with motion irate and in this tutorial I'll be showing you how to make an auto scaling text box there's a handful of tutorials out there that cover this topic in great detail and spend time explaining exactly what the code is doing this isn't one of those tutorials we're just trying to get you the information you need and back to work alright let's get started I'll begin by making a new composition and I'll make it 1920 by 1080 2997 now I'll call it text box then I'll grab my type tool and I'll type out something like my text layer then I'll go up to layer new shape layer and I'll add a rectangle and a fill now I'll go ahead and rename the shape layer to be textbox I'll also drag it beneath my text layer I'll twirl down the rectangle path and then I'll option click on the stopwatch for size to open the expression editor and then I'm gonna define a variable which I'm going to call s so I'll type in s equals and then I'll use the pick whip and drag that up to my text layer then I'll add a semicolon and I'll hit return after I hit return I'll add this code it's in the description below for easy copy and pasting so your full expression should look like this we're defining two new variables with this code and then using them as the X&Y size values source rect at time references the size of the text layer so now the text box will always be the right size all that's left to do is make sure it's in the right position so I'll grab my text box and I'll snap it to my text layer holding command and you can see that it's the exact size of the text now I'll option click on the stopwatch for the position of the rectangle path not the layer and add this expression we've also added this one to the video description so you can copy and paste you'll notice this expression is similar to what we used for the size we've added in two new variables though that look at where at the top and the left boundaries are of the text layer these help place the box in the right spot so now we've got all the coding then I just need to move my box back into the right position now we're pretty much done but the problem is that this text box has no padding around the text layer itself which kind of cramps it up so to give it a little bit of breathing room I'll go to the add menu and I'll add an offset paths in the offset paths I can change this value to increase or decrease padding I'm gonna set this value to 25 to give myself a 25 pixel pad all around the text layer I'm also going to go ahead and change the color of this text box to blue another great thing about this text box being a shape layer is I can add a stroke for even further customization to keep that stroke from going over my text I can just drag it below the fill at this point we're pretty much done but for a little bit more flexibility I'm gonna parent the text box to the text layer so now I can just drag my text around and I can scale it up and the text box will go with it I can even rotate it and again this is completely dynamic so I can totally change my text and my text box will adapt to it so I could change it now and you can see as I'm typing the text box is changing I can even change my justification to right or left and the text box will move with it I can change the size of my text and I can even change my typeface itself so you can see that this effect is super dynamic and really helpful when you're making text boxes or lower thirds or anything like that if you'd like to dive deeper into this expression and customizing it even further there's a great tutorial by Jake in motion that we'll link in the description well that concludes this tutorial I hope you guys found it helpful if you did and you'd like to see more tutorials please go ahead and subscribe because we're making new ones all the time thanks for watching and see in the next video [Music]
Info
Channel: Motion Array Tutorials
Views: 73,663
Rating: undefined out of 5
Keywords: after effects tutorial, after effects cc 2018, how to create a text box in after effects, autoscaling text box, after effects autoscale effect, motion array, text in after effects, text effect, dynamic text, motion graphics, film, video, mogrt, typography, moving text, dynamic typography, after effects, tutorial, tut, tutorials, auto scale, titles, title
Id: vhQHfiZk3SE
Channel Id: undefined
Length: 4min 20sec (260 seconds)
Published: Fri Aug 03 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.