From the course: After Effects: Compositing Animation from Animate CC

Assembling a 3D environment

From the course: After Effects: Compositing Animation from Animate CC

Start my 1-month free trial

Assembling a 3D environment

- If you liked the previous chapter where we invaded a city with martians and blew the city up, you're gonna really like this chapter because we do the very same thing again. The difference is we are now going to do it in 3D. So this is the first phase of setting up a 3D environment, or a fake 3D environment, in After Effects. And this will enable us to do all kinds of things that we can't do in a flat scene. So let me walk you through it. So what I did to create the scene was I took the flat, graphical elements from my original Flash or Animate CC project, and I flattened them out. I took all the perspective out of 'em. I used the distort tool to turn them into square, flat objects. And the city was already flat anyway. The road, I think I recreated that from scratch. That was easy. This is the down-shot of a big road. Very big scene because this is going to be stretched over a large area, so it's, in terms of pixels, it was 3840 by 2160, so it wouldn't look like pixels. The sky's the simple color card, and the cityscapes are exactly the same as they were in the original scene. So, we're gonna import them all in here and arrange them in 3D. Let's see how. So we import the files by double-clicking in the project panel, or you can also go file, import, file. And in the Exercise Files > 03_01_3D_scene > images folder, just select all the PNGs. Don't worry about the Photoshop file. Import them. And now you've got all of the artwork. So we want to drag these into a folder and call it PNG. And now we can open that, and click all of these, and drag them into a new composition. And I'm gonna make it four seconds long, and it'll be a single composition. Very nice, so now we can pull this down just a little bit. All I want to do is pull the comp out into the main stage, into the main area here. Right click on it. And then, I'm gonna call it just "_scene". So let's switch off all of the layers apart from the ground, and what we're gonna do is turn this layer into a 3D layer. Now if you don't see all this, you might be seeing this instead, this toggle switches modes, we'll just convert between the bland modes and the options that will enable you to make this 3D. Under the little 3D cube, click that. And nothing has happened. That's because we need to change the rotation, so go to the ground layer and hit R. Now that we have 3D mode on, not just do we have X, Y, and Z rotation, we also have orientation. So if we begin to just spin these numbers around, you can see, we can rotate this object on these different axes. So, we want to flatten the object down, and the precise value to get it exactly right is 270. You can type in 270 if you feel that you can't quite get it right, but that has to be precise. 271, it's not going to align up with the buildings, so now we have this and we set the camera to tumble, and nothing will happen. It won't happen because we're in the main mode. We have to change our view port from Active Camera to Custom View 1, so we can set up different custom views here. It's very convenient. So let's go to Custom View 1, and move. Now, be very careful as you move. It's very easy to overshoot and tumble like this, so we don't want to go tumbling upside down, so just move very slowly and gently at first, and you'll get the hang of it. We can also use the wheel mouse to zoom in. And that is our first 3D object, so that wasn't too difficult. So lets go to, we can actually padlock that, and let's go to the sky. Switch that on. And we don't see anything yet because, again, we're in a 3D view, so let's make the sky 3D. And now we can begin the process of moving the sky. So, you'll see this little X, Y, Zed axis so we can push that down the blue axis. It's very easy to get lost if you do something like this, you can end up moving things off to some weird space. Undo that. With this kinda thing, we really want to be strict. If you really want to be super controlling about, then the P opens the position, and you can also set these values numerically. So I'm gonna move the sky just up actually a little bit, and push him back this way, and we can also use the arrows, as well. That should be pretty good. And now we can collapse the ground, collapse the sky, and padlock those. So the next step, I think we'll bring in these "city far and near." Let's just pull those down, and I'm going to do the same thing with those. I'm gonna make them 3D. Oops, there we go. And they're both flat at the same level, but let's just push them both back, and then we'll select the little unified camera tool, the tumble. And what I want to do is push the city far, that should be further away. Push that lower. And use the selection tool, and just nudge him back a little bit. Very nice. So now as we begin to move our camera around, you get all kinds of nice little subtle parallax. So let's hide all these for now, and let's look at making a building. So, before I go into 3D mode, it's actually safest if you apply the pivot, so I'm gonna just stay in flat mode for now, and move these parts of the main front building. This is the building that goes on the left side closest to where the robot's gonna walk out from behind this corner of the building. We need to place the pivots right down here on the corner, so hit Y on the keyboard to activate the pivot transform, and we're going to apply that very carefully, because any mistake on this, and you can get weird little air gaps between the different parts of where the buildings meet. Same thing here, we'll move the pivot here. That would not be good enough, so that's gotta be like, really close in there. That's pretty decent. So now, I'm going to switch these to 3D mode. And I'm spinning around, so, bit too much. Let me the, or un-hide the road, so I can get some context as to where I am. And undo if you feel like you've spun, I've been rotating by mistake, you see, so, let's move the stage around. Okay, so what I want to have happen is the store to move to this side and occupy this corner. So let's do a few things first. Oops, I need to select both buildings. Let's pull 'em up until I see them just over the ground. Now I'm going to pick the side layer. Oops. Click off and back on, very annoying. Now something seems to have become just a little misaligned, so I'm going to use selection tool, use the green arrow, pull it up, and I'm going to tumble around. I think that's pretty close. Let's spin around with the camera tool. Make sure that they're all on the same layer. That's pretty good. They might just be floating a couple of pixels off the ground, but I don't think that's going to be too much of a problem. Ah, there we go, see that? So, let's select both of these and pick the green arrow, and just bring it down. So that's pretty good. Now I'm going to tumble around again, and I want to rotate the store aside, so again, spin to where I need to be. I'm going to just select the storefront. This did a really bad job of de-selecting layers, so sometimes I have to select off and back on again. It's very annoying. Go to R for rotation, and I need to find the right axis to rotate on, which is this one. I always get these mixed up, so I just keep pushing one until I find the right one. Remember, 270 is the right angle, a 90-degree right angle, so that's to there. And now I want to move both of these layers, so again, select this and this. Use the selection tool. And there we go. And tumble around again. So there's nothing stopping us from nudging the entire stage down if you think they're just out of the right view. I'm gonna try to select the Y-axis. Still see the letter Y, which appears as I hover over X, Y, or Zed, so that way I know I'm moving everything down on the right axis. And I forgot to bring in the, I forgot to bring in these guys, so let's see where they went. Not too bad. I'll just bring them down, as well. Again, on the Y-axis. And that's it, that is our first preliminary pass at setting up a 3D stage. A little bit tricky, there's no denying that. You do have to be patient. You'll find that you'll develop a touch in terms of using the tools. The one thing I do want to show you would be, what would happen if you wanted to rotate the entire building. So, let's say you select these two sides here, and you want to rotate them. This can be a little tricky operation. It's very easy to spin something around the wrong axis, so let's say I pick these two. I'm going to padlock everything else. I've got the rotation tool on. As you can see, I'm trying to select these corners. What am I looking at? Things go flying around the place very easily, so again, hover your rotation tool over one of the axes, and when you see the letter Y, you're going to rotate on the Y-axis. When you see the letter X, you're going to rotate on the X-axis, which you don't want to do, and ditto with the other axes. So the green arrow, the Y, would be the one in this environment, that you want to spin your buildings around on if you want to make little changes to the angles, and as you set up the other buildings. So I would leave it to you to create these same corrections in the other buildings to line them up, to place the pivots, rotate them around, and at that point, you'll be able to proceed to the next movie.

Contents