3D Object Tips in After Effects

The 3D system in After Effects does have more limitations than a full 3D package, but sometimes you don't need all of the power that something like Cinema 4D has to offer. Simply put, if you need some quick and dirty 3D you might be better off staying in After Effects.

In this tutorial you'll learn some helpful tips and tricks to use when setting up a 3D scene in After Effects. We'll also take a look at some animation principles that will help make your work look even better. Hopefully even you veterans will learn something new.

If you have any questions, click over to the Q&A tab to post them. Other students can answer you, and we'll put our team on the case to try and get you a solution ASAP. 

Download Project File
    00:00:00,367(light music)
    00:00:12,283(upbeat techno music)
    00:00:20,099- What's up?
    00:00:20,932Joey here at School of Motion and welcome to day seven
    00:00:23,288of 30 Days of After Effects.
    00:00:25,534Today what we're going to talk about is something
    00:00:27,652that's a little bit back to basics in After Effects
    00:00:29,783and something a lot of you probably already know,
    00:00:32,190which is that After Effects is sort of a 3D program.
    00:00:35,126You can create 3D objects by taking two and a half D cards
    00:00:38,498and kind of arranging them to create maybe a box.
    00:00:41,421Now why would you want to do that
    00:00:42,873when maybe you already own Cinema 4D?
    00:00:45,523Well I'm gonna get into some of the reasons
    00:00:47,037why you might want to do stuff like this in After Effects.
    00:00:50,261I'm gonna show you some cool tricks.
    00:00:52,166We're also going to talk about animation principles,
    00:00:55,381which is a big deal to me.
    00:00:57,182It's kind of the secret sauce
    00:00:58,579that makes your work feel good.
    00:01:00,117It's kind of hard to put your finger on why it feels good
    00:01:02,638if you don't understand animation principles.
    00:01:05,049And unfortunately, we can only cover so much
    00:01:07,612in just this one lesson
    00:01:08,800so if you really want in-depth animation training,
    00:01:11,553you're gonna want to check out
    00:01:12,540our animation bootcamp course.
    00:01:14,737Not only is it several weeks of intense animation training,
    00:01:18,013but you also get access to class-only podcasts, PDFs,
    00:01:21,449and critiques on your work
    00:01:22,775from our experienced teaching assistants.
    00:01:25,222Every moment of animation bootcamp
    00:01:26,821is designed to give you an edge
    00:01:28,871in everything you create as a motion designer.
    00:01:31,365Also, don't forget to sign up for our free student account
    00:01:33,424so you can grab the project files from this lesson.
    00:01:36,095Alright, that's enough.
    00:01:37,224Let's get to it.
    00:01:39,128So what I'm gonna show you guys is a really simple trick to,
    00:01:42,558you know, kind of get a nice 3D object
    00:01:45,322that you can use inside of After Effects
    00:01:47,103using all native After Effects stuff.
    00:01:49,816You know, no fancy plug-ins, no elements,
    00:01:53,207no Plexus, nothing like that.
    00:01:55,838And, you know, this isn't always that useful
    00:01:58,392and, of course, if you're great with Cinema 4D
    00:02:01,346then a lot of times if you need a 3D object
    00:02:03,632that's what you'll use.
    00:02:04,653But, you know, this example here I thought
    00:02:07,185would be kind of appropriate because it's a look
    00:02:10,436that it's just easier to do in After Effects
    00:02:13,308so I thought that that would be kind of a good way
    00:02:15,668of showing you guys something that you may not think to use
    00:02:19,228After Effects in this way and sometimes it's useful.
    00:02:23,010So let's start a new comp real quick,
    00:02:25,403just a standard HD comp, 24 frames a second.
    00:02:30,288And I'm gonna show you a super fast trick.
    00:02:32,835This is really easy.
    00:02:33,885I'm sure there's a million tutorials out there
    00:02:35,515that show you how to do this but I'm gonna show you
    00:02:37,357how to put together a 3D cube, a really quick and easy way.
    00:02:40,672So let's make a new solid
    00:02:43,815and let's just kind of pick some red color here.
    00:02:46,292And let's make it a square just to make it easy.
    00:02:49,408So let's make the width 1,000 and the height 1,000.
    00:02:54,741So there you go.
    00:02:56,546So we'll make it a 3D layer, right.
    00:02:59,279So obviously now we can rotate it around
    00:03:03,010and we can sort of move it in 3D space
    00:03:04,934and put together a cube.
    00:03:06,614So let's just call this Side01.
    00:03:10,924And then I'm gonna duplicate it.
    00:03:13,310I'm gonna change the color of this.
    00:03:14,402So I'm just gonna hit shift + cmd + Y,
    00:03:17,259brings up the solid settings
    00:03:18,802and we'll pick a different color.
    00:03:21,177Alright, so this will be Side02.
    00:03:24,297And then we'll just keep doing this.
    00:03:26,992We'll make six sides so we can make a cube
    00:03:28,987and I'll try to do this quick.
    00:03:30,026So we've got red, green, blue.
    00:03:31,881I'll duplicate it.
    00:03:33,485Why don't we make this one kind of yellow.
    00:03:39,027We'll make this one, I don't know, how about pink?
    00:03:42,779Pink's so hot right now.
    00:03:44,176It's like one of those in colors.
    00:03:45,793And then six is gonna be, let's go orange.
    00:03:50,382Great, alright, so we've got six sides.
    00:03:52,791So one of the things that is cool about After Effects
    00:03:57,259is that if you kind of make a 3D scene
    00:04:00,512in a comp like this, right, so this is Comp 1.
    00:04:03,411Why don't I rename this?
    00:04:06,526Why don't we rename this Cube_PC.
    00:04:10,502PC stands for pre-comp, okay.
    00:04:13,401I'll put this in my comps folder.
    00:04:15,046So if I make a 3D scene in this comp and then I drag it
    00:04:18,835into a new comp like this, it comes in as one layer.
    00:04:24,281But using a couple of tricks I can actually turn this
    00:04:26,811into a 3D object, which is really sweet.
    00:04:29,144So why don't we call this 3D_Test.
    00:04:33,282Alright, so back in cube pre-comp, first thing we need to do
    00:04:36,626is we need to actually arrange all of these solids
    00:04:41,256so that they look like a cube.
    00:04:42,908So I'm gonna come over here where it says Active Camera
    00:04:45,394and I'm gonna switch this to Custom View 1.
    00:04:48,076And this just kind of gives me just an easier way
    00:04:52,263of looking at the 3D arrangement of what these layers are
    00:04:56,469kind of, you know, how they're set up
    00:04:58,260and it gives me this cool kind of top-down view,
    00:05:02,236like a three quarter view
    00:05:03,212but I don't have to add a camera to my scene.
    00:05:07,000This little axes over here, if you don't see those,
    00:05:10,449the way you add those is you come down here
    00:05:13,078to your guide options and you click that
    00:05:15,507and you turn on 3D Reference Axes.
    00:05:18,171And that can make it easier sometimes
    00:05:20,091if you're kind of confused and you're not sure
    00:05:23,053if you want to move Side06 this way
    00:05:26,965and you're using your position sliders.
    00:05:29,033So if you're not sure which way is x and z and y,
    00:05:32,333this just makes it easier for you to see, right.
    00:05:34,686So if I want to move it in Z,
    00:05:36,886this gives me a good reference.
    00:05:38,574Alright, so why don't we turn off
    00:05:40,991all of these sides for a minute and let's say that Side06
    00:05:45,160is gonna be the front of the cube, okay.
    00:05:48,338And actually this might make more sense
    00:05:50,124if I just rename it Front.
    00:05:51,482So this is gonna be the front
    00:05:53,431and Side05 is gonna be the back.
    00:05:55,825Okay, so if this is the front
    00:05:59,112and I'm gonna want the anchor point of this cube
    00:06:02,191to be right in the middle of the cube.
    00:06:03,837So we have to start thinking,
    00:06:06,280and again this happens so often in my tutorials,
    00:06:08,836but we have to think about math a little bit.
    00:06:11,982Each of these sides is 500 by 500.
    00:06:15,576So what that means is the cube, the dimensions of this cube
    00:06:18,447are gonna be 500 this way, 500 this way,
    00:06:22,799and 500 deep, this way, okay.
    00:06:26,751And so 500 by 500 by 500 cube, the middle of that cube
    00:06:31,690is actually gonna be 250 by 250 by 250.
    00:06:37,431So we're starting to get into some funky math here.
    00:06:39,578On top of that, the default position of an object
    00:06:43,971in After Effects, it is not zeroed out
    00:06:46,553the way it is in Cinema 4D or any 3D app.
    00:06:50,041It's zeroed out according to the composition space,
    00:06:54,104which you can see 960, 540, zero, right, on X Y Z.
    00:06:59,542That is the center of the comp.
    00:07:01,281That makes it a lot harder to generate a cube
    00:07:03,960because if this is gonna be the front,
    00:07:06,822I need to move it 250 pixels this way, not that way.
    00:07:12,456I need to move it 250 pixels this way.
    00:07:15,579And on Z, that's pretty easy.
    00:07:17,434I would just say minus 250, right.
    00:07:19,800But if it was on X,
    00:07:22,658well now I have to kind of do math, right.
    00:07:24,780960 plus 250 or 960 minus 250.
    00:07:29,656And you can click on the 960 and come over here
    00:07:34,089and actually type in 960 minus 250 and hit enter.
    00:07:38,932It'll do the math for you.
    00:07:40,816But there's actually an easier way to do this.
    00:07:43,798So this is how I do it.
    00:07:45,593I'm gonna add a Null
    00:07:47,509and I'm just gonna call this ZERO, alright.
    00:07:50,938Make it 3D, select all the parts of your cube,
    00:07:54,477parent them to ZERO.
    00:07:56,425Now ZERO, if you look, it's right in the middle.
    00:07:59,075The position of ZERO is 960, 540, zero.
    00:08:02,326Okay, so it's right in the middle of the comp.
    00:08:05,674Because I've parented all these layers to it,
    00:08:08,545the position of those layers will now be zeroed out.
    00:08:11,915And I don't have to do anything with this null.
    00:08:14,009All this does is it just makes the math easier for me, okay.
    00:08:17,161So now the front of this cube is going to be minus 250.
    00:08:24,110The back of the cube is going to be 250.
    00:08:30,565Okay, and it's very easy to look at now.
    00:08:34,726It's zero, zero, minus 250.
    00:08:36,585Zero, zero, 250.
    00:08:38,456Let's say that the next two sides
    00:08:39,827are gonna be the left and the right.
    00:08:43,648Alright so let's turn the Left side on.
    00:08:45,542So if the Left is going to be literally
    00:08:47,567the left side of this cube, first thing I need to do
    00:08:50,164is rotate it so it's facing the right way.
    00:08:53,432And if I'm going to do that, I gotta figure out,
    00:08:56,352you know, how do I rotate it.
    00:08:57,806And I always just kind of think of it as, you know,
    00:09:00,592which axes is gonna be the pole
    00:09:03,130that's kind of skewered through this thing
    00:09:05,408and it's gonna rotate on and it's gonna be the Y axis.
    00:09:09,043So I want Y rotation, right, and it'll go like this.
    00:09:13,236And I'm gonna say negative 90
    00:09:15,935and then I'm gonna move it, right.
    00:09:19,944And I know that because it's gonna be 500,
    00:09:24,100this needs to be negative 500.
    00:09:26,640And I can see that I've actually
    00:09:28,489put these two sides in the wrong spot.
    00:09:31,107I need to push this back to 500, or sorry, negative 500.
    00:09:36,157And this one needs to go back to 500.
    00:09:38,333And the good thing is, you know,
    00:09:39,322I saw that I had done it wrong but it was easy to fix
    00:09:42,142because all I have to worry about is one number per layer
    00:09:45,626because I have them parented to this null.
    00:09:47,652So the null is kind of the key to this whole thing.
    00:09:50,506We'll turn the Right side on
    00:09:52,265and we will rotate this 90 degrees, or negative 90 degrees.
    00:09:56,977It doesn't really matter in this case
    00:09:58,262because these are just solids with just the color on it
    00:10:01,991so it doesn't really matter which way I rotate it.
    00:10:04,738And then I will position it, right.
    00:10:06,360And if you're ever unsure, just kind of move it
    00:10:09,673to where it looks right and then look at the numbers.
    00:10:12,470Oh, okay, I know this needs to be 500
    00:10:15,054so now I know which one to change.
    00:10:16,887Cool.
    00:10:18,291So now I've got four of the sides
    00:10:20,608and now I need the top and the bottom.
    00:10:22,113So this can be the Top, this can be the Bottom.
    00:10:27,380Turn on Top, rotate it.
    00:10:31,775And this time I need to rotate it
    00:10:33,612on the X axis, so X rotation.
    00:10:37,069It can be negative 90.
    00:10:39,526And I need to pull it up here.
    00:10:41,548Now this is one thing that can kind of get confusing.
    00:10:43,828I'm actually pulling the Z axis,
    00:10:47,253this blue arrow of this layer, but its' not moving in Z
    00:10:53,413in terms of its position, right.
    00:10:55,256If we look at the position of this layer, it's moving on Y.
    00:10:58,187And so that's why having this little axis can be handy
    00:11:00,753if you're just starting out or you're getting used
    00:11:03,811to working in 3D space in After Effects.
    00:11:06,283That can be confusing because you're moving it
    00:11:08,959using the Z axis controller
    00:11:11,660but you're actually moving it on the Y axis.
    00:11:14,354So the position is gonna need to be negative 500.
    00:11:17,339And then on the bottom, let me rotate that on the X axis
    00:11:21,80490 degrees and that position is gonna be 500.
    00:11:26,883Okay, and now we have a 3D cube.
    00:11:29,164And if I take this null and I spin it around,
    00:11:33,161you'll see that we have this 3D cube in After Effects
    00:11:35,798and there's really nothing special about that.
    00:11:39,233But once you have that set up,
    00:11:41,581let's come back into this comp here, this 3D_Test.
    00:11:45,070This 3D_Test comp, all it has in it
    00:11:47,016is the cube pre-comp, okay.
    00:11:50,295And on its own, there's nothing great about this.
    00:11:53,389If I turn this into a 3D layer
    00:11:55,924and I rotate it, it just looks flat, okay.
    00:11:58,982What's cool is if I hit this button here.
    00:12:03,034So this is the Continuous Rasterize button
    00:12:06,357or Collapse Transformations button, okay,
    00:12:09,172and if you hold the mouse over it
    00:12:11,204it kind of gives you a hint, right.
    00:12:12,721So for a comp layer, a pre-comp,
    00:12:15,338it will Collapse Transformations and what that really means
    00:12:18,279is it will just kind of bring all of the depth
    00:12:21,042of this pre-comp back into the current comp.
    00:12:24,216So if I check this, now what I have is a 3D cube.
    00:12:29,615And if I rotate it, you'll see I actually have
    00:12:31,830the full 3D cube but it's all in this one layer, okay.
    00:12:37,372And what's great about doing it this way,
    00:12:40,705so you can obviously move things around in 3D space
    00:12:44,752and you can rotate them and that's all fine.
    00:12:50,774The only thing this is useful for is a cube.
    00:12:54,166There's actually some scripts out there on aescripts
    00:12:56,454that can automatically arrange layers in like a cylinder
    00:13:01,684and some other kind of more advanced shapes than a cube.
    00:13:05,869But you run into a bunch of problems with edges
    00:13:08,785when you're using After Effects for 3D layers in this way.
    00:13:12,295But what's nice about doing it this way too
    00:13:14,646is you also can treat this comp as a true 3D object.
    00:13:20,790So I can unlink the X Y and Z scale
    00:13:24,734and you can actually scale this thing on X Y and Z.
    00:13:29,558And so there are plenty of uses for something like this.
    00:13:34,055I mean if you're doing any kind of charts, bar graphs,
    00:13:37,585or you just kind of need to draw on
    00:13:41,762some kind of 3D cube shape like this,
    00:13:46,180you can do it really easily in After Effects.
    00:13:49,206And I'm gonna show you guys a trick that I use
    00:13:52,482to get around one of the limitations of After Effects
    00:13:55,270which is something I'm really hoping
    00:13:57,064goes away sooner or later.
    00:13:59,304So let's take a look.
    00:14:01,226This is the most simple version of a cube you can do.
    00:14:04,373Let's take a look at, so here's the comp that I set up
    00:14:08,898for the render you guys saw at the beginning of this video
    00:14:11,424but let's take a look at this, okay.
    00:14:13,505So here's a texture that I made
    00:14:15,646and I just drew this in Photoshop using some brushes
    00:14:18,574and it's just a two-frame cycle.
    00:14:20,689And I was kind of going for that really lo-fi
    00:14:23,359like a stop-motion-y chalkboard kind of drawing thing, okay.
    00:14:27,185So I took that and I just looped it, okay.
    00:14:30,862So I have one frame and then another frame.
    00:14:34,992If we go into the next comp that this is used in,
    00:14:39,580I'm gonna hit tab to bring up my little flowchart
    00:14:42,204and I don't know how many of you guys know about this
    00:14:44,459but this is a pretty useful little trick in After Effects.
    00:14:47,285You can hit tab and it's tab, by the way,
    00:14:50,958only in After Effects Creative Cloud, and later.
    00:15:00,813If your using After Effects CS6, I don't believe it's tab.
    00:15:05,044I believe it's the shift key, but for CC and up, it is tab.
    00:15:09,652So I'm gonna hit tab and it will show me
    00:15:11,569the current comp right in the middle.
    00:15:13,844It will show me any comps
    00:15:14,908that are being used to make this comp.
    00:15:18,214And then it will show me where this comp goes.
    00:15:20,630This comp goes into Box_Tex.
    00:15:24,556And in this comp, I just looped this texture
    00:15:26,709a whole bunch of times.
    00:15:28,000That's all I did.
    00:15:29,997There are better ways to loop compositions in After Effects.
    00:15:34,280However, sometimes you get weird errors because
    00:15:38,292what happens is this comp here is 12 frames a second
    00:15:42,581and I did that so I could get kind of
    00:15:44,797a more stuttery looking comp here.
    00:15:47,518But I thought, well, what if I want to bring this
    00:15:49,614into a 24-frames a second comp?
    00:15:53,309And if you do that and you're using Expressions
    00:15:56,493to loop layers, sometimes it doesn't work right.
    00:15:58,967So I just did it the old-fashioned way.
    00:16:02,065I just duplicated it a bunch of times.
    00:16:03,999And then from here, it goes into the Box pre-comp.
    00:16:07,798And this is where I did the exact same thing
    00:16:11,153I just showed you, right.
    00:16:13,110I set up all the sides of the cube, parented it to a null
    00:16:17,111so that I had really easy values to work with.
    00:16:21,173So now when I RAM Preview this, you see it.
    00:16:23,658It's kind of this cool stop-motion-y
    00:16:26,289chalk-drawn looking cube, which is great.
    00:16:29,350Alright, so this is box pre-comp.
    00:16:31,234Let's bring this into a new comp.
    00:16:33,461And here's the trick I want to show you.
    00:16:35,148So first thing we need to do is make it a 3D layer, right,
    00:16:39,110but then also hit the Collapse Transformations button
    00:16:43,476so we get a 3D cube that now we can rotate around
    00:16:46,908and scale and do those things with.
    00:16:48,914So here's the problem that have with After Effects,
    00:16:52,943which it seems like it would be easy for them to fix
    00:16:56,271and hopefully they will.
    00:16:58,134If I'm gonna animate the position of this cube, okay,
    00:17:01,358and I really want to get into the curves
    00:17:03,950and make this thing do exactly what I want,
    00:17:06,376I can ctrl + click Position and say Separate Dimensions
    00:17:09,724and that way I get a separate X Y and Z property.
    00:17:14,064With scale, however, you can't do that.
    00:17:16,843If I ctrl + click,
    00:17:18,021it doesn't let you separate the dimensions.
    00:17:20,629Now that's kind of annoying to me.
    00:17:22,997Now, here's an interesting thing.
    00:17:25,185If I, let's say I unlink these and I put a keyframe here
    00:17:29,962and all I want to happen is for this thing
    00:17:32,407to scale from zero on Y over 12 frames
    00:17:38,276I want it to scale up like this, right.
    00:17:40,762And then I grab those, I hit F9 to easy ease them
    00:17:43,822and I jump into into the curves editor, okay.
    00:17:47,111So you can see that I have two keyframes
    00:17:50,918and because I can't separate these dimensions,
    00:17:53,732I see the change on Y but I also have X and Z in there too.
    00:18:00,175And so if in the middle of this I want Z to change,
    00:18:04,197I can put another keyframe there
    00:18:05,808and I can start to change Z.
    00:18:08,530And you actually, let me switch this over to my Value Graph.
    00:18:12,735By the way, if any of this is unfamiliar,
    00:18:14,317please watch the intro to animation curves tutorial.
    00:18:17,970That will get you a little bit more familiar
    00:18:20,170with this animation curve editor.
    00:18:22,589And this tutorial may not make much sense
    00:18:24,493without that sort of background.
    00:18:27,077But what's cool is even though the scale property
    00:18:31,819only gives you one keyframe
    00:18:33,972that has all three directions in it, X Y and Z,
    00:18:38,317you can independently move these things around
    00:18:40,311and you can control the curves, right, for X Y and Z.
    00:18:43,657But the problem is I can't independently
    00:18:46,217move these keyframes around.
    00:18:47,649If I want the Z scale to happen at a different time
    00:18:51,472than the Y, well there's not an easy way to do that.
    00:18:55,293You can do it, right, I could zero out Z here, right.
    00:19:03,234Excuse me, not zero it out, set it back to 100.
    00:19:06,177And then come back here and then change Z.
    00:19:09,281But then if I wanted, and you can see
    00:19:11,049that the problem is it also adds a keyframe to the Y.
    00:19:13,994So if I move this, now I've screwed up my Y curve
    00:19:17,180and so they're all connected.
    00:19:19,003And this is the problem with not being able
    00:19:20,654to separate out the dimensions.
    00:19:22,881So there's a good trick you can use
    00:19:24,580and you can use this on pretty much any property
    00:19:27,881that has more than one piece to it,
    00:19:31,149like an X and a Y property,
    00:19:33,155if you want to control them independently.
    00:19:35,312So let's set the scale back to 100.
    00:19:38,787100, 100, 100.
    00:19:46,379And what I'm gonna do is I'm gonna add,
    00:19:48,586I'm gonna select this layer
    00:19:49,667and I'm gonna add an Expression Control.
    00:19:53,448I'll add the Slider Control.
    00:19:55,893And if you're not,
    00:19:58,729I'm not gonna go crazy with Expressions here,
    00:20:00,355but if you're unfamiliar, just watch the intro
    00:20:02,271to expressions in After Effects tutorial on the site
    00:20:05,402and it will explain a lot of this.
    00:20:07,238It'll make a lot more sense.
    00:20:08,629I'm gonna name this Slider Control X Scale.
    00:20:13,635I'm gonna duplicate that, call it Y_Scale.
    00:20:20,187And I meant for this to be an underscore so let me fix that.
    00:20:26,000Okay.
    00:20:28,836I've got fat fingers today.
    00:20:31,313And then I'm gonna add another one
    00:20:32,970and I'm gonna call it Z_Scale.
    00:20:34,977There we go, cool.
    00:20:36,318Now what I'd like to do
    00:20:38,032is link the X Y and Z pieces of the scale
    00:20:42,758to these three sliders because these are all separate
    00:20:44,968so I can control them separately.
    00:20:46,752So I'm gonna add an expression.
    00:20:48,904I'm gonna hold option and click the stopwatch
    00:20:51,588and add an expression to the scale property.
    00:20:53,936So I'm just gonna do this real simple.
    00:20:55,623I'm gonna say X equals and I'm gonna drag up to the X_Scale.
    00:21:00,620And I'm gonna end that line with a semi-colon
    00:21:03,045as you're supposed to do with expressions.
    00:21:05,952Then Y equals that part and then Z equals
    00:21:10,807and we'll pick whip up to this.
    00:21:13,051Alright, then whenever you have a property
    00:21:16,900in After Effects like scale, right, it's expecting,
    00:21:20,967you know, when you create an expression,
    00:21:24,317you have to end the expression
    00:21:26,129by giving After Effects the answer.
    00:21:28,594So all of this stuff up here,
    00:21:30,572this is just setting up the variables that I want to use
    00:21:34,848but it doesn't give After Effects the answer
    00:21:36,831and After Effects is expecting
    00:21:38,308the answer in a certain format.
    00:21:40,602For scale, if it's a 3D layer, it's expecting three numbers.
    00:21:45,144The X scale, the Y scale, and the Z scale.
    00:21:48,863So I need to give it all three numbers.
    00:21:50,544And the way you do that is it's called an array.
    00:21:53,746When you have more than one value in a property,
    00:21:56,514you're actually giving After Effects an array,
    00:21:59,395which just means more than one value.
    00:22:01,577The way you type that in is you have an open bracket
    00:22:05,486like this and then the first value
    00:22:08,156which is gonna be this variable, X.
    00:22:10,731Then a comma then the second, Y.
    00:22:13,744Another comma and then the final number Z.
    00:22:16,517Then you close the bracket out, semi-colon, done.
    00:22:19,493Okay, so these variables,
    00:22:21,505these are just making it so that the answer
    00:22:24,253that I'm giving After Effects is easier to read.
    00:22:27,167You actually don't even need to do this step.
    00:22:29,172You could just do pick whip way up here, comma,
    00:22:32,094pick whip up here, comma,
    00:22:33,475and it would just be very silly-looking.
    00:22:35,193And this is just easier if someone else opens your project,
    00:22:38,065they'll be able to tell what's going on.
    00:22:40,294Okay, so we hit enter
    00:22:41,804and we've got this expressions set up now.
    00:22:44,543These are all set to zero
    00:22:45,816so let me set these back up to 100.
    00:22:48,547Cool.
    00:22:49,874And you can see it now, these controls
    00:22:52,233actually control the scale and they're all independent.
    00:22:56,009Okay, so this is fantastic.
    00:22:58,023So what I'm gonna do,
    00:22:59,647the first thing I want to do actually
    00:23:01,178is I want to move the anchor point.
    00:23:03,510The anchor point of this layer is right in the middle
    00:23:07,949but let's say that I had a Floor layer, okay.
    00:23:13,196So here's my Floor layer.
    00:23:15,629I'm gonna make it a 3D layer.
    00:23:17,555I'm gonna rotate it on the X axis 90 degrees.
    00:23:23,635And I'm gonna scale it up really big
    00:23:27,408and I'm going to position it,
    00:23:32,094let's see here.
    00:23:35,533Now here's one thing that
    00:23:36,949it's getting a little tricky, right.
    00:23:38,513Because I have Collapse Transformations on,
    00:23:41,112the layers aren't intersecting correctly
    00:23:44,567and it makes it a little bit hard to see so
    00:23:46,631and this is one of the things about After Effects
    00:23:48,364that you just have to kind of deal with.
    00:23:50,210If you really are getting into a heavy 3D scene,
    00:23:55,252it might be easier to do it in a 3D app.
    00:23:57,853If you're doing something simple like this,
    00:23:59,258you just have to be careful with your math, okay.
    00:24:02,059So I know if I go to this box comp
    00:24:06,043and I go onto one of these sides,
    00:24:07,655I know that each little side of the cube
    00:24:11,746is 1,000 pixels by 1,000 pixels.
    00:24:14,630So what I'm gonna need to do
    00:24:16,728is have the floor be 500 pixels down.
    00:24:20,801Okay, so this is gonna have to be I believe at 40 pixels.
    00:24:27,230And this actually might be a good place
    00:24:30,285to use the camera tool and kind of move the camera around
    00:24:34,939so I can see, alright, so I can see that the floor
    00:24:36,890is not in the right place at all.
    00:24:38,633Floor's gonna need to be down here.
    00:24:41,110So if we did 540 is where it starts right in the middle
    00:24:45,486and we wanted to move it down 500 pixels,
    00:24:49,885so I typed in, let me do that one more time
    00:24:51,937so you guys can see.
    00:24:53,326This is where the floor starts out.
    00:24:55,414I want to move it down 500 pixels because I know
    00:24:58,094that each side of the cube is 1,000 pixels tall.
    00:25:02,308So half of that's 500.
    00:25:04,020So moving it down 500 would be adding,
    00:25:07,838so I'm gonna type in plus 500 right here
    00:25:11,301and then hit enter and it'll do the math for me.
    00:25:13,965I don't have to do anything.
    00:25:15,122Okay, now I could see the cube sitting on that ground.
    00:25:17,603Looks great.
    00:25:18,696So I want the anchor point of the cube
    00:25:20,763on the bottom of the cube, okay.
    00:25:23,105So I'm gonna hit the A key and, you know,
    00:25:26,700what I usually like to do, I mean,
    00:25:29,059I could just kind of do the math in my head
    00:25:30,630but sometimes it's nice to kind of
    00:25:32,471move the anchor point around
    00:25:34,618so I can kind of get a sense of, okay,
    00:25:36,172it looks like it needs to be about there, right.
    00:25:39,786Maybe there, and if I move the camera, no, that's too far.
    00:25:43,094Right, you can kind of figure out where it needs to be.
    00:25:45,319And so what I'm seeing is that the value of Y
    00:25:48,840is increasing for the anchor point.
    00:25:51,019So I'm gonna add 500 right there, do the same thing,
    00:25:55,419and now the anchor point should be in the right place.
    00:25:58,755Excellent, okay.
    00:26:00,136Now that I've moved the anchor point,
    00:26:01,975the cube has also moved
    00:26:03,327so now I need the Y position to drop 500 pixels.
    00:26:08,358So now that cube is on that floor.
    00:26:10,119And so the reason I did that is because
    00:26:11,998now here's what I'm gonna do.
    00:26:13,807I'm gonna put some keyframes
    00:26:14,904on these expression controls here.
    00:26:18,162And I'm gonna set all of these to zero, okay.
    00:26:22,610And then I'm gonna go for, let's say, eight frames, okay.
    00:26:28,091And I'm gonna put them all up to, let's say, 30, alright.
    00:26:35,938Now let me select the layer, hit U, and grab my keyframes
    00:26:39,646and hit easy ease and just do a quick RAM preview
    00:26:42,380and see what's happening, okay.
    00:26:44,013So the cube's just scaling up
    00:26:46,197and I want it to happen a little bit faster than that
    00:26:48,216so let's go like this.
    00:26:50,513There we go.
    00:26:51,434Okay, so it scales up really fast.
    00:26:53,775It doesn't feel very good, you know.
    00:26:55,992There's a lot of animation principles
    00:26:57,362that are not happening.
    00:26:58,503So why don't we make this feel a little bit better?
    00:27:01,649So we've got, you know,
    00:27:03,729let me stretch this out one more frame.
    00:27:05,614So it takes five frames to scale up,
    00:27:08,100let's have it overshoot a little bit, right.
    00:27:10,530So I'm gonna go forward three frames now
    00:27:13,885and I'm gonna put some keyframes here.
    00:27:15,412Then I'm gonna forward two frames, put some keyframes here.
    00:27:19,331And so now what I'm gonna do is I want this keyframe
    00:27:22,023to be where it finally lands at 30, 30, 30,
    00:27:26,015which means that on this frame it's gonna overshoot too big.
    00:27:33,033So I'm gonna select all of these and I'm gonna scale them up
    00:27:35,881so it's a little bit too big, okay, 38.
    00:27:40,676Then when it gets to this keyframe,
    00:27:42,841I want it to overshoot but the other way.
    00:27:45,044Now it kind of rebounds
    00:27:46,239and scales a little bit too far down, okay.
    00:27:49,641And now if I hit RAM preview,
    00:27:51,577you get a little bit of a bounce, okay.
    00:27:53,724But it still feels pretty stiff
    00:27:55,106and so this is where I like to go into the curve editor
    00:27:58,759and really work on these.
    00:28:00,633And you know, again,
    00:28:02,223watch the intro to the curves editor video.
    00:28:04,965That'll explain a lot of what's going on here.
    00:28:07,772But, you know, really like a standard thing I like to do
    00:28:10,956when things have to animate on and look kind of bouncy
    00:28:14,134is I just really like to hit the eases a little harder.
    00:28:19,058There we go.
    00:28:19,891Now it looks a little more bouncy, okay.
    00:28:22,966Right, and so this is great.
    00:28:25,223And because, you know,
    00:28:26,709I have all three of these properties selected,
    00:28:28,603I can hit them all at the same time
    00:28:30,983and adjust them all equally, okay.
    00:28:34,778Now here's where it gets really cool
    00:28:36,158and this is why I set up this expression.
    00:28:38,405The next step that I would like to happen here, right,
    00:28:41,271have it hold for, you know, five frames.
    00:28:44,548I then want the box to stretch out on X, right.
    00:28:48,902So I could put a keyframe just on X.
    00:28:51,962And I want this to take, let's say, 12 frames.
    00:28:55,067So let's go forward 12 frames
    00:28:57,707and let's have this stretch out to 100%, okay.
    00:29:02,402Alright, so if we just play this, right,
    00:29:07,596the box appears and then it stretches out.
    00:29:09,424That doesn't feel very good at all, right.
    00:29:12,280It's like taffy, it's not good.
    00:29:14,569So what we're gonna do is we're gonna do the same thing.
    00:29:17,160Okay, so I'm gonna go to where I want it to end.
    00:29:19,982I'm gonna go back a couple frames, put a keyframe.
    00:29:23,515Then I'll go back maybe three frames,
    00:29:26,145I'll put a keyframe, okay.
    00:29:28,298And then what I'm gonna do is
    00:29:29,179I'm gonna go to the beginning here.
    00:29:30,645I'm gonna go forward maybe a couple of frames
    00:29:33,665and I'm gonna copy and paste this keyframe.
    00:29:35,892And now I'm gonna switch into the curve editor
    00:29:37,506and I'm gonna make this a little bit clearer.
    00:29:39,371Now I'm only working on the X scale.
    00:29:42,132I'm not working on the Y or the Z.
    00:29:44,284And what's great about this if we look at this is
    00:29:47,316if I like how this is working
    00:29:50,526but I want to change the timing of just the X property,
    00:29:53,821right, just the X scale, it's not gonna screw up
    00:29:56,577the Y and the Z the way it does
    00:29:58,412if you do this directly on the scale property.
    00:30:01,575So we're in the curves editor.
    00:30:03,023What I actually want to happen is
    00:30:04,751I want this thing to anticipate a little bit.
    00:30:08,987So it's gonna move in this direction.
    00:30:13,038So first I want it to move in the opposite direction.
    00:30:15,349That's what anticipation does and that's how
    00:30:18,118you can give your animation a little more life.
    00:30:20,195You know, you have it kind of fake,
    00:30:23,253like it's gonna go in and then it shoots out, okay.
    00:30:26,505And then I want it to overshoot.
    00:30:31,472And then overcorrect, okay.
    00:30:33,621So it's just kind of doing the same thing
    00:30:35,726as it did before, right.
    00:30:37,222So it anticipates in,
    00:30:39,767alright, I'm just gonna kind of go through it so,
    00:30:41,358it goes in anticipation, overshoots,
    00:30:45,902overcorrects back, and then bounces out.
    00:30:49,044And along the way, you know, I'm just making sure
    00:30:51,777that I give these things nice kind of drawn out eases
    00:30:56,830so that they move really fast in the middle, right.
    00:31:00,337The steep part of the curve is the fast part
    00:31:03,097and the more I draw these out, the steeper it gets.
    00:31:06,273And then when it's approaching the value,
    00:31:08,827it really flattens out
    00:31:10,306and it really takes a long time to get there.
    00:31:12,951Here we go.
    00:31:15,131Okay, so now I have it.
    00:31:16,480Pop up and appear and then it stretches out, okay.
    00:31:20,641So that's great.
    00:31:21,700And now I've got this all set up.
    00:31:24,893It looks great on the Y.
    00:31:27,239So why not copy these values and paste them here, right?
    00:31:32,998And then I can just offset them.
    00:31:35,396And so now because of the way this is all set up, right,
    00:31:39,684I can even have these things overlapping
    00:31:42,416and play with the timing of them, right.
    00:31:45,109And these are things that would be very hard to do
    00:31:47,743just using the built-in scale property.
    00:31:50,098But if you just take the time to set up
    00:31:51,627a little bit of an expression controller like this,
    00:31:54,380it makes things a lot easier.
    00:31:55,604And then I can copy the same thing onto the Z,
    00:31:58,858offset that a little bit, right.
    00:32:03,510Right, and now you can get these really cool funky
    00:32:06,0183D animations with these crazy looping textures.
    00:32:08,712I mean, you know, the big thing I wanted to show you guys
    00:32:11,078was if you wanted to create a texture like this,
    00:32:14,102this kind of fake stop-motion-y looking thing
    00:32:16,877and apply it in Cinema 4D, it's not a big deal to do it.
    00:32:20,623But the great thing is that in After Effects
    00:32:22,813you can do it and then immediately tweak the timing
    00:32:26,577and really easily say, okay, you know what,
    00:32:29,245I don't like how this side of the cube
    00:32:32,784looks like a mirror image of this side of the cube.
    00:32:35,962Maybe what I'd like to do is rotate the texture
    00:32:38,757on this side of the cube and you just come in
    00:32:42,091and you grab the left side and you rotate it 90 degrees
    00:32:47,140and now you've got, and you hop back in,
    00:32:50,047and now you've changed it instantly.
    00:32:52,157And the animation's done.
    00:32:53,590And, you know, again, one of my big things
    00:32:56,034is sometimes you're in it to get a sick piece for your reel
    00:33:01,850and you want the absolute best quality thing you can get.
    00:33:04,919Sometimes, you're just paying the bills, okay.
    00:33:08,321And we used to have a saying,
    00:33:10,537one for the meal, one for the reel.
    00:33:13,560And sometimes it's more than one for the meal.
    00:33:16,784Maybe it's three or four for the meal.
    00:33:18,742And it's when your doing projects like that
    00:33:20,342and you just want to get the thing done.
    00:33:22,919And you don't really care about having
    00:33:26,482ambient occlusion and global illumination.
    00:33:29,103You just need a neat-looking cube
    00:33:31,234that you can control the animation,
    00:33:32,814get something interesting out of it.
    00:33:34,638This is a great way to do it and don't forget
    00:33:36,726that After Effects can do stuff like this just fine.
    00:33:39,782In the example that I rendered out, I had lights and shadows
    00:33:44,142and depth of field and all of it was done in After Effects.
    00:33:47,986So you have all of those options.
    00:33:51,294And I just want to reiterate that the stuff
    00:33:55,914that may feel like, oh this is beginner stuff,
    00:33:58,647it's very very useful and it can save you time.
    00:34:02,086And again, you know, time is money
    00:34:04,221especially when you're a freelancer.
    00:34:05,688So I hope you guys learned something today.
    00:34:08,715I hope maybe it makes you look at the 3D system
    00:34:13,899in After Effects a little differently, you know.
    00:34:16,479It's funny how often just making a 3D cube
    00:34:20,204and animating it pops up in motion design.
    00:34:23,534And you don't always need to use a 3D app
    00:34:25,882and you can get stuff done a lot quicker
    00:34:27,918and move onto the next project.
    00:34:29,586So thank you again and stay tuned for the next episode
    00:34:32,822of 30 Days of After Effects.
    00:34:35,507Thank you so much for watching.
    00:34:37,285I hope you learned something new, or at the very least,
    00:34:39,433I hope it refreshed your memory about something
    00:34:41,651in After Effects that maybe you hadn't used in a while
    00:34:44,130that can be really really useful.
    00:34:46,217Remember to check out our animation bootcamp course
    00:34:48,227if you want an in-depth learning experience
    00:34:50,384focused on teaching you the craft of animation.
    00:34:53,398And if you have any questions or thoughts
    00:34:54,816about this lesson, let us know.
    00:34:56,714Thanks again, I'll see you next time.
    00:35:02,181(upbeat techno music)