Quickly Create 3D in After Effects

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
- What's up? Joey here at School of Motion and welcome to day seven of 30 Days of After Effects. Today what we're going to talk about is something that's a little bit back to basics in After Effects and something a lot of you probably already know, which is that After Effects is sort of a 3D program. You can create 3D objects by taking two and a half D cards and kind of arranging them to create maybe a box. Now why would you want to do that when maybe you already own Cinema 4D? Well I'm gonna get into some of the reasons why you might want to do stuff like this in After Effects. I'm gonna show you some cool tricks. We're also going to talk about animation principles, which is a big deal to me. It's kind of the secret sauce that makes your work feel good. It's kind of hard to put your finger on why it feels good if you don't understand animation principles. And unfortunately, we can only cover so much in just this one lesson so if you really want in-depth animation training, you're gonna want to check out our animation bootcamp course. Not only is it several weeks of intense animation training, but you also get access to class-only podcasts, PDFs, and critiques on your work from our experienced teaching assistants. Every moment of animation bootcamp is designed to give you an edge in everything you create as a motion designer. Also, don't forget to sign up for our free student account so you can grab the project files from this lesson. Alright, that's enough. Let's get to it. So what I'm gonna show you guys is a really simple trick to, you know, kind of get a nice 3D object that you can use inside of After Effects using all native After Effects stuff. You know, no fancy plug-ins, no elements, no Plexus, nothing like that. And, you know, this isn't always that useful and, of course, if you're great with Cinema 4D then a lot of times if you need a 3D object that's what you'll use. But, you know, this example here I thought would be kind of appropriate because it's a look that it's just easier to do in After Effects so I thought that that would be kind of a good way of showing you guys something that you may not think to use After Effects in this way and sometimes it's useful. So let's start a new comp real quick, just a standard HD comp, 24 frames a second. And I'm gonna show you a super fast trick. This is really easy. I'm sure there's a million tutorials out there that show you how to do this but I'm gonna show you how to put together a 3D cube, a really quick and easy way. So let's make a new solid and let's just kind of pick some red color here. And let's make it a square just to make it easy. So let's make the width 1,000 and the height 1,000. So there you go. So we'll make it a 3D layer, right. So obviously now we can rotate it around and we can sort of move it in 3D space and put together a cube. So let's just call this Side01. And then I'm gonna duplicate it. I'm gonna change the color of this. So I'm just gonna hit shift + cmd + Y, brings up the solid settings and we'll pick a different color. Alright, so this will be Side02. And then we'll just keep doing this. We'll make six sides so we can make a cube and I'll try to do this quick. So we've got red, green, blue. I'll duplicate it. Why don't we make this one kind of yellow. We'll make this one, I don't know, how about pink? Pink's so hot right now. It's like one of those in colors. And then six is gonna be, let's go orange. Great, alright, so we've got six sides. So one of the things that is cool about After Effects is that if you kind of make a 3D scene in a comp like this, right, so this is Comp 1. Why don't I rename this? Why don't we rename this Cube_PC. PC stands for pre-comp, okay. I'll put this in my comps folder. So if I make a 3D scene in this comp and then I drag it into a new comp like this, it comes in as one layer. But using a couple of tricks I can actually turn this into a 3D object, which is really sweet. So why don't we call this 3D_Test. Alright, so back in cube pre-comp, first thing we need to do is we need to actually arrange all of these solids so that they look like a cube. So I'm gonna come over here where it says Active Camera and I'm gonna switch this to Custom View 1. And this just kind of gives me just an easier way of looking at the 3D arrangement of what these layers are kind of, you know, how they're set up and it gives me this cool kind of top-down view, like a three quarter view but I don't have to add a camera to my scene. This little axes over here, if you don't see those, the way you add those is you come down here to your guide options and you click that and you turn on 3D Reference Axes. And that can make it easier sometimes if you're kind of confused and you're not sure if you want to move Side06 this way and you're using your position sliders. So if you're not sure which way is x and z and y, this just makes it easier for you to see, right. So if I want to move it in Z, this gives me a good reference. Alright, so why don't we turn off all of these sides for a minute and let's say that Side06 is gonna be the front of the cube, okay. And actually this might make more sense if I just rename it Front. So this is gonna be the front and Side05 is gonna be the back. Okay, so if this is the front and I'm gonna want the anchor point of this cube to be right in the middle of the cube. So we have to start thinking, and again this happens so often in my tutorials, but we have to think about math a little bit. Each of these sides is 500 by 500. So what that means is the cube, the dimensions of this cube are gonna be 500 this way, 500 this way, and 500 deep, this way, okay. And so 500 by 500 by 500 cube, the middle of that cube is actually gonna be 250 by 250 by 250. So we're starting to get into some funky math here. On top of that, the default position of an object in After Effects, it is not zeroed out the way it is in Cinema 4D or any 3D app. It's zeroed out according to the composition space, which you can see 960, 540, zero, right, on X Y Z. That is the center of the comp. That makes it a lot harder to generate a cube because if this is gonna be the front, I need to move it 250 pixels this way, not that way. I need to move it 250 pixels this way. And on Z, that's pretty easy. I would just say minus 250, right. But if it was on X, well now I have to kind of do math, right. 960 plus 250 or 960 minus 250. And you can click on the 960 and come over here and actually type in 960 minus 250 and hit enter. It'll do the math for you. But there's actually an easier way to do this. So this is how I do it. I'm gonna add a Null and I'm just gonna call this ZERO, alright. Make it 3D, select all the parts of your cube, parent them to ZERO. Now ZERO, if you look, it's right in the middle. The position of ZERO is 960, 540, zero. Okay, so it's right in the middle of the comp. Because I've parented all these layers to it, the position of those layers will now be zeroed out. And I don't have to do anything with this null. All this does is it just makes the math easier for me, okay. So now the front of this cube is going to be minus 250. The back of the cube is going to be 250. Okay, and it's very easy to look at now. It's zero, zero, minus 250. Zero, zero, 250. Let's say that the next two sides are gonna be the left and the right. Alright so let's turn the Left side on. So if the Left is going to be literally the left side of this cube, first thing I need to do is rotate it so it's facing the right way. And if I'm going to do that, I gotta figure out, you know, how do I rotate it. And I always just kind of think of it as, you know, which axes is gonna be the pole that's kind of skewered through this thing and it's gonna rotate on and it's gonna be the Y axis. So I want Y rotation, right, and it'll go like this. And I'm gonna say negative 90 and then I'm gonna move it, right. And I know that because it's gonna be 500, this needs to be negative 500. And I can see that I've actually put these two sides in the wrong spot. I need to push this back to 500, or sorry, negative 500. And this one needs to go back to 500. And the good thing is, you know, I saw that I had done it wrong but it was easy to fix because all I have to worry about is one number per layer because I have them parented to this null. So the null is kind of the key to this whole thing. We'll turn the Right side on and we will rotate this 90 degrees, or negative 90 degrees. It doesn't really matter in this case because these are just solids with just the color on it so it doesn't really matter which way I rotate it. And then I will position it, right. And if you're ever unsure, just kind of move it to where it looks right and then look at the numbers. Oh, okay, I know this needs to be 500 so now I know which one to change. Cool. So now I've got four of the sides and now I need the top and the bottom. So this can be the Top, this can be the Bottom. Turn on Top, rotate it. And this time I need to rotate it on the X axis, so X rotation. It can be negative 90. And I need to pull it up here. Now this is one thing that can kind of get confusing. I'm actually pulling the Z axis, this blue arrow of this layer, but its' not moving in Z in terms of its position, right. If we look at the position of this layer, it's moving on Y. And so that's why having this little axis can be handy if you're just starting out or you're getting used to working in 3D space in After Effects. That can be confusing because you're moving it using the Z axis controller but you're actually moving it on the Y axis. So the position is gonna need to be negative 500. And then on the bottom, let me rotate that on the X axis 90 degrees and that position is gonna be 500. Okay, and now we have a 3D cube. And if I take this null and I spin it around, you'll see that we have this 3D cube in After Effects and there's really nothing special about that. But once you have that set up, let's come back into this comp here, this 3D_Test. This 3D_Test comp, all it has in it is the cube pre-comp, okay. And on its own, there's nothing great about this. If I turn this into a 3D layer and I rotate it, it just looks flat, okay. What's cool is if I hit this button here. So this is the Continuous Rasterize button or Collapse Transformations button, okay, and if you hold the mouse over it it kind of gives you a hint, right. So for a comp layer, a pre-comp, it will Collapse Transformations and what that really means is it will just kind of bring all of the depth of this pre-comp back into the current comp. So if I check this, now what I have is a 3D cube. And if I rotate it, you'll see I actually have the full 3D cube but it's all in this one layer, okay. And what's great about doing it this way, so you can obviously move things around in 3D space and you can rotate them and that's all fine. The only thing this is useful for is a cube. There's actually some scripts out there on aescripts that can automatically arrange layers in like a cylinder and some other kind of more advanced shapes than a cube. But you run into a bunch of problems with edges when you're using After Effects for 3D layers in this way. But what's nice about doing it this way too is you also can treat this comp as a true 3D object. So I can unlink the X Y and Z scale and you can actually scale this thing on X Y and Z. And so there are plenty of uses for something like this. I mean if you're doing any kind of charts, bar graphs, or you just kind of need to draw on some kind of 3D cube shape like this, you can do it really easily in After Effects. And I'm gonna show you guys a trick that I use to get around one of the limitations of After Effects which is something I'm really hoping goes away sooner or later. So let's take a look. This is the most simple version of a cube you can do. Let's take a look at, so here's the comp that I set up for the render you guys saw at the beginning of this video but let's take a look at this, okay. So here's a texture that I made and I just drew this in Photoshop using some brushes and it's just a two-frame cycle. And I was kind of going for that really lo-fi like a stop-motion-y chalkboard kind of drawing thing, okay. So I took that and I just looped it, okay. So I have one frame and then another frame. If we go into the next comp that this is used in, I'm gonna hit tab to bring up my little flowchart and I don't know how many of you guys know about this but this is a pretty useful little trick in After Effects. You can hit tab and it's tab, by the way, only in After Effects Creative Cloud, and later. If your using After Effects CS6, I don't believe it's tab. I believe it's the shift key, but for CC and up, it is tab. So I'm gonna hit tab and it will show me the current comp right in the middle. It will show me any comps that are being used to make this comp. And then it will show me where this comp goes. This comp goes into Box_Tex. And in this comp, I just looped this texture a whole bunch of times. That's all I did. There are better ways to loop compositions in After Effects. However, sometimes you get weird errors because what happens is this comp here is 12 frames a second and I did that so I could get kind of a more stuttery looking comp here. But I thought, well, what if I want to bring this into a 24-frames a second comp? And if you do that and you're using Expressions to loop layers, sometimes it doesn't work right. So I just did it the old-fashioned way. I just duplicated it a bunch of times. And then from here, it goes into the Box pre-comp. And this is where I did the exact same thing I just showed you, right. I set up all the sides of the cube, parented it to a null so that I had really easy values to work with. So now when I RAM Preview this, you see it. It's kind of this cool stop-motion-y chalk-drawn looking cube, which is great. Alright, so this is box pre-comp. Let's bring this into a new comp. And here's the trick I want to show you. So first thing we need to do is make it a 3D layer, right, but then also hit the Collapse Transformations button so we get a 3D cube that now we can rotate around and scale and do those things with. So here's the problem that have with After Effects, which it seems like it would be easy for them to fix and hopefully they will. If I'm gonna animate the position of this cube, okay, and I really want to get into the curves and make this thing do exactly what I want, I can ctrl + click Position and say Separate Dimensions and that way I get a separate X Y and Z property. With scale, however, you can't do that. If I ctrl + click, it doesn't let you separate the dimensions. Now that's kind of annoying to me. Now, here's an interesting thing. If I, let's say I unlink these and I put a keyframe here and all I want to happen is for this thing to scale from zero on Y over 12 frames I want it to scale up like this, right. And then I grab those, I hit F9 to easy ease them and I jump into into the curves editor, okay. So you can see that I have two keyframes and because I can't separate these dimensions, I see the change on Y but I also have X and Z in there too. And so if in the middle of this I want Z to change, I can put another keyframe there and I can start to change Z. And you actually, let me switch this over to my Value Graph. By the way, if any of this is unfamiliar, please watch the intro to animation curves tutorial. That will get you a little bit more familiar with this animation curve editor. And this tutorial may not make much sense without that sort of background. But what's cool is even though the scale property only gives you one keyframe that has all three directions in it, X Y and Z, you can independently move these things around and you can control the curves, right, for X Y and Z. But the problem is I can't independently move these keyframes around. If I want the Z scale to happen at a different time than the Y, well there's not an easy way to do that. You can do it, right, I could zero out Z here, right. Excuse me, not zero it out, set it back to 100. And then come back here and then change Z. But then if I wanted, and you can see that the problem is it also adds a keyframe to the Y. So if I move this, now I've screwed up my Y curve and so they're all connected. And this is the problem with not being able to separate out the dimensions. So there's a good trick you can use and you can use this on pretty much any property that has more than one piece to it, like an X and a Y property, if you want to control them independently. So let's set the scale back to 100. 100, 100, 100. And what I'm gonna do is I'm gonna add, I'm gonna select this layer and I'm gonna add an Expression Control. I'll add the Slider Control. And if you're not, I'm not gonna go crazy with Expressions here, but if you're unfamiliar, just watch the intro to expressions in After Effects tutorial on the site and it will explain a lot of this. It'll make a lot more sense. I'm gonna name this Slider Control X Scale. I'm gonna duplicate that, call it Y_Scale. And I meant for this to be an underscore so let me fix that. Okay. I've got fat fingers today. And then I'm gonna add another one and I'm gonna call it Z_Scale. There we go, cool. Now what I'd like to do is link the X Y and Z pieces of the scale to these three sliders because these are all separate so I can control them separately. So I'm gonna add an expression. I'm gonna hold option and click the stopwatch and add an expression to the scale property. So I'm just gonna do this real simple. I'm gonna say X equals and I'm gonna drag up to the X_Scale. And I'm gonna end that line with a semi-colon as you're supposed to do with expressions. Then Y equals that part and then Z equals and we'll pick whip up to this. Alright, then whenever you have a property in After Effects like scale, right, it's expecting, you know, when you create an expression, you have to end the expression by giving After Effects the answer. So all of this stuff up here, this is just setting up the variables that I want to use but it doesn't give After Effects the answer and After Effects is expecting the answer in a certain format. For scale, if it's a 3D layer, it's expecting three numbers. The X scale, the Y scale, and the Z scale. So I need to give it all three numbers. And the way you do that is it's called an array. When you have more than one value in a property, you're actually giving After Effects an array, which just means more than one value. The way you type that in is you have an open bracket like this and then the first value which is gonna be this variable, X. Then a comma then the second, Y. Another comma and then the final number Z. Then you close the bracket out, semi-colon, done. Okay, so these variables, these are just making it so that the answer that I'm giving After Effects is easier to read. You actually don't even need to do this step. You could just do pick whip way up here, comma, pick whip up here, comma, and it would just be very silly-looking. And this is just easier if someone else opens your project, they'll be able to tell what's going on. Okay, so we hit enter and we've got this expressions set up now. These are all set to zero so let me set these back up to 100. Cool. And you can see it now, these controls actually control the scale and they're all independent. Okay, so this is fantastic. So what I'm gonna do, the first thing I want to do actually is I want to move the anchor point. The anchor point of this layer is right in the middle but let's say that I had a Floor layer, okay. So here's my Floor layer. I'm gonna make it a 3D layer. I'm gonna rotate it on the X axis 90 degrees. And I'm gonna scale it up really big and I'm going to position it, let's see here. Now here's one thing that it's getting a little tricky, right. Because I have Collapse Transformations on, the layers aren't intersecting correctly and it makes it a little bit hard to see so and this is one of the things about After Effects that you just have to kind of deal with. If you really are getting into a heavy 3D scene, it might be easier to do it in a 3D app. If you're doing something simple like this, you just have to be careful with your math, okay. So I know if I go to this box comp and I go onto one of these sides, I know that each little side of the cube is 1,000 pixels by 1,000 pixels. So what I'm gonna need to do is have the floor be 500 pixels down. Okay, so this is gonna have to be I believe at 40 pixels. And this actually might be a good place to use the camera tool and kind of move the camera around so I can see, alright, so I can see that the floor is not in the right place at all. Floor's gonna need to be down here. So if we did 540 is where it starts right in the middle and we wanted to move it down 500 pixels, so I typed in, let me do that one more time so you guys can see. This is where the floor starts out. I want to move it down 500 pixels because I know that each side of the cube is 1,000 pixels tall. So half of that's 500. So moving it down 500 would be adding, so I'm gonna type in plus 500 right here and then hit enter and it'll do the math for me. I don't have to do anything. Okay, now I could see the cube sitting on that ground. Looks great. So I want the anchor point of the cube on the bottom of the cube, okay. So I'm gonna hit the A key and, you know, what I usually like to do, I mean, I could just kind of do the math in my head but sometimes it's nice to kind of move the anchor point around so I can kind of get a sense of, okay, it looks like it needs to be about there, right. Maybe there, and if I move the camera, no, that's too far. Right, you can kind of figure out where it needs to be. And so what I'm seeing is that the value of Y is increasing for the anchor point. So I'm gonna add 500 right there, do the same thing, and now the anchor point should be in the right place. Excellent, okay. Now that I've moved the anchor point, the cube has also moved so now I need the Y position to drop 500 pixels. So now that cube is on that floor. And so the reason I did that is because now here's what I'm gonna do. I'm gonna put some keyframes on these expression controls here. And I'm gonna set all of these to zero, okay. And then I'm gonna go for, let's say, eight frames, okay. And I'm gonna put them all up to, let's say, 30, alright. Now let me select the layer, hit U, and grab my keyframes and hit easy ease and just do a quick RAM preview and see what's happening, okay. So the cube's just scaling up and I want it to happen a little bit faster than that so let's go like this. There we go. Okay, so it scales up really fast. It doesn't feel very good, you know. There's a lot of animation principles that are not happening. So why don't we make this feel a little bit better? So we've got, you know, let me stretch this out one more frame. So it takes five frames to scale up, let's have it overshoot a little bit, right. So I'm gonna go forward three frames now and I'm gonna put some keyframes here. Then I'm gonna forward two frames, put some keyframes here. And so now what I'm gonna do is I want this keyframe to be where it finally lands at 30, 30, 30, which means that on this frame it's gonna overshoot too big. So I'm gonna select all of these and I'm gonna scale them up so it's a little bit too big, okay, 38. Then when it gets to this keyframe, I want it to overshoot but the other way. Now it kind of rebounds and scales a little bit too far down, okay. And now if I hit RAM preview, you get a little bit of a bounce, okay. But it still feels pretty stiff and so this is where I like to go into the curve editor and really work on these. And you know, again, watch the intro to the curves editor video. That'll explain a lot of what's going on here. But, you know, really like a standard thing I like to do when things have to animate on and look kind of bouncy is I just really like to hit the eases a little harder. There we go. Now it looks a little more bouncy, okay. Right, and so this is great. And because, you know, I have all three of these properties selected, I can hit them all at the same time and adjust them all equally, okay. Now here's where it gets really cool and this is why I set up this expression. The next step that I would like to happen here, right, have it hold for, you know, five frames. I then want the box to stretch out on X, right. So I could put a keyframe just on X. And I want this to take, let's say, 12 frames. So let's go forward 12 frames and let's have this stretch out to 100%, okay. Alright, so if we just play this, right, the box appears and then it stretches out. That doesn't feel very good at all, right. It's like taffy, it's not good. So what we're gonna do is we're gonna do the same thing. Okay, so I'm gonna go to where I want it to end. I'm gonna go back a couple frames, put a keyframe. Then I'll go back maybe three frames, I'll put a keyframe, okay. And then what I'm gonna do is I'm gonna go to the beginning here. I'm gonna go forward maybe a couple of frames and I'm gonna copy and paste this keyframe. And now I'm gonna switch into the curve editor and I'm gonna make this a little bit clearer. Now I'm only working on the X scale. I'm not working on the Y or the Z. And what's great about this if we look at this is if I like how this is working but I want to change the timing of just the X property, right, just the X scale, it's not gonna screw up the Y and the Z the way it does if you do this directly on the scale property. So we're in the curves editor. What I actually want to happen is I want this thing to anticipate a little bit. So it's gonna move in this direction. So first I want it to move in the opposite direction. That's what anticipation does and that's how you can give your animation a little more life. You know, you have it kind of fake, like it's gonna go in and then it shoots out, okay. And then I want it to overshoot. And then overcorrect, okay. So it's just kind of doing the same thing as it did before, right. So it anticipates in, alright, I'm just gonna kind of go through it so, it goes in anticipation, overshoots, overcorrects back, and then bounces out. And along the way, you know, I'm just making sure that I give these things nice kind of drawn out eases so that they move really fast in the middle, right. The steep part of the curve is the fast part and the more I draw these out, the steeper it gets. And then when it's approaching the value, it really flattens out and it really takes a long time to get there. Here we go. Okay, so now I have it. Pop up and appear and then it stretches out, okay. So that's great. And now I've got this all set up. It looks great on the Y. So why not copy these values and paste them here, right? And then I can just offset them. And so now because of the way this is all set up, right, I can even have these things overlapping and play with the timing of them, right. And these are things that would be very hard to do just using the built-in scale property. But if you just take the time to set up a little bit of an expression controller like this, it makes things a lot easier. And then I can copy the same thing onto the Z, offset that a little bit, right. Right, and now you can get these really cool funky 3D animations with these crazy looping textures. I mean, you know, the big thing I wanted to show you guys was if you wanted to create a texture like this, this kind of fake stop-motion-y looking thing and apply it in Cinema 4D, it's not a big deal to do it. But the great thing is that in After Effects you can do it and then immediately tweak the timing and really easily say, okay, you know what, I don't like how this side of the cube looks like a mirror image of this side of the cube. Maybe what I'd like to do is rotate the texture on this side of the cube and you just come in and you grab the left side and you rotate it 90 degrees and now you've got, and you hop back in, and now you've changed it instantly. And the animation's done. And, you know, again, one of my big things is sometimes you're in it to get a sick piece for your reel and you want the absolute best quality thing you can get. Sometimes, you're just paying the bills, okay. And we used to have a saying, one for the meal, one for the reel. And sometimes it's more than one for the meal. Maybe it's three or four for the meal. And it's when your doing projects like that and you just want to get the thing done. And you don't really care about having ambient occlusion and global illumination. You just need a neat-looking cube that you can control the animation, get something interesting out of it. This is a great way to do it and don't forget that After Effects can do stuff like this just fine. In the example that I rendered out, I had lights and shadows and depth of field and all of it was done in After Effects. So you have all of those options. And I just want to reiterate that the stuff that may feel like, oh this is beginner stuff, it's very very useful and it can save you time. And again, you know, time is money especially when you're a freelancer. So I hope you guys learned something today. I hope maybe it makes you look at the 3D system in After Effects a little differently, you know. It's funny how often just making a 3D cube and animating it pops up in motion design. And you don't always need to use a 3D app and you can get stuff done a lot quicker and move onto the next project. So thank you again and stay tuned for the next episode of 30 Days of After Effects. Thank you so much for watching. I hope you learned something new, or at the very least, I hope it refreshed your memory about something in After Effects that maybe you hadn't used in a while that can be really really useful. Remember to check out our animation bootcamp course if you want an in-depth learning experience focused on teaching you the craft of animation. And if you have any questions or thoughts about this lesson, let us know. Thanks again, I'll see you next time.
Info
Channel: School of Motion
Views: 213,009
Rating: 4.9445705 out of 5
Keywords: motion graphics, tutorial, 3D, Objects, After Effects, Cinema 4D, Animation, Create
Id: v22bsrFRjs0
Channel Id: undefined
Length: 35min 10sec (2110 seconds)
Published: Wed Jun 28 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.