- [Evan] Hello, everyone,
this is Evan Abrams, and in this After Effects
tutorial we're gonna take a look at the most basic building
block of life, the shape layer. And while it might not be for you, I know for me in almost
every motion graphics piece I am using shape layers. And what you're looking
at here is not a 3D thing, it's actually just a
bunch of 2D shape layers moving over top of each other creating the illusion of depth. And that's exactly what we're gonna do when we go deep into the
basics of these shape layers. So right here in After Effects, I wanna first go through what
you saw in that intro file. Here we are in that exact composition and I'll just drag through it. Wee, some things build on, and then they loop,
loop, loop, loop, loop, and then they stop. And all of this is caused, a lot of that motion
is caused by this null, that things are paired to two. And all of the interesting
stuff is happening in this composition here, this DNA chain. And all of that is controlled. Its time here is being
controlled by time remapping and that's what causes it to slow down. But if we go inside that
composition you can see it's just made of many duplicates
of the same composition that are offset in space and time. And they've got their
own little time remapping that is also looping. If we did nothing it would just
loop, loop, loop, loop, loop all the way until the end of time. And if we go into one of these then we can really see
where the stuff happens. We've got just these two circles that rotate around each other, kind of, to they're really just moving sideways and we're flippin' 'em and being
clever and it's super good. But that is what we're
gonna start by making. We're gonna start by
making the smallest unit of this more complicated piece. And I'd recommend from
a project standpoint, always starting with the
smallest, most basic unit. So the first thing to do is
to make a new composition and we'll call it, Comp
One, doesn't really matter. You might wanna label it something so you know that this
is the smallest unit. And it's duration is not super important except that you want it to
go for as long as you need to produce that looping. And the frame rate might
actually be important. For us we're using 29.97 blah blah blah, but you could use 30, 24. But the big thing is you want
to have good control over this and understand how many frames
are gonna happen a second because we're gonna need
to count out some halves and thirds and whatever. So 30 is a nice number, it
divides nicely in half at 15. We're gonna be good to go. So we've got a new comp,
we're makin' that, great. Now we need to start making
the actual shape layer parts of this little sequence. So we need that rectangle in the middle that kinda spins around. So what we're gonna do is gonna
make a new rectangle, sweet. Pick a better color for it,
maybe just a lighter color, maybe something closer
to a yellow, okay, sweet. It'll go into that
rectangle, rectangle size. And I already know some sizes, so we're gonna go 310 by 40. And quite frankly you might
be using different sizes, but in order for this to
kinda work out and line up, I'm gonna have to call
out a bunch of numbers. I'm usually very anti-recipe. So when you do yours, feel free to do whatever numbers you want, and I'll try to explain why
we're doing what we're doing. But in this case, we
have the size 310 by 40 and I'm gonna set some
markers on the timeline before we get into keyframes. I wanna set a marker here at two seconds and I wanna set a marker at four seconds. And I'm just hitting the asterisk on the keyboard to make that happen. And I'm doing this so that these markers will be present when
I use this comp later, and you'll see how that goes. But you can double-click on a marker and type something like, loop start, and then you'll probably
wanna know when the loop ends. Those are two good things to know. And we're really just
setting ourselves up to know that the loop should
start here and end here. And to that end, let's set some keyframes for what that might be. The rectangle size we want to change, 'cause imagine that this is
a cylinder and it's rotating. And that means that if this is rotating then it should appear to
get narrower and then wider. So at the start and end
it should be this wide, and in the middle it
should also be this wide 'cause we're gonna go once, twice around. So this way and then this way again. And then in the middle, like we talked about
knowing the half values of these things, should be zero. So it's gonna go, wee-erm, and then again at the 15 here, go back to zero like that. So it's gonna go wee-er, wee-er. Okay, good enough. Now that's not really a
cylinder, is it really? 'Cause you really need
the circular ends on it. So let's get those goin' on. Let's add an ellipse to this. Now we're adding that ellipse into the group of rectangle one. So this should really be cylinder one. I don't know, is that
how you spell cylinder? Could be. And so the ellipse path here, you're gonna need to
change its size, 40 by 40. It's a good size. And maybe unlink that. 'Cause at this point here,
that's perfectly good. So let's set a keyframe at here, and here, when we're looking at, I
guess, the end of the cylinder. But when we're looking at the side of it, we wouldn't see the end at all, so it would be totally flat like that. And also its position would
change to be at the end of this. So what I would like to do instead of keyframing the position all the time, 'cause that would annoy me, is I'm gonna hold down Alt,
click on the stopwatch, and set an expression,
then use the pick whip here and pick whip it to the first part of the rectangle path up there. Now that's gonna create a
little expression for us here saying a variable named temp is equal to the content, blah blah blah, essentially this number, and then please make this value, I guess, that number, comma, that number,
which is not what we want. We want that number, comma, zero, but what we actually want is that number, divided by two, comma, zero. So what that means is that
this is going to be found at 155, zero, which oddly
enough is at the end. And it will always be at the end and that's exactly where
we would like it to be. Now I'm just gonna
duplicate that path, boom, and make a little change here to get that cylinder onto the other end. So now you can see, we've
kind of got these two caps, and I'm sure if one of them was shaded we might be able to say that's a cylinder. We're not gonna be shading it because that again is
too much work, no thanks. I'm just gonna hit U,
grab these two keyframes, copy them, paste them over
here, paste them over here so that we've got this whole thing goin'. Wee, whir, whir. So that could possibly be
a cylinder, I don't know. Again, it's not very good. But I'm gonna easy ease these keyframes. You do that by selecting
keyframes, right-click, Keyframe Assistant, Easy Ease, or you can hit F9 after
you've selected them. That's good, too. 'Cause I want sort of an
easier motion about it. I want it to just spin around, kind of pause here in the
middle before accelerating and moving on with its day. The next component, obviously, is to get some of those circles. We should get those goin' on. So let's grab the old circles here. I like to just double-click on that. Let's give it another color. Let's give it like a
blue color, that's nice, a nice bright blue, cool. And I think we should probably
label these things correctly like this is gonna be, BLUE, and this is gonna be the MIDDLE piece, and it should probably
be a different color, maybe a peach, I don't know. But what I wanna do is
go into the ellipse here and I wanna alter it to be 100 by 100. And what it should be doing
is changing its position. So I'm just hitting, p,
to call up that position and the position is going to be changing. So I'm just gonna set some keyframes. 'Cause what we are gonna have this do is move from over here, here at 760, and then it'll move all the
way over to the other side where it'll be at 1160, and
then it should move back. Copy + Paste, copy that first keyframe. So it's gonna move over
like this and then back. And these should be eased as well. Go in there, make sure you've eased those to look like this on your speed graph. So wee, wee. So that looks kinda like
it's waving back and forth, so it's not really
crossing over, that's fine. So what we can do is, Command + Shift + Duplicate to split it. Spit that layer right there, and then move one below like this, so that it's comin' over here and then it's switching to
the other side and going back. Pretty great. Now we're gonna duplicate this again. And this is going to be a red. Let's do that, and so we should name it. RED, well done. And then we should change its color. The color should be like a red, or a pink, or something like that, maybe
down in the oranges zone. That's probably better. And it should be, if I
call up its position, just extend this a little bit, so we can see what it's actually doing, it should be doing the reverse. So we're just gonna grab
these, drag them like this, copy this keyframe,
and paste it over here. So what it's doing is the reverse. It's flipping around the other way. And we're gonna need to split that layer, and then take this one and
put it under like this. So what's goin' on is
it's switching the sides as it goes around. So that's pretty much
the old beginning here, put the old end here,
and we watch that back. Wee. It's just goin' around and around, and we've pretty much done it. So it's almost like this might
be a three-dimensional thing made entirely out of
two-dimensional things and it's workin' out. But I don't think it's quite
done, it's not quite great. We really need an in for this, right? These need to come from somewhere. So what I'm gonna do is
I'm gonna just make sure that we have a full loop here
at the beginning to play with. So we've got the red one's doin' it. I'm just gonna copy this keyframe, paste it here so that it's doin' that. Let's copy these. Copying, pasting, and whir. So we've got one extra to deal with. And we should do a little split here so that it's switching over like that. So it's whir, whir, whir, good. Okay, I think that's
workin' out for right now. What we're gonna need to do
now is have these come on in a slightly interesting way. I think let me first grab
them, holding down Alt, and I'll just kind of
extend this a little bit so that it's going a little bit slower and then speeds up when it
really gets into the heart of it. And what I would like to
do is have these things sort of scale themselves on. I want them to pop on with their scales. So I'm gonna hit S
here, pull up the scale, set a little keyframe, and move that ahead so
it's 100% at that point. It can be 0% here. And what I'll do is I'll
go into the graph editor, which I'm accessing. You can click this. I have a shortcut for the
graph editor, but whatever. Just click this, go to the graph editor, and instead of looking at a speed graph, let's look at a value graph. We can see that the
value graph is telling us in a straight line it's
going up like this. Well, I'm gonna easy ease both of these, ease, ease, both of these, that rhymes, with this button, or use
your favorite shortcut. And I'm just gonna pull this handle across and I'm gonna push this handle up. So on the value graph,
what that's telling us is it's going to come up, get larger, and then reduce back to
regular size, I guess, pop. It's kind of like this popping sensation. And we can maybe shorten that up and see if we can get that to look a little bit
crisper as it comes on. Cool, I think that's workin' out. And I'd like it to be popping on when it's already in motion, great. I'm gonna copy that scale, copy it, paste it onto this
other one so it pops on, and then this one can
start coming in like that. So pop, plop, maybe I drag
these a little bit like so. So it's popping off the other side, great. And then this can just, it
can just begin right there. So whir-oom. We've got, that comes up,
and then that comes up, and then things are goin'. So I think that's a decent enough way for things to work out. I think I'm happy with how that worked. So we need to take this composition which we know as the Smallest Unit, and we need to take this
and put it into a group. So we're gonna just drag
it into a new composition. And just like I promised,
if you look here, you can see markers saying
when the loop will start and when it will end, and we will now go Layer,
Time, Enable Time Remapping, and we're gonna set up that loop. I'm gonna hit the keyframe button here because I'm at the loop start point. I'm gonna go to the loop end point and set one there as well. And then I'm gonna go to the last keyframe by clicking this little
triangle and remove that. So without doing anything, what's happening is things
are playing normally, this comes one, and then it turns around, and then it does nothing
'cause there's no more keyframe to tell it what time to be. And what I need to do is
I need to hold down Alt, click on the stopwatch,
and do some typing. I'm gonna type L-O-O-P, capital O-U-T, and then some brackets, and inside those brackets some colons, and inside those, well,
I guess they're quotes. Yeah, quote, quote, inside
those quotes is going to be, cycle. And what that's telling it is that just cycle
through all of the things from the first keyframe to the last, which is not exactly what we want because we only wanna
cycle these two keyframes. And we wanna cycle this one and this one. So we're gonna put comma, and then a one. And that's saying,
cycle the last keyframe, and the second last one, please. If we wanted to do more of them, we could increase the number, we could decrease the number depending on how many keyframes there are. But that means that it's gonna
go right back to this one as soon as it's done, so
wee, wee, it continues. And that's not too bad. What I'd like to do though
is go ahead a few frames and stretch that out. So I'm stretching that out so
it goes a little bit slower and what that'll do is kinda just smooth it out a little bit and it kinda gets rid of
some of those awkward, the frames where this
thing's just a circle. I don't like those ones. So this means that that
frame won't be shown anymore. It's gonna show a different frame. It'll show in between frames
of everything we did in here, 'cause it's all keyframes and shape layers and everything's great,
and sizing wonderfully. And if we just stretch this out we can just make it go in slow motion just by moving the time remapping. And it looks very smooth 'cause it's all keyframes all throughout. So that's pretty great. Okay, one loop is established. Now we need to duplicate this and offset it in time and distance. So I'm gonna duplicate it, I'm gonna hold down Alt,
and hit Page Down once, twice, three times,
four times, five times, and then I'm gonna move this one, two, three, four, five, six, 60, 120 pixels up, and so now you can see, oh yeah, that now it's startin' to
look like a thing, I guess. I mean, we'd have to duplicate it and continue on this
pattern over and over again, duplicating, moving, moving, duplicating until we have a very large set of stairs that would look like this. So that all of these things are offset from each other a bunch and they are offset
from each other in time. All regular units, though. So you go ahead and make yours like mine and I'll get back to you after this break. Hopefully yours looks like mine in that you've got this
big series of steps and they're all offset from
each other in space and time, and we're now ready to go
ahead and make use of this. One thing I think you might wanna do is maybe set a marker out here, that is to say, animation on complete, so you know when everything
has been completed for when we take the group
and put it into a composition to do something with it. So at this point, we know we wanna do something interesting with it. How about we make a new null object? We parent this to that, and then we have this scale, and rotate, keyframe, keyframe, move ahead to 10 seconds or somethin' and we're gonna have the
scale go all the way down to 25 and have this go to, I don't know, whir, I don't know, this is
pretty good, there we go. One, yeah, 315, and we go
into their graph editor, we look at the speed
graph, not the value graph, and push the speed to look like this. Ooh, not like that. Like this, or maybe you
use a script to do this, I don't know what you do,
I don't know your business. But yeah, see we've got this mm, weep, weep, weep, weep,
weep, things comin' on. What we can do is we can
find the start of this, trim it up to there, go like this, so it's (imitates motion sounds). Ooh, that's pretty fun. Now you'll notice that we're
only seeing part of this stuff. In here, there's so much
more that we could be seeing. So in this composition, you have to make sure you
click this button here, the continuous rasterization
collapse transformation button which is what will expand things so you can see all the cool
stuff you got goin' on. It's really important to
see all the cool stuff. So this is spiraling, it's turning, it's building this thing. But one of the problems
we're gonna have now is that it keeps going. That's not what we want at all. What we do wanna do is go in here, Layer, Time, Enable Time Remapping and we're gonna set a keyframe down here. We're gonna go ahead a few
frames, 30 frames, maybe. Set another keyframe, and we're gonna delete
the keyframe at the end, so that after this
keyframe, no more moving. And then we will ease this. And let's just move ahead,
let's double that distance, or double that time, so when
we go into the graph editor, and perhaps we look at
a speed graph instead, we can see here that this is now slowing down as it exits this keyframe here. So what we wanna do is probably check out the old speed graph, grab this thing, move it up to there. Probably wanna double-click on it and make it continuous,
meaning the incoming and outgoing speed will be the same. And then we just kinda have to tweak this a little bit, I think, to get
it exactly how we would like 'cause I kinda want a soft
landing for this thing. Wee-ooh, wee-er, wee-ooh, and
then we go to the value graph. Uh huh, there's your problem right there. You wanna have a nice soft taper, so when it's done it has that slowing down, starting to slow down and
then eventually comes to rest, and that's exactly what we want. And you might wanna tweak these
handles just a little bit, a little bit of tweaking on the handles, tweak, tweak, tweak. There we go. I think I'm happy with that, fine. And then put in some text and whatever the crap else you want. But I think we're pretty much done. We've got this thing animating on, and then looping, and
it's doing all the things. I'm happy with this. We've conveyed the illusion of depth just the same way I provide
the illusion of depth at parties by going on Wikipedia and look at a bunch of
things before I show up. It's really important to
have things to talk about. That's pretty much it. If you have questions about this project, then please ask them in the comments. I'd love to help you get through it. And share what you make
with the shape layers as you convey the illusion of depth. I'd love to see what you guys are making, that would be great. If you enjoyed this, if you like to learn about After Effects, and motion graphics, and
this was good for you, then please subscribe to this channel. We put up new stuff here
as often as is possible. I guess I'm trying to do a once a week, so let's see how that goes. If you have questions about After Effects motion
graphics in general, hit me up on Facebook, or on the Twitter, @ecabrams on there,
links in the description. The project file that we just worked on, that we just did right now is
available at evanabrams.com, so check that out if you're interested. Subscribe to this channel to
learn about After Effects, and motion graphics, motion design. It's what we talk about all the time. And if you subscribe to the channel, then I will see you around the internet. Thanks for watching, and have a great day.