From the course: After Effects Guru: Mastering Cameras and Lights

Creating an orbit null with scripts - After Effects Tutorial

From the course: After Effects Guru: Mastering Cameras and Lights

Start my 1-month free trial

Creating an orbit null with scripts

- So, by default, a camera rotates around its own body based on the anchor point. It's often though, what you want is for a camera to rotate around your point of interest or the main focus in your composition. In this movie, we're going to use a built-in menu option to set up a basic camera rig to control rotation around the center of our world. So I'm here in my Chapter 1_9 composition which you can open from the chapter one folder, if you have access to the exercise files. And we're looking at a scene right now where we extruded 3D text and that's because our renderer is currently set to the cinema 4D renderer. It allows for the extrusion of 3D texts as well as shapes. Breaking down this scene a bit more I've got a background as well as I've got a floor layer. Just to see that clearer, I'll turn off the background so you can see the floor clearly and we can see that background further back in space. What I'd like to do is actually take this camera and rotate it around the scene. If you actually select the camera and press "r" for rotation, you bring up your orientation and rotation values. Even if I grab the y orientation again to sort of set this up, you'll see that it's definitely not orienting itself around the text. In fact, it's rotating around the camera's own body. This becomes even more clear to us. I'll just press command + z to undo and bring up a second view port. In order to have this a little bit less cluttered, I'll first of all select the top view and then from underneath the view options turn to make sure that my spotlight wire frames are off. If I press okay it's going to be a lot less cluttered. I can just focus on my camera here. And now with the camera selected still, and me playing with orientation, just notice again it's rotating around the camera's own body. So how do we get it to rotate around the text? If your text is at the zero play mark in terms of z space, which is where your 3D space starts, we can take a camera here in After Effects easily, go to a layer menu, and under camera choose to create an orbit null. What After Effects is going to do for you is take your camera, attach it to a null object, which happens to be at the same place where your text is, and basically make sure that the camera is a child of that null. The magic part about this is if you press the r key on the orbit null and grab the orientation value, your camera... while you rotate the null, your camera comes along for the ride. So let's just work with a problem here. Let's just say I want to rotate this camera or orient it 180 degrees on the y plane. You'll see one of the problems is I'm actually now looking at... If I just select the background you can see that my background is in the view of my camera. The quick solution to this is actually to just grab the background layer and in a view port you can just take it by its z position and move it behind the camera. You're also going to want to just scale this up so that that background is going to cover the entire area behind it. You'll notice that what you're staring at now with your camera is the back of the text, which is great, but then we have this other area that we're starting at which happens to be, in this case, what is behind your text, which happens to be nothing in this case. So to get around this we might want to grab the background and duplicate it by pressing command + d or control + d on a PC. And with the position value of the BG 2 selected we can actually scrub the z value. I'm going to shift click and scrub this to a negative value. Notice what's happening in my top view. My real goal here is to push this so it is beyond my text layer. I can start to see that happening here in my actual composition. You'll see here eventually, when this updates, I now get a lovely background behind my playful text. It's almost like this text is in a box. But there is how you can easily grab onto a camera and create an orbit null to move around the center of your world with ease.

Contents