Animate With a Control Layer - Adobe After Effects tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
this is Evan Abrams and in this After Effects tutorial we're gonna be using a gradient control layer to alter the scale of all of these objects I mean you could do it with keyframes but that would take a lot of time and it's hard to edit them individually later so I think there's a pretty good pretty good method it's pretty fast saves me a lot of time hopefully you enjoy make some cool transitions and I mean I guess you could save all of the time that I've wasted explaining what this is instead of just getting in the tutorial anyway usually polite people would apologize but I say okay so inside of After Effects what we're gonna do is use a control layer that looks something like this to make all of these layers I think there's a lot of them all animate on and off at the same time so this as you probably guessed requires an expression and it's a clever one because I'm a clever person and come up with clever things I guess I don't know let's just start over from scratch and I'll show you what I'm talking about I'm gonna create a new composition none of what's inside here has any difference to me so I'm just gonna use HDTV 29.97 preset cool 30 seconds who cares first I'm gonna make a new background I make it ever solid let's make this one blue okay okay whatever so this we are back around cool so that's a fine fine background color now the next I'm gonna do is create a control layer all of these changes in a property are going to be controlled by a layer that simply changes from black to white and then back to black so I'm gonna make a new solid cool and the solid is going to be 100% black okay I'm also going to need a new solid that is 100% white okay cool and I'm going to need a new solid that is I don't know 80% gray I guess sorry for the raspberry anyway so we've got these things and all they're gonna do is essentially they're gonna animate over using the linear wipe there's nothing really interesting about that so I'm just gonna go linear wipe all right drag that out and the linear wipe I'd like to go from a hundred percent to zero percent cool so it's wiping this thing on we just like that I'd like to go from this side and like I have a feather of 500 should be good okay so this feather is on that's cool and then I would like the light gray to also do that so I'm gonna copy that linear wipe and put my playhead back the beginning here paste it and now as you can see if we look by hitting you and looking at all the key frames stuff we've got one thing that comes on and then we just have to offset this and another thing comes on so goes white then it goes gray and we're gonna want to push these smush them together so that there's like this really bright band here and then it goes back to gray so that's as much as I care to do on this you can do whatever you want on your gradient control layer if you want to have just undulating craziness going on just a whole lot of black and white whatever whatever black and white animation you make here is going to control other things this is just the best example I suppose so I'm gonna take these and I'm going to pre compose them I'm going to call this control layer that's a good name for anything cool and here we have control layer and background we're gonna put the control layer behind the background just so you know we don't accidentally see it and really you can poke at IAO for the rest of this you don't need to see it just then it exists is enough okay now we're gonna make a star just because you know for fun and I'm gonna give it a fill cool let's make that fill you know not as saturated maybe a bit brighter okay cool stroke I don't really care that much just gonna make it like a dark red maybe something like that cool all right so we have this star and this will stand in as one of the things that has the effect applied to it what I'm doing is I'm just using the control layer to alter the scale of this shape so to do that I'm going to be writing in a big expression so as I'm writing this expression I want you to bear with me I'm gonna put the expression in the description so you can just copy and paste it but just follow along with me and I'll explain what it does to set an expression on a layer hold down alt and then just click on the stopwatch here then you can write in some stuff and the first thing we need to do is set up a bunch of variables we're going to be using an operation called the sample image the sample image basically just looks at a point and then an area around that point and then determines what is the average color of that space what I'm gonna do is first say what layer I want it to look at so this a source layer and it doesn't matter you can call these whatever I'm just using these words because it makes sense and the source layer I would like to be I'm just gonna pick up down here it's gonna be this layer and put a semicolon at the end of that line and we're done so that's basically saying this variable source layer is this layer down here now I'm going to type sample size so all one word equals and then this is going to be the size of the area it's looking at and I really care for it to sample a large area so I'm just going to put it in square brackets 1 comma 1 meaning it's gonna look at a 1 pixel by 1 pixel so just one pixel size of space so when it looks at a point it's gonna be looking at an area of 1 pixel around it so not a very big so this is the size of the sample area cool that's done but the semicolon at the end that variables set up next one is sample point and this is the point that it's Glynn and I would like that to be transform dot position that means that I'm going to be looking at the transform position or right here of this layer to look at so it's looking at this point for this much area on this layer for when it's going to render us back some kind of result okay next line is going to be color I spelled color this way because I'm Canadian now the color that we want returned or the color information is going to be source layer that first variable right there so if you've called your something else that's something else dot sample image so s AMPL e capital i m AG e and then in regular brackets we define the sample sample size kala sample point so essentially we're saying first variable dot sample image so look at this comp and then look at the sample size which we're calling one one and the sample point which is the point on this and that's where you're going to return to us the color which is what it does put a semicolon at the end of that so now we have a variable called color which is returning the color information as a percentage and that percentage will be for you know like we have one one here at one comma one define two parts of an array it's color information there's going to be a four part array so it'll have part zero part one part two and part three so we're only interested in one of those parts I'm gonna say x equals color and then in square brackets a zero so just telling it I'm really only interested in the first part and then I'm gonna multiply that by a hundred meaning take that percentage of you know one to a hundred percent which is a decimal so from zero to one multiply that by a hundred giving me a value of zero to a hundred okay perfect so that's what X is and because a scale property has to be of two dimensions the final output is going to be X comma how you might get something that looks a little something like this so after effects warning property or mentioned these things it's missing or does not exist basically it's telling you you've got yourself a spelling error somewhere so if this happens to you you have to go through here and find where the problem is probably a spelling error on my part does that I really don't know how to spell - good let's do that sours Brown right there cool so once you've got all that figured out and all of the things that you've called things are lining up you will find that as this animates across this animates with it so if we observe what that is you can see that as the value back here starts to change so the value behind this point then the value of the scale starts to change - so look up here in the info panel and you can see you know what the values of things are and Boop there we go so that is what it's doing now you're probably asking yourself well Evan what am I supposed to do with this now that I've made this thing well I'm just showing you as an example on a shape layer you can use fixtures you can use text you can use any layer and apply this to it now that I have it I can just duplicate this and start moving it around and I'm just gonna fill this whole thing up with stars we look at me go that's so great it's over here it's over here and I put one over here and one over here and just keep duplicating and filling this in I don't even care where they go that's not any concern of mine one thing I will tell you though is do not drag one of these out past the bounds of the frame or it will break the expression because you will be referencing a point for which there can be no color information and that will make it upset okay anyway that's full of the stuff so now when we play this through these fill up the whole screen so it starts off blue and then it's just full of stars look at that super-good that's a lot of fun anyway you can use this technique to create a bunch of transitions or whatever or just bring on a whole bunch of elements and the reason we're using a control layer instead of just animating each of these with keyframes or something is that what if later I decide well I don't really like the speed or the method to bring these on all I would instead prefer that this line be more like a like an angle and like an angle in that line well you can do that by just offsetting the angle here like this and then whoosh whoosh comes on at an angle then we come back here well these come on an angle too so that's the important part about this whole lesson is that using a control layer to control a whole bunch of other layers means you'll never have to touch any of these layers again you know except that one time when you touch them way too much and it got really awkward but anyway the point is that just messing around with these expressions will give you control using one layer over a whole bunch of layers and really that just saves us a lot of time I mean this took me less than like 10 minutes to explain to you and it should take you less than like one minute to do so enjoy that anyway this has been Evan Abrams teaching you something quick in After Effects if you've enjoyed learning about motion graphics and After Effects here on the YouTube channel EC Abrams you should definitely subscribe I've been told it's pretty good and I try to put out something new every week if you want to download the project file then I would recommend you head over to ebony Bruce calm and pick that up it's pretty great there's a bunch of links to things you can download there if you have any questions about this tutorial then hit me up in the comments of this tutorial now if you are just talk about after effects and motion graphics in general hit me up on the Twitter at ICI Abrams or get involved on the Google+ page or the Facebook page those are both rad and yeah thanks for watching hopefully you enjoyed it and if you subscribed and then I will see you next time and around the internet thanks again and have a nice day
Info
Channel: ECAbrams
Views: 245,940
Rating: undefined out of 5
Keywords: adobe, after effects, after, effects, tutorial, lesson, how, to, how to, tips, tricks, instruction, help, ECAbrams, Evan, Abrams, Adobe After Effects (Software), Adobe Systems (Organization), gradient, control, layer, animate, time saving, transition, group, expression, sampleImage, sample, image, sampleimage()
Id: 4OQN2mHQuD0
Channel Id: undefined
Length: 12min 58sec (778 seconds)
Published: Fri Dec 06 2013
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.