Mastering Text Animation with Expression Controllers in After Effects

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey there this is Kyle Hamrick with school of motion in a previous tutorial we looked at creative ways of using the After Effects text animator today we're going to take some of those ideas even further and combine them with a few expressions to create some really cool useful elements that would otherwise be really difficult or even impossible to build if you didn't have a chance to watch the previous tutorial I'd highly recommend watching that first that lesson has an in-depth explanation of all the properties within the text animator and while I'll be giving some explanations during this tutorial you might get lost if you don't already have a good grasp on how these work there's a free project file included with the article on school of motion comm but all the examples are things we'll be building from scratch directly within After Effects so let's get started the techniques we'll be covering are things I use all the time and hopefully after this you will - we're going to begin by creating a simple rig that we'll use for the other examples in this tutorial it's also just generally really handy for this kind of stuff and it helps to take some of the trial and error aspect out of it I'm going to take a second here and show you my text settings everything we're using today is available on Adobe fonts and just a reminder that you can use any type face you like your settings may just be a little different than right in the previous tutorial we did a lot of creating these long lines of dots and then compressing the tracking to make a solid line we're going to do that same strategy here but we're going to make it more controllable so I'm going to begin by double-clicking to highlight this whole line of text and then just type 1 . now I'm going to hit you you to reveal all properties that have been changed from their default in this case the source text is the only one that has then I'm going to alt click on this stopwatch here and we actually need the part that it already gave us so we'll just hit the end key to go to the end of that and then I'm going to type dot repeat with the parentheses see the autocomplete helps us out there and then I'm going to type 10 right between the parentheses so now it's taking a single character and repeating it 10 times if you give it more characters it would repeat that entire character string this seems pretty helpful right so let's go ahead and set this up to 100 nice and let's maybe come down here we're gonna condense the tracking I found that about minus 275 is a pretty good value for this example this is great but I don't have to keep changing this value every time that I want to change the length that's even worse than manually typing characters but if we add effect expression controls slider control open this up here you could obviously access it over here as well let's go ahead and type 100 right here if we link this up now we can use the slider control to control this instead of a hard-coded value so I'm just going to click right here and then highlight this portion with the hard-coded value let's use the expression pick whip here just drive that right to the slider control and now this controls how many characters there are and in this instance that to me feels like length so I'm going to go ahead and rename my slider to that you can see we've got this handy length slider now that controls exactly how long this is this values may be a little abstract in terms of the actual length of the thing but it's definitely easier than manually adding characters since we're going to be reusing this several times I'm going to go over to my project panel select my composition here and I'll hit ctrl or command D to duplicate it and then I'm going to name this length rig I'm also going to come back to my composition and highlight both the text and the effects and then I'm going to go to animation save animation preset you could save this with whatever title whatever location you want and then you'll be able to call it up whenever you need it okay we've got this all set up now let's do something with it I'll select my layer press G to get the pen tool and draw a nice soft S curve here then I will ctrl or command click this twirly right here to expose all the properties on the layer let's choose path set it to the mask we just drew now I'm going to create an animator for scale set that to zero as I explained in the previous tutorial right now the entire range of these characters is being set to scale zero if we want to change which characters are being affected by whatever we've done to it that's what their range selectors for so we'll open this up and I'll set the shape to round so that's almost what we want but I would actually like the opposite so to easily get the opposite we can set the mode to subtract now we have this nice double ended taper shape there's a couple of fine tuning things I'd like to do here so you can see this is actually sitting sort of next to our path and the characters are actually scaling from the baseline not the center so I'm gonna change the grouping alignment which is the per character Anchor Point you can see it moving around there I'm just gonna try to get that as centered up as I can about minus eight point eight in my case I also like things to be centered up so I'm gonna adjust the baseline setting here so that it sets right about in the middle of my shape you could also do that with another position animator if you wanted I'm gonna go ahead and rename my animator to taper since that's what it's doing then you can see we have a little issue up here with a bit of separation we can fix that by just changing the tracking a bit we could round it up to minus 300 make it nice and dense although you'll see now it's way too short well that's easy to fix because we gave ourselves a length slider you can just kind of eyeball this in my case looks like riot around 220 is about right there is also a force alignment property up here which will make your shape fit exactly to the path you drew that would make your length slider that we created more of a density slider this is essentially how the stroke effect actually works so we've got our shape let's actually animate it on and off so I'm going to duplicate this animator I'm going to change the name to on/off since that's what's going to do and then let's open this up I'm gonna add property opacity set that down to zero as well this doesn't make a huge difference here but I think it looks just a little bit nicer and then we actually don't need advanced this time we're gonna leave that the same but what we are going to do is play with the offset property and see how we can kind of push the shape through this path now so if you animate it from in my case I want to go from 100 to -100 and I'll just kind of stretch that out over about 2 seconds let's do a quick preview we have this nice little snaky tapered shape that goes from one end to the other I'm sure you can come up with some cool uses for this if you created a couple copies of this maybe offset the position just a little bit offset the timing just a little bit you have this nice cartoony steam line look that you could maybe put over a Illustrated teacup or something like that I'd like us to make one other variant of this so let's come over to our project panel we'll rename this one to steam line and then ctrl or command D to create a duplicate and name this one speed line so we'll open up speed line here the first thing I'm going to do is get rid of the on/off and get rid of the mask we don't need this then I'm going to set my alignment to right aligned because that's how we're using this one I'm going to create another animator for opacity let's open this up set the opacity to zero and then we can change this shape to ramp down you can see just a little bit of the end here let's crank in this ease high value so we get a nice long fade-out and we'll go ahead and rename this fade because that's what it's doing close that up then we can add a simple expression to our length slider that we created to give this a little bit more of a dynamic organic feel so I'm going to alt click on the stopwatch for the slider and right there we'll type wiggle I'll let the autocomplete add our parentheses and I'll type 1 comma 50 close that out and do a quick preview ok so we have this nice kind of flowy length going on that's nice I feel like this could use one more little punch here to really make it special let's add one more animator animate position and we'll call this wiggle because that's what it's gonna do you might be ahead of me here we're gonna add selector Wiggly but we're gonna use the range selector as well so let's go ahead and crank up the y-value on this position so that we can kind of really see what's happening the wiggly selector is going to take this property and value that we feed it and kind of randomly feed that to the characters but I don't want it quite so scattered so we're going to use the range selector to clamp that down we'll open up the advanced set the shape to ramp down and you can see that clamps down the beginning and then expands out to letting it wiggle I'd like to ease into that more let's crank the ease low up quite a bit you can see we can really ease into that shape so I don't want this to scatter quite so much I want it more to kind of be swimmy and Wiggly so let's open up the Wiggly selector and the way to really get things to synch up like that is the correlation I'm gonna set mine to 99 so these shapes are doing almost the same thing just slightly offset let's do a quick preview okay that's not too bad it sort of feels a little bit more swimmy than like the kind of flow that I want though personally I like to set the Wiggles per second to zero and animate either the spatial or temporal phase you can scrub through those real quick and kind of see it's basically doing the same thing I just feel like this is a little more controllable so I'm going to alt click on the spatial phase and type time x 400 we're actually taking the time of this comp and feeding that to this value but then multiplying it so that it actually goes fast enough for us to see so now we have this nice kind of swimmy flowy look here which I like for what we're doing now if you take just a little time to do some coloring maybe some simple parenting like this and you can even create a gradient over the life of this shape which I showed you how to do in the previous tutorial you could make some nice swimmy speed lines on whatever shape you like so that wiggle on the tail length is pretty cool but I'd like to explore making this a little more reactive here I've taken our length rig you can see here's the slider set to 200 and there's that same code we were using I've tapered that a bit by creating an animator for scale set to 20 so that it fades away to a smaller size but not all the way to zero so that and then setting to ramp up or the only changes I made there and then you can see I created a path for this to move along i animated the first margin property and I created a keyframe where the lead character hits the bottom of each of these bounces I then spent a little bit of time finessing these in the graph editor you can use my example in the downloadable project file or you can do this yourself and then your values will be slightly different here so this is pretty cool already but the Hale doesn't feel very dynamic right now of course we could animate this length slider manually but that feels like a lot of work and it's not very adaptable one thing I do want to point out about this technique these values right here if you change the path they're not going to land you in the same place anymore because this is based on the overall length of the path so if you end up having to manually keyframe several things on here it's going to be kind of a pain if you end up having to adjust the path quite a bit so that's why I'd like to make this very dynamic and adaptable using some more expressions so the first thing that I'm going to do is duplicate our length property I'm going to rename that speed and I'm going to go ahead and push that above the length property we're gonna be feeding a couple expression controls into a larger expression that we create in length so I'm going to keep length at the bottom because it's kind of the cumulative result of all these things that we're doing another thing you're gonna see me do a couple times is hide properties I don't need to see if you hold alt and shift or option shift on the Mac and click on a property it will hide it it's still there it's just hidden one annoyance is that expression controls still come with the compositing options that are very useful on other effects but meaningless here and they just kind of get in the way so I'm gonna take this speed slider and I'm gonna pick with this up to my first margin property so right now it's just giving us the same value but what I would like to do at the end of this is type dot speed now it's going to give us the speed of the changes of that property so you can see that value here gets to the end it hits zero pretty cool it's not doing anything yet while I could have just plugged this directly into the length slider we're gonna be doing some other things so I think it makes more sense to keep it separate but let's go ahead and just pick whip our link slider directly to this okay well it's gonna break because this is negative and our length can't be negative let's go ahead and undo that so this is just because of the way that I have animated this I could have used the last margin property it could have reversed the path etc but it was a good opportunity to point this out if you need to force a property to be positive you can use a function called math absolute so I'll type that in here math.abs salute open parentheses go to the very end of the line close parentheses now it's always going to give us a positive version of that number whether it's positive or negative so now if we pick with the length slider to our speed slider we're going to get a tail length that represents the speed at which the positions changing here I mean that's okay but probably not exactly what we're after so the easiest way to fix that is probably just to do a little easy division here right we could just add something at the end like divided by 50 and now it'll always be much shorter well that's too short maybe we want divided by 5 well that's clearly not the right case either let's go ahead and take that off there let's create another expression control here I'll duplicate speed and call this one divider I'll open this up and just set this to 10 for now now we certainly could just divide this right here but we're going to be adding more to this expression so to keep things clean I'm going to start establishing some variables so let's say variable SPD for speed equals and then it's pick whipped to that speed slider right we'll add a semicolon to end the line go to the next line variable divide DVD equals and we'll just pick whip to that divider value semicolon so now we could simply type speed divided by divider and that'll work the same as if we were hard coding the value but now it's a lot more accessible you can see we're getting closer but things obviously aren't quite right yet you need to add a little bit more the next thing I'd like to do is use the clamp function to establish a minimum and maximum value for this tail length one of the problems you can see is that our dot disappears when we get to the end of the path and then there's also some times where it's sort of extending back into a previous bounce and that's just not really what we want so I'm going to create another expression control effects expression controls point control now obviously I'm not really using this as a point but I really like point controls if you need two values contained within a single control I'm going to go ahead and push that above the length I'm going to name this clamp and then I'll set these values to I don't know to 150 again you can just ignore this this is just here to hold both of these values I'll open this up let's come down to our expression so since we're gonna be using clamp let's go ahead and set this speed divide to another variable we'll call this variable tail equals speed divided by divider semicolon so now we need to link to our clamp minimum and clamp maximum which is what we're using the X and y of this point for so let's create a variable called clamp min equals variable clamp Max equals so for clamped min we'll just use this pick whip right here pick whip to that first value the minimum semicolon come down to clamp max pick whip to the maximum semicolon okay so now we're going to put all this together to call the clamp function we just write clamp and then it gives you some parenthesis so we feed it the property we want to clamp and then the minimum maximum we just established all those so tail comma clamp min comma Clint max so now the tail will never be less than two and never be more than 150 but it's still reactive to the speed of the change here almost there you can see we have one little problem and so things are just a little bit jittery I explored a couple different ways to fix this including the smooth function but I ended up landing on value at time which i think is really useful to know for a lot of other things too so I'm going to add one more little bit to this expression and then we'll be done now if this were a real life object the change in the length of the tail would be very slightly delayed from the actual bounces so we're gonna use value at time to approximate that to the end of this first line I'll come just to the left of the semicolon then I'm gonna type dot value at time again you can see the autocomplete took care of it for us and I'm gonna type time minus 0.1 so now this speed value is actually referencing a very slightly different moment in time than the current one which will help offset it just a little bit and makes it look a little bit smoother go ahead and close this out take a look at that you can see how that's a bit smoother it doesn't have those kind of jerky points from where it's hitting the bounces right you could certainly be using variants of this on things that aren't text layers you could use this to drive a trim paths for example to do something similar with a shape layer I found this to be pretty handy doing these little zippy detail rigs like this and again if you save this as a preset then you can use it all the time and not have to set all these expressions up again manually we can take this idea even further by adding a couple more text animators and using some basic expressions to make those dynamic as well here you can see I have basically the same rig I just changed up the path and some of those keyframes on the first margin property so that it moves a little differently you can create your own path like this where you can find mine in the downloadable project file so instead of just a tapered stroke tale we're gonna make this more of a magic wand trail the first thing I'm going to do is disable the visibility of the layer controls because they're going to kind of get in our way here you can do that right here from your View menu where there's a hotkey for it as well we have our taper animator from before we want to make sure it's not selected I'm going to animate position so again we could be changing the whole thing that's not what we want to do I'm gonna go ahead and name this scatter and then we're going to add selector Wiggly so if we crank these values up now you can see we get that nice randomness just like we did an earlier example but I'd like to start linking some of these properties to some of the other things that we've already set up so that they're all reactive let's take this position property and just pick whip it straight up to that speed slider okay that's a little bit much but if we divide it by let's say 40 it's actually pretty good you could obviously create another divider control if you wanted to or you could connect this to the existing one and multiply it by 4 it's all about how much control you want to give yourself but also how many controls you want to deal with it just depends on what works for your specific example let's do a quick preview ok that's already pretty interesting right maybe a little more chaotic than I'd like it to be let's clamp that in a little bit using that range selector technique we saw before open up advanced ramp up in this case and we can probably just leave everything else alone let's take a quick look at that pretty cool I think there's one other property I would like to mess with here in the Wiggly selector you can actually determine the range of these wiggle values here you could clamp them in a bit if you wanted to so we're gonna link that up and then I'm also gonna tweak this correlation set that to zero just to make it as random as possible you're obviously welcome to tweak all of these until you're happy with the way they look I'm going to link this max amount to this speed slider up here open this up and again just divide by 40 I found that worked pretty well now our maximum amount of wiggle is taking that speed property divided by 40 let's take the minimum value just link it to the max and if you just put a minus sign at the beginning it'll take the negative of that value it just helps smooth everything out a bit again feel free to tweak yours to make it look however you'd like I'm gonna do one more thing to add a little bit more complexity I'll take this whole scatter animator duplicate and change the name to color random I'll open this up delete the position property and add property fill color RGB so now it's randomizing the fill color of these characters over the life of the path gives it this nice particle trail look right but it's all speed reactive just for one more little flourish I'd like to add on here let's find a good frame kind of there great I'd like to add the echo effect time echo and you can see it just adds additional copies of this that kind of followed just barely behind it in time more properties that you're welcome to tweak if you like I think this looks pretty good stock but when it's in motion it kind of just looks like you fattened everything up and added a little bit of extra sparkle on top of it here now you've got this great particle chasee sort of look this will work really well for maybe a magic wand or just a cool magical trail sparkly trail that needs to follow something you could obviously be using different characters for this alternating characters randomizing some of these characters I think the possibilities here are really cool if you just take some of these techniques and combine them in different ways see what you can do let's finish up with one last example that uses some of these ideas in a slightly different way we're starting off with a very similar build here this is essentially just the length rig you can see we have the same expression here tied to the link slider and everything I've drawn this curvy path for it to follow the major change is that I'm using Quattro slab this time because I wanted squares instead of circles the first thing I'm going to do is extend out the length over here because we're actually going to be pushing these characters along the path like this so we're going to need more of them let's go ahead and set this up to 500 you can see it extends the bounding box it's actually just extending this way off the end of the path here in a straight line and zoom back in I'm going to start by choosing animate position and then we can set this to zero 170 we can actually get rid of this range selector we're not going to use it you can just highlight it and delete it and then I'll choose add selector Wiggly now you can see it's randomizing these characters up to 170 and why off the path in both directions if we do a quick preview you can see what's happening now that's way too fast for my taste and like I said earlier I kind of like to animate the Wiggles per second in a different way so I'm gonna set that to 0 let me go ahead and set my correlation to 10 so it's almost totally random but has a little bit of linkage and then for the spatial phase that's another way to advance this I'm gonna create a simple expression here time times 100 and that's what we're dealing with now just a nice little vertical flow let's take a second rename this position randomness close that up now we're gonna advance this along the path using the first margin property let's come to the first frame see how this just scrubs it along the path here let's go to where that's just barely off make a keyframe come up to the end and I'm gonna scrub this into the negatives I'm holding shift so this goes faster maybe somewhere around minus 2000 see how that feels pretty good and you see how that slight vertical position wiggle that we did is giving it a little bit of a swim almost like it's twisting around the path a little bit just gives it a nice look next I would like to randomize the shapes of some of these a little bit so making sure that we do have this other animator selected I'm going to choose animate scale let's go ahead and name this one rectangles and we'll set the scale to 300 100 you can see it stretched all of them out I don't quite won all of them if we open up our range selector let's choose maybe 80% of them and we can't really see a difference now because it's off the end of the screen so if we go into advanced let's maybe set our shape to smooth and randomize order on now you can see we have kind of a nice mixture of squares and rectangles some of them are all the way to that 300% rectangle some of them are kind of in the middle just gives it a nice randomization right mixes stuff up we're done with that so we can close it up so I'd like to add a little bit more slide to this but it wouldn't really work if we did it in that same animator as before so I'm gonna duplicate this one let's rename that slide and open this up all we really need change here is the position let's change that to 500 zero so now this is gonna give us a nice horizontal slide along the path it's just kind of upping that randomization kind of making it look like we've almost got some parallax going on here just add some more visual complexity right like the previous example I'd like to add a little bit of color randomness to this just to make it a little more interesting so we could copy paste it from the previous example where we can build it real quick here I'll just duplicate my slide rename this to color open this up we can delete the position add property fill color RGB let's open this up real quick we can just alt click to kill that expression go ahead and set the correlation to zero and that's pretty good so once again we have a nice randomization and the look of the characters but it's very easy to control and to tweak so we probably could call this done but I wanted to point out a couple ways that you could make this even more interesting obviously you've got this nice path you can have all these characters flow along this path like this it's a real nice way to do sort of a flow of particles in a very specific direction one thing that's cool about this is you have this path here so you can still do other stuff on this like you could add effect generate stroke let's crank this up so we can actually see it you can use the stroke effect on the path on this layer let's set the brush really high up to maybe like 200 and the hardness to zero let's set the opacity down to 14 and then let's make this I don't know kind of a warm yellow color I could probably eyedropper that one but I'm kind of just eyeballing it here maybe for this data flow that we've been kind of making here we want to have something that kind of represents maybe like the big chunk of data coming through so this might be a good way to do it you could animate your start and end values here maybe you could animate end from 0 up to 100 here then you could animate start from 0 up to 100 to wipe it back off let's hit u to reveal those keyframes and you'd spend a little time finessing that end up with something that looks kind of like this that's sort of interesting maybe not exactly what you want but could be an idea maybe another interesting way to use this is actually to reveal the data flow you could set this to reveal original image crank that opacity back up and you know you probably want to tweak some of your settings a bit but you could use this as kind of a way to wipe this on and off that could be interesting I'm gonna go ahead and turn this off I like that but I'm gonna show you one other idea too I think this is pretty cool like this with this kind of chunky techy feel but it's also really easy effect stylize rough and edges to make this kind of a blobby cartoony look and even with just the stock settings you can see you're getting this nice kind of swimmy paint glob trail here and again this is all totally controllable if I wanted to I could come in here and just kind of reformat the way this path is around now it swims this way or I could have this following a shape moving around there's all kinds of really cool possibilities here because this is essentially an effector setup it's very easy to tweak the overall look and motion of this thing without having to do a whole bunch of stuff manually hopefully I've gotten you excited to continue exploring these techniques and to expand upon them yourself finding new ways to approach the tools you were already using is a great way to freshen things up and maybe help you think differently about a lot of the other tools as well if you want to learn more check out the article over at school of motion comm there you can download the free project file which has all the elements we built today if you want to learn more about motion design check out all the other great tutorials podcasts and articles at school of motion comm and of course if you want to step up your skills even further check out the awesome courses they offer I've taken an TN for several of them myself and they really are an excellent way to level up your skills if you'd like to share anything cool you've created using the text animator like this please let us know in the comments or on our social media channels and if you have any questions of course feel free to send those our way too thanks for watching this has been Kyle Hamrick for school of motion we'll see you next time
Info
Channel: School of Motion
Views: 134,745
Rating: undefined out of 5
Keywords: Motion Design, Motion Graphics, After Effects, MoGraph, design, animation, text animation, text animator, vector design, expression controllers, text animation tutorial, text animator tutorial, after effects tutorial, adobe after effects, adobe after effects tutorial
Id: TsHxw9SMcw0
Channel Id: undefined
Length: 32min 35sec (1955 seconds)
Published: Wed Oct 23 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.