3D Camera Tracking In After Effects | Jake Bartlett | Skillshare

3D Camera Tracking In After Effects

Jake Bartlett, Motion Designer

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
14 Lessons (1h 16m)
    • 1. Course Trailer

      1:00
    • 2. How This Project Works

      1:48
    • 3. Getting The Right Footage

      3:24
    • 4. The 3D Camera Tracker

      17:42
    • 5. Positioning A 3D Object Using C4D Lite

      7:22
    • 6. Setting the Ground Plane And Origin Precisely

      2:05
    • 7. Tracking A Zoom

      7:02
    • 8. Dealing With A Trickier Track

      6:35
    • 9. Fixing a Track By Hand & Basic Rotoscoping

      7:32
    • 10. Positioning A Pre-Animated 3D Object

      2:35
    • 11. Simpler Tracking & Casting Shadows

      9:09
    • 12. Rendering Through Cineware

      3:34
    • 13. Coloring & Compositing

      5:29
    • 14. Thanks!

      0:34
31 students are watching this class

About This Class

6c2115e5

3D camera tracking is so much fun! It allows you to place any object into a video clip as if it were there physically when the footage was shot. It seems like a really complicated subject, but After Effects has a really powerful camera tracker that can make it a completely painless process.

In this class I’ll teach you how to shoot your own footage and what to look out for to get a good track. Then we'll go over using the 3D Camera Tracker in-depth in After Effects. I’ll cover lots of different issues that you might run into when tracking footage. You’ll learn how to place an object onto a flat surface, insert a graphic into any part of your scene, and even how to composite 3D objects through Cinema 4D Lite realistically.

This is the second part of a collaborative class series with my brother Aaron. In his class, Cinema 4D Basics: Model & Animate A 3D Robot, you’ll learn how to create your very own customized robot. I’ll then show you how to use that robot as the main object to track into your footage in this class.

You'll need After Effects CC or higher to use Cinema 4D Lite and the Cineware plguin. If you have an Adobe Creative Cloud subscription, you have acces to Cinema 4D Lite.

If you’re not interested in learning Cinema 4D, you can still take this class. All of the principles of 3D Camera Tracking are universal, regardless of what you’re tracking into any footage. So if you want to skip around the Cinema 4D sections and just follow along with your own project, that’s completely acceptable.

3D Camera Tracking is a BIG topic, plus we’re going to spend a good amount of time in Cinema 4D Lite, so there is a whole lot to take in. 3D Camera Tracking doesn’t really limit what you can put into your scene; the biggest limitation is based on the type of footage you’re trying to track. So if you’re having any issues when you’re trying to track, or you have questions about how to shoot your footage beforehand, you can always ask questions. I’m here to help!

______________
Looking for more inspiration? Head here to discover more classes on After Effects.

Transcripts

1. Course Trailer: Hey. I'm Jake Bartlett and this is 3D camera tracking and after effects. In this course, I'll teach you all about tracking graphics into footage. We'll go over how to shoot your own footage that tracks well, dealing with the issues for trickier shots, integrating 3D objects using Cinema 4D Lite, rendering and compositing, and a whole lot more. For the class project will be collaborating with my brothers class Cinema 4D basics, modeling, animate a 3D robot. That way you'll have a custom-designed and animated robot that you can then use to track into footage for this class. If you're not up for creating a 3D robot in cinema 4D, you can still take this class. All of the camera tracking principles are the same regardless of what you wanted to insert into your scene and I'll show you how to use 2D objects generated inside of after effects as well. By the end of the class, you'll learn everything you need to know to track 2D or 3D graphics or effects, static or animated, into any scene or on top of any service. Get ready to keep track of it all. I'll see you in class. 2. How This Project Works: For the class project, you'll have some creative freedom. If you want to follow along with me, you'll want to start by taking my brother's class, Cinema 4D Basics: model and animate a 3D robot. That way you'll have a custom 3D animated toy robot to work with in this class. If you've never used Cinema 4D before, that's a great place to start and if you have After Effects CC or higher, you have access to cinema 4D lite, which is what I used for my project. Once you have your 3D robot, post it to this class's project page. If you're not up for tackling Cinema 4D, that's completely fine. You can still follow along and create a class project. Once you have a 3D camera tracked scene, you can insert anything into it. Text, photos, videos, animations or visual effects, not just 3D objects. So if you'd rather stay in After Effects for this class, you absolutely can. Once you have an idea of what you'd like to track into footage, create a project, and post your concept. Then you'll need to get some footage to work with. In the next video, I'll talk about some tips for shooting your own footage with any camera that works well with 3D camera tracking. You only need one video clip to work with. But if you'd like to take your project further and use a sequence of clips to tell a short story. Go right ahead. For my class project, I modeled and animated this little guy named Randall. I wanted to do a short sequence of shots showing what he might do on a day off at the park. Here's what I came up with. I might add that this was my first time modeling or animating inside of Cinema 4D. Once you've got your project concept, you can move on to shooting your own footage. 3. Getting The Right Footage: The great thing about camera tracking is that pretty much any footage can work. You could shoot high-quality footage on a DSLR or use your iPhone. As long as you're aware of certain limitations and situations that can cause problems, you can get away with a lot without having to spend a lot on expensive equipment. So here's some things to keep in mind to get the best footage for camera tracking. If possible, you should turn all automatic settings off. You want to be able to set the shutter speed, aperture, and ISO so that the image doesn't change brightness throughout the shot. Now, if you really need the camera to automatically adjust the exposure for you, that's fine, but then you're going to have more work and After Effects to match the graphics that you track into the shot with the footage since the exposure is changing. If you're using a camera that has optical image stabilization, that should be fine, but if it's using digital stabilization, like a smart phone, I would recommend you turn that setting off. That can cause warping of the image, that can throw off the camera track. If you are using a DSLR and shooting at a wide aperture to get a shallow depth of field, be aware that once you track your graphics into the footage, you're going to have to do some more work to get those graphics to match that shallow depth of field. You want to try and eliminate as much motion blur as possible. You can do this by not making quick movements with the camera or by shooting at a higher shutter speed to lower the amount of motion blur and make it easier for After Effects to track a shot. Now it's completely possible to track a shot that has motion blur in it, but it has the potential to throw off your track and ruin the effect completely. Don't zoom if you don't have to. After Effects, 3D camera tracker is completely capable of tracking a zoom, and I'm even going to show you how it handles that, but if you don't need to zoom, just don't. It's more difficult for After Effects to track and you want to make this process as simple as possible for yourself. Don't have a lot of moving objects in your scene. After Effects, 3D camera tracker uses motion based on your camera movement to calculate what the virtual camera it's going to generate looks like. If there were a bunch of moving cars or swaying trees or people walking in your scene, After Effects has no way of knowing that those are actually people or cars or trees, it just sees the pixels as movement and will mess up your track, thinking that those objects are part of your static scene. It's okay if you need things to be moving in your scene, but you'll potentially have to mask those out so that the tracker only focuses on the scene itself. Don't allow objects to pass in front of what you'll be tracking. If you do, you'll have to wrote a scope your graphics so that it appears that your graphics are actually behind those objects that are moving in front of it. It can be a ton of work, especially, if it's a complicated object like a person and it's a whole lot of work to get it to look great. Having flat plains in your scene is one of the easiest ways to get a good track. Being able to see a flat ground, walls or ceiling will give After Effects are really good reference for the 3D camera track, plus that gives you a very solid reference point once you go to track your graphics in so that you can easily match the perspective of your scene. Shooting footage of a desk or a table is great for tracking because it's a flat, clean, rectangular surface and it'll be very easy to reproduce that plane once we have our track. Finally, be as steady as possible with the camera movement. If you run around crazy with your camera and you have super-shaky footage, don't expect After Effects to be able to perfectly track that. The smoother you are with your camera movement, the better chance your After Effects track is going to turn out well. So if you take these simple steps to make sure you shoot the right footage, it'll save you a lot of headache once you actually go to track that footage. So now that you know what to look for, you can go out and shoot your own footage and if you have questions or concerns about the specific type of footage you want to shoot, feel free to ask me a question on the Ask Me Anything thread on the discussions page, and I'll work with you to plan out how to shoot your footage. 4. The 3D Camera Tracker: You've shot your footage, now we can start doing the tracking. I knew that for my class project, I was going to be using multiple shots. So I started in premiere and edited a sequence together set to music to make a complete sequence. Now, you absolutely don't have to do more than one shot. But this way I have multiple shots so I can show you different scenarios that you could run into when you're doing the 3D camera tracking. So the first thing I needed to do was put my edit together set to the music. So this is what I started with. Since I'm using the 3D robot that I designed and animated in Aaron's class, I wanted to tell this fun little story of what this toy robot might do on it's day off at the park. This first shot has an object passing in front of the object. So I'm going to have to mask that out. But you'll notice that it's a very simple object. It's a cylinder that has a straight edge that will make it very easy to mask off. That's the only rotoscoping I'll be doing for my entire project. So for this first shot, I wanted that nice reveal to have my robot, who's named Randall, by the way, to just pop out on the other side of that pipe. This next shot is very simple, nothing too complicated going on there. This shot might look more complicated, but again, it's just a simple dolly in, the zoom doesn't change on the lens. It's not too terribly shaky. So aftereffect shouldn't have any trouble tracking that. Same thing with this next shot. Just a very slow pan, a little shaky, but nothing that after-effects can't handle. Then this last shot is the tracking shot where I pictured having the robot walk across this sign, and I zoomed out on this shot to show the entire sign at the end. Now, I know I told you to avoid zooms if you can, but for this specific shot, I wanted to have that. So we'll deal with that once we get to tracking that shot. Now, I don't want to spend anytime tracking frames from shots that I don't need to. That's why I put this edit together beforehand set to the music so I knew exactly how long each shot would be before I do any graphics. Now that I have my edit, I can bring this into aftereffects very easily by selecting my clips, going to edit, copy, then come over to aftereffects and make a new composition, making sure that the resolution and the frame rate are the same as what I had inside our premiere and also making sure that my composition is at least the duration of this sequence, which it is, then I'll press okay, and with that sequence still copied from premier, I will paste. You see it brings in those clips to aftereffects and lays them into my composition in the exact sequence that I had inside of premier. So that's just a very quick way of going from premiere to aftereffects. Then I'm going to rename this comp just to stay organized from the beginning, and I'll fit my composition to the viewer so I can see what's going on. You see that my sequence is exactly the same as what I had in premier. I'm going to start by tracking the most straight-forward shot, which would be this one right here. To stay a little bit more organized, I'm going to pre-comp each one of these clips so that when I start to add more and more layers and cameras, I can keep everything organized per shot. Now again, you don't have to do a project with multiple shots. If you're just working with a single shot, then feel free to keep everything in his main comp. But I'm going to pre-compose this layer by pressing command shift C or control shift C on a PC and naming it shot O3, and I'm going to make sure that move all attributes into the new composition is checked, and adjust composition duration to the time span of the selected layers. What that check box will do is trim the pre-comp to the in and outpoints of that footage layer. So if I press okay, you can see the length to that layer hasn't changed. If I go into the pre-comp, our footage layer is still trimmed to just the portion that we want, to give myself a little bit more room to work here. Now, the reason this is important is because when we apply the 3D camera tracker, after-effects automatically analyzes any part of that layer that isn't cut off. So if I were to open this clip up, we can see that it's actually over a minute long. If I were to have that entire clip in my sequence untrimmed, the 3D camera tracker effect is going to analyze all of that clip, which is over a minute of footage that we don't need to track. So absolutely 100% make sure that only the portion of the clip that you want to track is visible before you do any tracking. Once you have clipped the way that it needs to be, we can apply the 3D camera tracker effect. I'll just drag this directly on the clip, and immediately we get this blue banner that tells us that aftereffects is analyzing the clip in the background. If you come over to the 3D camera tracker in the effects control panel, you can see that my clip is actually being analyzed right now. You can do whatever you want while this is happening. I could go to a different composition, add adjustment layers, start color correcting, whatever you want, and that process will still happen in the background. Once it's done, as long as it's successful, you'll see all these colorful points show up on top of your footage. As I move my mouse around, you can see that we're getting a bunch of visual feedback, and if I scrub through this footage, you can see that these points are attached to the points of the video that they're over top of. This is exactly what we need to get a good track. So let's dive a little bit deeper into what the 3D camera tracker effect is actually doing. After it's analyzed our footage and generated all of these points, we have a handful of controls that can help our track produce better results. This first option which is shot type allows you to choose a fixed angle of view, variable zoom, or specify angle of view. Now, on this particular shot, I did not zoom the lens at all. So I can leave that at fixed angle of view. That will just help with aftereffects calculations. If I were to have zoomed, I would've selected variable zoom. If you happen to know what the angle of view was for your camera, you can specify that by choosing this option. I've never needed to do that though. Aftereffects is pretty good at automatically choosing the right settings. You don't really need to worry about show track points, that just allows you to switch between the 2D track points that it used to generate your 3D solid track, and I've never needed to do that. Also, you have the ability to render your track points. Again, that's something I've never needed to do. You can control the track point size, which can be helpful because sometimes the points are extremely small and you need to scale them up, or sometimes it can be way too big and you want to scale them down. You can also change the target size, which is this red circular icon. If I turned that way up, you see it gets much bigger. So these are just controls to help you visually navigate the effect. If I open up the advanced tab, there are definitely some things you're going to want to know about. The first is the solve method. The solve method is how aftereffects decides what type of calculation to use to produce your 3D camera, most of the time using auto detect works. The effect will tell you which method it used so that you can know whether or not you need to switch it. Our options give us typical mostly flat scene and tripod pan. If you had your camera lock-down on a tripod, or if you were holding the camera by hand and not moving it forward or backward, side to side, or up and down, but just rotating it or even just holding it still, you could switch it to that. Mostly flat scene is what you would use if you were shooting, say, a wall and you didn't have a ton of depth in your scene. Typical is what you're probably going to be using most of the time. It's what after-effects used to solve this scene and it's when your camera isn't stationary and it has multiple surfaces and planes to track. Next is your average error. This is basically how you can tell how good your track is before you even put anything into the scene. If your average error is one pixel or less, you can pretty much know that you've got a solid track, and whatever you put in the scene is going to look like it's actually there. Now, my average error is pretty high, and I'm not a 100% convinced that this is going to give me the best track. Now, there are a couple of ways we can figure out if this is a good track and the simplest might be to just stick something in our scene, preview, and see how it looks. Another thing we could do is check this box right here that says detailed analysis. I'll go ahead and do that, and you'll see that our analyzing and background banner comes up again and up here in the effect, it tells us that it's initializing. What this is going to do is analyze our footage again, but basically do it more accurately. So it's going to take a little bit longer, but it's probably going to produce a better result. Now that's done and our average error is now 1.8 instead of 1.9. Honestly, that is still higher than what I was hoping for but let's go with it and see how bad it actually looks. Now my approach to using tracked footage is to find a surface that I want to place something on or near and generate a plane in that 3D space. That's exactly what these tracker points will let me do. For this shot, I want my robot to be right about here as the camera movement pushes in on him. What I need to do is select three or more of these track points to generate a plane for After Effects to give me position and orientation values, that I can then apply to anything that I want to put in the scene. Now this big red circle is a preview of what the plane's orientation would be if you selected the three points that are underneath your cursor at that point. If I zoom in here and move it down, you can see that clicking there, selected these three points and automatically triangulated them and then generated this plane based on those points. Now, to try to get a more definite plane, I could click on a point on this far corner, hold Shift and press on that corner and hold Shift again and click here. That actually looks like a pretty solid plain to me. It's centered right where I want to put the robot. I would trust that to be a little bit more accurate than when I just clicked on that small triangulated area between these couple of points. Since that looks pretty good to me, we can move forward. With your track point selected, you can right-click, and you have a whole list of things that you can generate based on this data. Now, if you're doing the class collaboration with my brother Aaron, and he created a 3D robot and Cinema 4D that you'll be rendering through Cineware in After Effects, the first thing you need to do is set ground plane and origin. What that will do is set this surface to be the ground plane and the origin of the scene when we go into Cinema 4D. That'll be very helpful and important for lining up our robot with our scene inside of After Effects. Now as far as I know, that's the only scenario you would ever need to set the ground plane in origin. If all you're doing is tracking things inside of After Effects, then you don't have to worry about this step. Since I'll be rendering through Cineware, I'm going to go ahead and select that first. Now this feature is only available in After Effects CC or higher. If you have a Creative Cloud subscription, you should have access to it. Then with those three points still selected, I'll right-click. Now we can look at some of these other options. The first is create text and a camera. That will just create a text layer right at the center of that red circle and give us a 3D generated camera that matches our physical camera when we actually shot the footage. Or we could create a solid layer in a camera and that will align the solid to this plane, and again center it right in the middle of this circle. Or if we don't want to a solid, we could create a null in a camera, which will then just give us a null oriented to that plane. This is the option that I start with most of the time because I don't need to generate a solid layer or a text layer, I just need the position and orientation values of that part of my scene. The third is to create a shadow catcher, camera, and a light. What that will do is create a solid plane that will only show you shadows that are being cast from other objects in your scene. This can be very helpful. Later on I'm going to show you how to use this feature. But for now, all I need is a null and a camera. These other settings, you really don't need to worry about right now. They're ones that I've never used. Let's just move on. All I need is the position and orientation values of this point for this scene, so I'm going to create a null and a camera. Right away you'll see in our composition that we have a 3D tracker camera and a track null. If I I on my track null, you see that it shows up right where that red circle was. If I zoom in near, you can see that it's oriented to that plane, which is great. That's exactly what I need. I'll zoom back out and then I'll look at our 3D camera. If I bring up all key-frames by pressing U on the keyboard, you can see that we have a position and orientation key-frame for every frame of this compositions duration. If you take a look at the null, you can see as I scrub through, that it sticks to that point of this platform. How can we quickly see whether or not this is a good track? Well, a lot of times just creating a text layer and sticking it right there is a pretty good option. I'm just going to type out text, I'm going to turn it into 3D and you see that it disappears. That's because it's outside of the camera's view and then I will parent it to this null while holding Shift. When I let go of the mouse, the text layer automatically snaps to that position and orientation of the null layer. You can see that the text layer is showing up right there flat on this surface. To get it to stand up, I'll switch to the rotation tool, go to the X axis control, hold down shift and click until it snaps up 90 degrees. Then I can rotate it a little bit this way so that it's facing the camera and then I'll preview. Just like that, it looks like my text is in my scene. Honestly, it doesn't look all too bad. There are a couple of frames where it slips and slides just a little bit. But overall that's actually a pretty good track. This is the basics for everything we'll be doing with the 3D camera tracker. If I stop this playback and click on my footage again, and then click on the 3D camera tracker effect, I could try selecting some points up on this platform. Right-click, create null and now I have a second track null. I'll rename it just so I can stay a little bit more organized. Then I'll duplicate this text layer, hold down shift and parent it to the new track null. Then rotate it on the x-axis so it snaps back up and maybe scale this one up a little bit. It looks a little bit off on the Z rotation, so I'll just rotate that a little bit. Preview that. Now I've got a second text layer that looks like it's up on this platform. I can do this process to any surface in my scene that has enough tracking data. For example, I could click on this point here, maybe this point up here and then this point here, right-click, create null, rename this again, duplicate the text layer, hold down shift and parent that layer. Maybe scale it up a bit. Change the orientation and preview. Now it looks like I have another text layer on a different plane in this scene. Being able to identify these planes and choosing the right tracking points for that plane, is how you can insert anything into your scene. Now this isn't going to work a 100 percent of the time. If I were to select three points here, that to me does not look like it's on the right plane at all. You might be able to fix that by choosing some more points to make it a little bit more accurate. But ultimately, it doesn't look like those points are going to give me accurate data. But let's see what happens if I try and do it anyway. I'll create another null, duplicate my text layer, shift parent it to that null. Obviously that's not the right orientation. But if I fake the orientation by hand and just get it to look the way that I want it to, it might work out just fine. Once I orient this to the surface of that platform, preview again, that actually looks pretty solid. Even if your track points aren't giving you the correct orientation, you can still use the track data to insert your graphics into the scene and then just make corrections by hand. Now, we don't always have to put these objects straight on top of surfaces. The great thing is, now that I have a 3D camera in my scene that goes along with the footage, I could pull this text out on the Z, move it over on the X a little, rotate it this way, maybe scale it up, raise it up on the Y. Maybe bring it a little bit closer this way. If I preview my animation now, it looks like that text is hovering above this lower platform. If you can track a surface and orient your graphics to that plane, then that gives you a solid starting point for placing an object in your scene. Then you you offset your objects in Z space to make them appear as if they're in different parts of the scene. You can see very quickly I was able to put all of these different layers in my scene and they produced pretty solid results. Now another thing I could do to sell this effect a little bit more is enable the emotion blur of my text layers, and then turn on the motion blur for the comp. Now when the camera shakes, it produces a little bit of motion blur on the text layers themselves. If I go to this frame right here and turn that motion blur on and off, you can see what it's doing. It's a very subtle effect. But I would want it to be subtle on this shot because I intentionally increase the shutter speed for this shot, so that motion blur wouldn't be as intense, hoping that it would give me a better track. Now if you need to adjust the amount of motion blur on your objects, just come to your composition settings, go to the Advanced tab and adjust your shutter angle. If I open this up to 180 degrees, you can see that the motion blur increased. If I turn this way down to 17, it's almost completely gone. I'm going to leave mine back at 90. That worked out great for this shot. Now that we've confirmed that we have a solid track, we can put whatever we want into this scene including 3D geometry. Just to give you a little bit of a visual of what this 3D camera tracker looks like, I'm going to switch from my active camera view to my custom view one and zoom out a little bit so you can see the camera. This is a 3D camera that After Effects generated. As I move, you can see that it's traveling in the same motion that I actually move the camera physically when I was recording. The orientation of the camera also matches the way that I was rotating the camera as I walked forward towards that playground. It's pretty amazing how quickly and accurately After Effects can do this type of shot. 5. Positioning A 3D Object Using C4D Lite: Now, that I have my track, I can put my robot in this scene. The point that's important to me is this first one that we set. I'm going to keep that and delete everything else out of my scene. To get this data into Cinema 4D, I need to go up to File, Export, Maxon Cinema 4D Exporter. I'm going to place that right on the desktop and name this temp-track-data. This is completely a temporary file that we're just going to pull data out of, so we're not going to be needing to keep it. I'll press save and then I'll bring the robot that I modeled in Aaron's class into my project. Go to File, Import File, and here's my Cinema 4D file. Press Open. Then I want to open this file by pressing Command or Control E. This will open up Cinema 4D light. Here's the robot that I modeled following my brother's class. Now, that we have Cinema 4D open, I can open the temporary track data that we just export it from After Effects. I'll come up to File Open, go to my desktop, and double-click on the temp-track-data file. In this scene, there isn't much to look at. If I look at the object manager and open up this null, you see that we have a 3D camera named 3D tracker camera, and it has the same tracked motion that we had inside of After Effects. If I switch out of that camera view and zoom out, sure enough, we have the same camera data. I can even play this back and you'll see that my camera moves just the way they did inside of After Effects. We also have our track null, which is positioned in oriented the same way that it was in After Effects. Now, if you remember, I told you it was important if you are using Cinema 4D to set the ground plane and origin. What that told Cinema 4D is exactly where the center of this scene in ground plane should be once we bring our data in. If we hadn't set the ground plane our camera and nulls orientation would have been completely off axis compared to our Cinema 4D scene. That would have made things much more complicated for lining up my robot with my scene. The two objects I need from this scene are the camera and the null. I'll select them and copy and go back to my robot file and then paste. Now, I have my 3D tracker camera and track null inside of my scene. If I look through this camera and hit play, nothing is happening. Now, why is this? Well, it's because in our other file, we started on frame 182 and ended on frame 271. But in our new file, we start in frame 0 and then on frame 272. You can see that once we get past that point, our camera movement starts happening. What we need to do is move the keyframes of our track camera to be at the beginning of this scene. I'll come up to the window timeline and find all my 3D camera tracker keyframes. Now, if this wasn't already over my key frames and you didn't see anything. Just press H on the keyboard and that will bring all the key frames into view. Then I'll zoom out on my timeline so that I can see frame 0. I'll select my key frames and then click and drag them back to frame 0. I'll press H again to zoom to that. I was a little bit off, so I'll just bring this back to frame 0. Now my camera movement starts right when it should. Now, since I don't have any tracking data past frame 90, I'm going to go ahead and set the end of my seen to be at frame 90. Close out of my timeline, come here and type in 90, press enter. Now, my scene goes from 0 to 90 and has all of my camera tracking data. What we're looking through in this highlighted section of our view-port is what we'll see inside of After Effects of our 3D geometry to get a better representation of the scale and position of a robot in our scene, I'll save this file and then jump back into After Effects and then pull my Cinema 4D file into my composition above my footage layer. Right away I can see my robot being rendered into my scene. Now, this automatically adds Cinaware layer onto your Cinema 4D file, which gives you a bunch of controls for how it renders inside of After Effects, I'm going to change the render from software to standard draft just so I can get rid of the grid and focus on the robot itself. Now, I can play this back right now to see how it looks in my scene. Obviously, because it's 3D geometry rendering through Cinema 4D, it's going to take much longer to preview than the simple text layers that we had before. From now on, I'm going to edit out these portions of the preview render so that you can just see the final result. Here we go. We can see the robot in our scene. It's tracked pretty solidly onto that surface and it looks like we're in pretty good shape. Now, I'm going to want to make the robot smaller so it's head doesn't get cut off at the top and then reorient it before I go into Cinema 4D and animate and liked him. But do you take a look at this foot right here, right about that point, you can see a little bit of sliding on that platform. Now, what might be causing this is that right now our project settings are set to Cinema 4D camera, which is using the animation from our Cinema 4D tracked camera that we got from After Effects. But the interpolation might be a little bit off with frame rate conversions between Cinema 4D and After Effects. Right now, my composition is set to 23.976 because that's how I shot my footage. But in Cinema 4D, unless you're rendering out of it, your project settings frame rate has to be a rounded number. The easiest way to fix this is to switch from Cinema 4D camera to Comp Camera. That way you're Cinema 4D file will honor whatever your scenes 3D camera is doing, and it'll interpellate each frame based on that animation rather than what's inside of Cinema 4D. Inside of Cinema 4D, I can use this 3D tracked camera data for positioning my robot. But this way inside of After Effects, we can still use the Comp Camera and the comps frame rate to render the robot. That just gave me a little bit more solid of a track for this composition. Now, if I come back into Cinema 4D and come to the last frame, you can that the head is getting cut off just like it is inside of After Effects. From this point, I could click on my robot, switch to the scale tool, and then scale it down. I can also rotate it so that it's facing the angle that I wanted inside of After Effects. I'll hit save, switched back to After Effects and it automatically updates. Now, as we want to pull them forward just a little bit. Let's switch back to Cinema 4D, pull them forward, save. Doing this back and forth from Cinema 4D to After Effects is what you'll have to do to position your own robot. I want to move them a little bit more to the left. I'll just shift them over, save, and that's more what I was thinking. Now, why did we include this track null inside of Cinema 4D? That is to give us a solid reference point in our scene that matches what we had inside of After Effects. That way I know if I paired my robot to that null and zero out the position, it's exactly centered on that track point. If I hit save and coming back to After Effects, you see that it's now centered directly over that null, because this nulls value is identical to the nulls value that we have inside of Cinema 4D relative to the 3D tracked camera. I'm going to undo that because I actually did want to move that robot forward a bit, but that's why we included the track null. Because your object might not line up exactly where you want it to right off the back like that. At this point, I could animate and light my robot inside of Cinema 4D and it'd be ready for exporting and compositing inside of After Effects, we're going to get to that step a little bit later. But as far as the tracking and positioning of the robot for this shot, we're done. 6. Setting the Ground Plane And Origin Precisely: Now the shot is perfectly fine the way it is, and the method I used for positioning the robot works just fine. But if you have decent enough tracking data, you can actually figure out to position a little bit more simply. Now this feature is only available in After Effects CC or higher. If you have a Creative Cloud subscription, you should have access to it. I'm going to make a duplicate of this comp, just so I don't mess that up. I'm going to delete our track null and 3D tracker camera, and I'm going to turn off the robot layer. Then I'll come into my 3D camera tracker and, again, figure out what three points would work well for this plane. It looks like these three points produce a pretty good plane. But what if the center of those three points isn't where I want the robot. Well, if I move my mouse over the center of the target, you see that I have this positioning icon pop up. If I click and drag, I can move that plane around. If I place this right where I want the robot to be standing, then I right-click and set ground plane and origin, my scene's origin is going to be directly in the center of that target. Now just to be safe, I'm going to go ahead and create a null and a camera as well, so I always have that reference point. Then again, I'll go to File, Export, Maxon Cinema 4D Exporter, and I can overwrite the temp track data that we have on the desktop. Then I'll go back in the Cinema 4D, pull my robot out of that track null, and get rid of that tracker camera and track null. Then I'll set the position of that robot back to zero and change the rotation. Then I'll open up my temp track data, grab the camera and the track null, copy, go back to my robot, paste, and then look through that camera. You'll notice that the 3D tracker camera is pointed right at my robot and the track null is directly underneath my robot. This is because we set the ground plane and origin. Right inside the center of that target that we set in After Effects, is now the center of our scene in Cinema 4D. Now all I have to do is reposition the robot to fit. You can save, turn my robot back on, and now he's positioned right where he was without me having to move him around. That just gives you an extra layer of control. Let's move on to one of the other shots. 7. Tracking A Zoom: The next shot I want to go over is this last one, because it has a zoom, which will make the track a little bit more difficult to solve, and I want to show you how you might be able to approach a shot like this. Once again, I'll pre-compose this layer and call it Shot 5. Make sure that move all attributes is checked and adjust composition to duration is also checked. Then I'll go into that composition and we can apply the 3D camera tracker effect. Since I know that this has a zoom while this is analyzing, I'm going to change my shot type from fixed angled view to variable zoom. All right, now that it's solved, let's take a look at our average error. It's 1.41 pixels, which is not that great. These track points are showing up extremely small, I can't even see them. Yeah, we're getting some really weird track points on this. I'm pretty sure, I can already assume, I'm going to need to do a detailed analysis. I'm going to set these back to a 100 and do a detailed analysis and see if that gets me a better result. The average error is now 1.33, which isn't awful. My target size is huge and some of these track points are much bigger than others, which is giving me a red flag that this track isn't going to be all that great either. If we go back to the beginning, you can see that all these different track points are completely different sizes. After Effects is thinking that these track points here are much closer to the camera than these track points, which isn't right at all. What can I do in a situation like this, where my track points are completely off and it doesn't seem to change anything when I do my detailed analysis? Well, let's think about how I shot the footage. Really, the camera's position didn't move at all. I just rotated, panned and zoomed out to reveal this entire scene. Right now, the method being used for solving this track is typical, but this is basically a tripod pan. If I switch this from auto detect to tripod pan, it'll re-solve are seen based on the track data and give us a different result. Now, you see we had this new message that says there's no depth from a tripod pan solve. The reason we're getting that message is because After Effects generates the 3D depth of your camera based on the physical positioning of your camera and the movement that you made while recording the video and since I basically told After Effects this was shot on a tripod, there was no camera movement. There's no information for After Effects to pull from to generate depths and instead it's just tracking any point that it can. Now if we look at the average error, it's 3.23 pixels, which is terrible. But if I scrub through here, it looks like the points are staying pretty locked on to what is in the scene. We might be able to get away with this. Now, I'm definitely not going to be able to set my ground plane in origin, but we might be able to make a reference by hand that we can use inside of Cinema 4D. Since I know that this platform is a 90-degree angle to this wall, if I can create a plane on this wall based on this tracking data that matches up visually, I should be able to recreate this platform on the ground fairly simply. I'm going to go right in the middle of this wall, right-click, and say create solid and camera. Then I'll select this solid, scale it up, and try to visually orient it to the back wall so that it lines up as best as I can. I'll pull this out so I can match up that edge. You need to lean forward just a little bit, get a little bit wider, and basically, I'm just trying to line up the perspective of both edges and to make this a little easier, maybe it'll turn the opacity down to 50. Now that looks pretty good. If I back up in time, we can see that it shifts a little bit off the edge of that wall. But for the most part that looks like it's pretty solidly on there. Now that I know what the angle is of that wall, I can duplicate this solid, switch to the pan behind tool by pressing Y on the keyboard, click and drag the anchor point and hold down Command or Control on a PC. The anchor point snaps to the bottom center of that layer. Then I can switch to the rotation tool by pressing W on the keyboard and rotate the solid on the x-axis while holding Shift so that it snaps to 90 degrees from that wall. Now, this plane should be pretty lined up with the platform that I want to put my robot on. I'll hide the wall layer. I'll rename this one ground plane and then I'm going to right-click on layer, go to transform, center anchor point in layer content, and that just snaps my anchor point back to the center of the layer. Now I can use this as a reference point once we go into Cinema 4D. I'll turn the opacity back up to 100. Then I can come up to file, export, Maxon Cinema 4D Exporter, and replace our temp-track-data file. Go to Save, replace. Then inside of Cinema 4D with my Randall 01 robot open, I will Save as, and change this to Randall 05, and press Save. Then I can get rid of my 3D tracker camera. I can unpair the robot from the track null and reset the robot back to the origin. Then I'll open up my track data from my desktop and here you can see the solid that we can generate it inside of After Effects for the ground plane. Always track solid that we hid, which we won't be needing. I'll select my tracker camera and my ground plane, copy them, go into my Randall 05, and paste. Then I'll look through that camera, extend my scene out, and open up my timeline again, press H to show all key frames and select them, zoom out a bit and bring them over to frame zero, press H to zoom to fit again, and back it up so it lines up just right, and then I can end this at frame 157. I'll trim this down to 157. Now, all that's left is moving the robot to the ground plane. I'll parent the robot to the ground plane and then zero out the position, change the scale down to one, and zero out the rotation as well. Now my robot is oriented to the surface of the plane, which obviously isn't the right orientation. I'll switch the rotation tool and rotate them up 90 degrees so he's standing on top of that plane and then I'll switch to the scale tool and scale him down so he fits into the scene. Now back up to frame one and reposition. I want to have him rotate this way and then back him up over here. Then I can unpair my robot from the ground plane so I can move around independently of the plane and I want to make sure that my ground plane is set to not render. If I preview render this, you see that the ground plane is not showing up, which is what I need. If I save this and go back to After Effects and import my Cinema 4D file. I can bring it down into the composition over top of the footage, turn off my ground plane, change my render from software to standard, change my camera from Cinema 4D to comp camera, and then preview. Now, I get a preview of my robot tract into the scene and it looks like it turned out to be a pretty good track. Now that I know that my track is reliable, I can move forward with positioning in animating my robot for this shot. 8. Dealing With A Trickier Track: Next, I want to show you how I handled this first shot, since it starts with the robot being covered up and then being revealed. I'll pre-compose this layer, go into the composition and add the 3D Camera Tracker and I'll go ahead and let that analyze and we'll see what kind of track we come up with. All right, let's take a look at our average error. It's 1.27. Again, not terrible, but not where I'd like it. It used the typical solve method, which is probably the best bet for this shot. Let's just take a look at some of these points. Not really concerned with what's in the background here, because I want my robot to show up right about here. So really, I want to take points that are aligned to this surface and then bring it out to the side a little bit so that the robot is in line with this plane on the platform. I'm not sure that these track points are going give me the data that I need. It looks like After Effects is thinking this part is much closer to the camera than this part, which is completely backwards. Let's scrub through this a little bit. I think that's what it's going to show us. Now I've already done this shot successfully, so I know what's going on. But it gave me a unique problem that I have never seen before. So I want to go ahead and show you what happened. I'm going to create a camera by clicking on the "Create Camera" button. Take note that my original camera move was moving from the left to the right through the entire shot. But if we come out to our custom view so we can see our camera that after effects just generated, and I come back behind where the camera is and move forward, you see that it's actually moving from the right to the left. Now, why in the world is it doing that? Switch back to my active camera. It's because if you look at the background, you see this parallax that's happening between the foreground and the background. After Effects is seeing the movement of the background and saying, the camera was moving from the right to the left, because the background is moving from the left to the right. If you look at this bright area, that's exactly what's happening. It's moving from left to right. Starting over here, the same thing, it's looking at that furthest back plane and saying the camera moved from the right all the way to the left. But really, my camera was moving from the left to the right while rotating to reveal what was behind that post. So what I ended up doing was masking out everything that was in the background from this shot. So just the foreground elements were showing when the tracker was analyzing the footage. If I go to my comps, I'll show you what that looked like. I just had to separate masks and they were set to subtract to get rid of those bright areas of the image that were in the background. So I'll put that masked off preComp inside of this comp and make sure that the masks are set to subtract. Then I'll apply the 3D Camera Tracker to that shot and turn off my other layer. I'll let this analyze and we'll see what we get. All right, let's take a look at the average error. It's below one pixel, so that's a great sign. Take a look at our track points and it looks like we've got some pretty solid data right here on the surface that's important. I'll select a handful of these track points then right-click and create a null and camera. Go into the preComp and disable these two masks. Now that I have my null and my camera, I can get rid of my original footage and go up to file, export, Cinema 4D Exporter and replace this temp-track-data one more time and go into Cinema 4D. I will save this from Randall-02 to Randall-03, save, then I can get rid of the tracker camera, the track null, and reset my robot to be 0, 0, 0. Then I will open up the temp-track-data that we have on the desktop. Bring the 3D tracker camera and the track null out of that parent null, copy, and go to my Randall-03, paste, look through that camera. Once again, our robot is not lined up where we need it to. So we will parent the robot to that track null, zero at the position, zero at the rotation, and he is super tiny. So let's change scale to maybe 10, 10, 10, and that's better. But remember this shot is actually up close, so we're barely going to see anything but his head. So let me rotate him, so he's facing the camera and I push him down, I'm going to scale him way up. That's a little bit better, but I'm going to move him down, scale him up. Move him down some more. All right, let's see what that looks like inside of After Effects. I'll import my Randall-03 Cinema 4D file. Bring him into the timeline above the footage. Change the Randall from Software to Standard, change Cinema 4D camera to a Comp Camera. Then we can preview this to see what kind of a track we got. You can see right away that the data upfront is not working well at all. That's not surprising to me because this big pillar in the foreground of the shot is blocking a lot of the data that it needs to track well, so we're probably going to have to modify our camera's animation just a little bit by hand until it gets to a solid tracking point. But right about here, it looks like it's pretty solid. The position is just a little bit off. So we'll have to deal with that. Let's just preview that portion. Yes, obviously, you can see at the beginning that the track-data is completely off because of that pillar that's just moving in front of all the important stuff that we were using to place our robot. To fix this, I will stop the playback. First of all, let's just move the robot over to the side since he's too far to the left. So we'll go to frame 70 instead of Cinema 4D and then I can move him over to be about where I want him in the shot. Save it, see what it looks like, and I think he can move even a little bit further because I'm going to be animating his hand coming up and waving. So I'll save that. That looks like good positioning the me. Now let's deal with this Camera Tracker. 9. Fixing a Track By Hand & Basic Rotoscoping: So to make things go quicker, I'm actually going to make a new solid. I'll make it a bright color so it's easy to see, turn it into 3D, and then shift parented to that track null, and then bring it out to about where my robot is, and rotate it towards the screen. This way, I can have a very quickly rendered 2D object to see how good or bad my track is behaving. The part I'm concerned with is right up front. So until about one second, the camera track is completely off. You can see that that solid layer just moves all over the place. We might be able to get away with right there being the cutoff point. If I select my 3D camera and press "U" to bring up all the key frames, I know that everything before these key frames are complete garbage. So I'm just going to select all of those key frames before that point in time and hit "Delete". Now from that point backwards, my camera doesn't have any animation, so it won't line up with the scene at all. If I go into the position and open up the graph editor, then we can take a look at what the camera's movement is doing in all three axes. Since this camera movement is pretty fluid, I can attempt to line it up by hand. Basically, I'm going to try and match the values of each axis, trying to guess how far they moved in time. I'll back up to the first frame and then I'll click and drag on the x position to move it backwards. You can see as I'm sliding this value, my value graph is updating to show a curve. My goal is to line this angle up with the motion following it. I'll just keep backing it up until it's about matching that same curve. Now if I scrub through this, you can see that the camera movement matches up a little bit better. But as soon as it hits those key frames, the motion changes a bit. It looks like the camera is not only moving side to side but also up and down just a little bit. I'm going to adjust the y position to be up just a little bit and see if that helps. Now it doesn't look perfect by any means, but it's definitely better than what After Effects gave me originally. Now the other value that's animated is the orientation. But as you can see, the values change very little, and it's mostly just because of camera shake. Now you could try animating these as well, but honestly, I think it's more work than it's worth, and you can probably get away with just adjusting the position values. I'm going to pull back on the z just a little bit too to see if that helps at all. Honestly, it's not that bad. If you think about it, the robot is probably not going to start appearing until right about here, when that pole moves far enough out of the way so that we can see the robot. Really, it's only from this point on that we're worried about that track. I think that the track is enough there that we can get away with it. Let's turn off this solid, turn on our robot layer one more time and then play this back. Obviously, it is much more smooth at the front end than it is through the rest of the track. You can definitely finesse this a little bit more to make it look more realistic. But I think I'm going to be able to get away with the way it is. So I'm going to move on. The next thing I need to do is mask off this pillar so that the robot appears behind it as it's revealing him. To do that, I'll make a new solid, I'll make it white, rename it matte, and then I just want to draw a quick mask around it and line it up with that pole. I can turn off the robot for this part. I'll just match up the angle of that edge of the pole and make sure the rest of the frame is white, and then I'll set a key frame by pressing "Option M" or "Alt M" on a PC, then I'll back up to the first frame and move that mask over to where that pole meets the edge of the screen, and then just match through camera movement by hand so that the mask sticks to that pole as it moves across the screen. Fortunately, the speed was pretty constant so this is not a very hard shot to mask off. Once it gets to about here, it doesn't really matter anymore because all the robot is going to be seen. But just for good measure, I'm going to go to the last frame that the pole is on screen for and move the mask to that point. It looks like right there is where the pole is completely off screen. I'll just line up my mask like that, go forward a few more frames, and then move my mask completely off the screen. Let's see if that lines up and not quite. So I'll make some adjustments. Not terrible. Now that I have that, I'll move my matte directly above my robot layer and then change the robot layer to alpha inverted matte. The only thing that shows is whatever was outside of the alpha of the layer we just masked off. Then I can open up the feathering of the mask by pressing "F" on the keyboard and increasing it. You can see that makes the edge softer or harder. Since the edge of that pole is a little bit out of focus, I need to feather that out just a little bit. Then I can tap the "MM" to bring up the mask properties, then I'll turn off the mask visibility and adjust the mask expansion to line it up with the edge of that pole. We can preview this. All right, now that matte looks pretty good. It looks like up front there was something funky going on right in here. Yeah, so I will adjust that path. This is just what you got to do to make things work. Sometimes there's no quick fix. You just got to get your hands dirty, do some rotoscoping and make it look exactly the way that you want. All right, let's preview that. I think the mask is looking all right. Now it's just that movement at that front end. He looks a little bit floaty, like he's coming down at the wrong angle. So what I need to do is have the camera start higher. It looks like I deleted my solid so I'm going to make another one real quick. Make it a bright color, turn on 3D parent to that track null, change the orientation and line it up with his head one more time, and turn off the robot so we can take a look. That movement is coming down. You can see that the solid is way higher above this platform at the front end than it is when the key frames kick in right there. So really I want to match the level of that with the platform all the way back to the beginning. Since I can't see that platform here, I'm just going to cheat a little bit by bringing that key frame forward, then I'm going to adjust the y position so that it's way further down, and see if that helps at all. Let's take a look. That might be better. It looks like it jumps up a little bit. So I'm going to move it just back up a little bit. I think that might be a better track. Let's take a look at what that looks like with the robot. Yeah, I think that looks a lot better. Now if I wanted, I could go in here and mess with the position to make it much more jittery to match the camera shakiness. But I think honestly this is going to be just fine for what I need. So that's how I dealt with a little bit more complicated of a shot that was producing some unique problems. Hopefully you won't have to deal with anything this complicated. But now you can see my workflow of how to deal with those kinds of problems. 10. Positioning A Pre-Animated 3D Object: There's one more important thing that I need to go over. If you made your robot in Aaron's class like I did, then you probably already have him animated before you are ready to track him into the scene. How can I reposition my robot while preserving the animation that I've already done? Well, it's pretty straightforward, but you just have to make sure you do everything in the right order. If you just follow along step-by-step, you shouldn't run into any trouble. In my scene, I have my shadow catcher, a Track Null and a 3D track camera. But my 3D track camera is nowhere near the origin of my scene. I also have my animated robot, which have lots of different keyframes and that's all parented to a null, which moves just on the Z-axis from point A to point B and that's how I animated my robot walking. I need to get my robot positioned and oriented to my Track Null while preserving this animation. To stay organized, the first thing I'm going to do is rename this Null to Walk Null. Then I'll collapse that because I don't need to see anything inside of it. Now something I need to point out before we do anything else, is that my robot starts at a position value of zero and the rotation is zero. That's very important. Make sure that your robot is starting at the origin of the scene. Now I want to parent this to a new null in the same position and I can quickly do that by pressing Option or Alt on a PC plus G and that automatically parented what I had selected into a new null and that null's position is based on the position of what you had selected. So it's in the exact same spot, zero, zero, zero with no rotation value. I'm going to rename this Position Null. Next, I'm going to parent this null to my Track Null and now you see that the position and rotation values have changed. That's because their relative to the position of the Track Null. So if I switch back to my 3D tracker camera and click on my Track Null, you can see where that is and how it's oriented to the surface of the shadow catcher. Now if I go to my Position Null and I zero out the position, and I zero out my rotation values, my robot is now positioned and oriented to that Track Null, which is the same as the shadow catcher that's the reference we're using as the ground plane in our track shot in After Effects. If I hit play, you see that my animation was preserved in that nested null, even though the position and orientation has changed. So now that the robot is positioned right, I can unparent it from the Track Null and my animation is still preserved and then I can use the Position Null to move my robot wherever I need, scale it down, add some rotation, and my animation is still preserved. So that's how you can deal with repositioning an object that's already been animated. 11. Simpler Tracking & Casting Shadows: So I've shown you a whole bunch of different issues that you can run into when you're doing 3D camera tracking. But honestly, a lot of those issues came up because I was shooting such a specific type of shot with shallow depth of field, they were all pretty close up shots, and seen wasn't very simple. So After Effects had a lot of trouble identifying a bunch of different things. Now for that sequence, I specifically needed those types of shots, but a lot of times the footage that you'll be tracking things into will be much more open and in those cases the tracking might go much smoother. Do give you an example of a simpler scene to track. I took some footage of this alley on my long board using an iPhone. The camera isn't perfectly smooth, but it's decent considering it's handheld. Moving through this alley, coming into little parking lot and doing this move, and then I jump off along board, so that part we won't use. But because this scene is very simple, we have a very open ground plane, a nice wall to track here, another wall on the other side and we have this wall of this building along with the parking lot. There's plenty of pretty flat plains for After Effects to track. So let's see what we can do with this inside of After Effects. I've got my footage inside of a comp, and I want to go to the point right after I push off on the long board, right where it gets to be a little bit smoother, so probably right about there. So set my work area in by pressing ''B'' on the keyboard and then I'll go out just before I jump off the long board right there. So we'll say probably right there press ''N'' to set my outward area point. Then I'll right-click and say trim comp to work area and that automatically trims my layer to that work area as well as the composition. Let's go ahead and apply the 3D camera tracker. Now, fixed angle of view is fine for this one because there is no zoom, so I'll just let that analyze. This is a 16-second clip, so it's going to take much longer to analyze than the other shots, which were only about five seconds each. But as you can see, it's still is pretty fast. The solve is done. Let's take a look at our average area, 1.39, not the greatest, but let's just try and put something in the scene and see how good or bad it looks. I'm going to put some text in this parking lot, so these checkpoints are looking pretty good. You can see that pretty much anywhere I put my mouse, the target is oriented to the surface of the pavement. I'll right-click, and again, if I was going to put something in the scene through Cineware, I would set ground plane and origin, but I'm not going to leave After Effects for this shot, so I don't need to worry about that. This time I'm going to say create Shadow Catcher, Camera and Light because I'm going to show you how easy the 3D camera tracker makes it to cast pretty realistic shadows into your scene. Here's my shadow catcher and I'm just going to rotate it, so it matches this wall a little bit more. Scale it up. That looks pretty good. Then if I backup, you can see that sticks to that point and that's a good sign that we have a pretty solid track. Next, I'm going to type out some text. I'll make it 3D and shift parented to the shadow catcher. Then I'll change the orientation and scale it way down. The reason we're not seeing it's solid color right now is because we have a light in the scene, but I'm just going to shut that off for now, so we can just focus on positioning our text. I want this to look like it's raised up off the ground, so I'll move it up on the Y, and then I'll pull it forward just a little bit. Now, let's just take a look at the path that it takes throughout the footage. Now, it's angled downwards a little, which is probably accurate to what that planes angle actually is. But I want it to be a little bit straighter to the camera. So adjust the orientation and let's just preview this. Upfront this building, obviously, crossed in front of it and so do this sign. But as far as the track goes, that text looks like it's there. It's following the camera movements exactly right all the way up to where the camera passes it right at the end. Now I could create a mat and wrote a scope that out a little bit, but instead I'm just going to shrink the text down a little, and move it to the right side of that sign, so I don't even have to worry about it. Now as we come up to there, the camera moves by it and the positioning is actually pretty good. How can we blend this into the scene a little bit more? Well, one thing we could do is have it cast shadows to match the shadows in our scene, and this speed limit sign is a perfect reference for our shadows. So I'll turn on this light and I'm going to move it to where the text is by holding shift and parenting it to that text layer. Then I'll unparent it because I don't want the text to effect the decision. Then I'll open up the text material options and turn cast shadows on, and then I'll move my light up and back. As I do that, you can see that a shadow is now being cast on the ground. If I move it over to the right, I can match the angle a little bit better. Back a little bit more maybe. I think I'm going to have to scale my shadow catcher up. You can see as I did, that it's affecting my text and that's because I forgot my text is parented to the shadow catcher. So on parent the text and then scale on my shadow catcher, just make it really big. Because the shadows in the scene are being produced from the sun, a point light probably isn't the best option for producing this shadow. Now I could push it really far up, far back and try and get it to work, but the shadows are pretty crisp. I could just switch this light from being a point light to being a parallel light, then the position doesn't matter. Only the direction it's pointing does. So if I bring up the point of interest by pressing ''A'' and I hold Shift and press ''P'' to bring up the position. I'll copy the position value and paste it at the point of interest. Then I'll push the position back in Z space a little bit, and then move it up in Y space, and you see that brings our shadow back. Then I'll push it over to the left a little bit, so that the shadow is offset down into the right, just like the shadow of the sign. If I want it to be even more accurate, what I could do is just make a shape layer really quick. The kind of looks like the sign. Turn it 3D. Go back to my 3D camera tracker and select the track points that are on that sign. Right-click, create null, and I'll rename this sign null. Then I can shift parent the sign layer to that null object. Reposition it so that it matches up a little bit better and really what I'm concerned with is that the height matches. So I'll extend this down. That looks pretty good, and I'll just adjust the orientation a little bit. Now it can shift this over on the x-axis, enable the shadows under the material options, and then make sure that my shadow catcher is big enough to see those shadows. Now, I can adjust my light position to match this artificial shadow to the actual shadow on my scene. That looks pretty good. It's roughly at the same angle of this shadow. Now I can adjust my lights options to make the shadow look more like the actual shadows in the scene. First, I'll lower the darkness until it matches about the same darkness as what's there. Now, I can turn off my reference later and know that the shadows in my entire scene will match up properly to that shadow because the parallel light cast lights and shadows uniformly across the entire scene. But my text is pure black. To fix that, we need to add an ambient light. I'll go to layer, new light, change it to ambient, press ''Okay'' and then turn the intensity down from a 100 percent to maybe right around there. Now we can preview this. Now the text is casting a shadow in our scene. That's just one way you can add a little bit more realism to your scene. Now, I can do more than just add text floating in my scene there. I could have grabbed points right here, say create another text layer, scale it down. Now that text looks like it's on the wall. But it doesn't have to just be text. You can put a pre-comp animation there, an image of video, whatever you want. Once you have your 3D camera generated, anything that responds to 3D cameras inside of After Effects will respect what you have for your scene. So even if I were to create something using particular, you can see that's being generated at the center of my scene and respecting the 3D camera movement. If I move my emitter around in Z space, I can reposition where this is coming from in my scene and it sticks to that point throughout the entire camera move. This just goes to show that it doesn't really matter what camera you're using, as long as the scene that you're shooting has great reference points, and what you tracking your scene is completely up to you. Hopefully, these examples have given you a good overview of what you could actually do with your footage. 12. Rendering Through Cineware: Let's go back to this shot. I've gone ahead and animated my robot after following Aaron's class. Now, this is really my first time ever creating or animating something in, inside of Cinema 4D. I'm not at all going to attempt to teach you how I made this, but I learned everything from Aaron's class. So if you're interested in learning how to do this type of animation, go take his class. Here, I have my robot tracked and animated. If I open up the cinema 40 file, you'll also see that I had some lighting. What I did was just made a big area light above him, gave it some warmer color to try, and match the scene a little bit better. Then I added an ambient light that just brightened up the shadows a little bit. I also went into my Render Settings, and I turned on Ambient Occlusion, and boosted it a little bit, and I turned my Anti-Aliasing to Best. If I render one frame, you see that the tones are a little bit warmer, everything looks a little bit more crisp and we get these nice shadows produced from our ambient occlusion. Now, all of that adds render time but once you've got your track and your animation locked, you want to enable these things to make your renders look better before you go to actually export them. Back in after effects, if I switch my quality from Standard (Draft) to Standard (Final), and we sit here, you can see how long it'll take to render a single frame at half resolution. There you go. It took a really long time to preview a single frame. At this stage, I want to be able to work really quickly to adjust the color and do some overall compositing to make him look more like he's in that scene. Before I go any further, I want to export this Cinema 4D file, so that it doesn't have to process every frame every time I make a change to it. To do that, I'm going to solo the layer and if I enable my transparency grid, you can see that that's preserving the opacity. Then I'm going to go to Composition, Add to Render Queue and change my Output Module to TIFF Sequence with Alpha. Now, this is going to export every single frame as a TIFF file, which is a really big file format. I think each frame was around eight megabytes, but that's going to preserve the transparency. In this way, if your computer crashes in the middle of a render, you won't lose everything that's already been exported out. I've actually already done this and there's no way around this, but rendering stuff out of Cinema 4D or any 3D software at any decent quality is going to take awhile. For all of my shots, each frame took around 50 seconds to export, and almost every shot had about 90 frames, so 50 seconds times 90 frames is about 75 minutes. It took an hour and 15 minutes on average to export each shot. This is why I prefer to export an image sequence. Since the renders can take so long, you don't want to lose all of the time that you've already spent and have it crashed 90 percent of the way through. I'm going to come back into this composition, hide this Cinema 4D file and go to Import, File, go to my Renders folder, Shot_03, and choose the first frame. Then I want to come down here and make sure that TIFF sequence is checked. Then I'll click "Open" and for the alpha channel, I'm going to hit "Guess" and then after effects will automatically change it to Premultiplied, which is how I exported it. Press "Okay" and now I have an image sequence. But, if you look up here, it's saying it's 30 frames per second. I need to right click on it, go to Interpret Footage, Main, and change it from 30 frames per second to 23.976. Then I'll press "Okay". Now, it's interpreted correctly. I can bring that shot into my composition and line it up with the cinema 40 file. Now, it's in my scene rendered out nicely with ambient occlusion, the lighting, and it previews a whole lot quicker. That's looking great. 13. Coloring & Compositing: The first thing I want to do is actually make the whole thing a little bit warmer. So I'm going to add a curves to that layer. I'm going to switch to red. I'm just going to boost that up a little bit, switch to blue. Pull out some of the blue, maybe just in the highlights, and also in the mid-downs, and already that temperature just matches a little bit more of my scene. Then I'll switch back to RGB, and maybe brighten the whole thing a little bit, add a little bit of contrast, bring up the mids. Now I think I can make it a little bit warmer actually. So I'll do that, pull out some more blue. That's looking pretty good tone wise. Now to make it look like he's not just floating there, I'm going to make a fake shadow. So I'm going to make a black solid, enable 3D, shift to parent it to the track null, and reorient it to the way that he's facing and maybe scale it down a little bit. Then I'm going to draw a mask right in the middle, bring this below the TIFF sequence, feather this out, and then adjust my mask to fit his feet just a little bit better, and then turn the transparency way down, hide my overlays until that looks about right. Maybe adjust my mask path a little bit more. That's probably pretty good. Now I have a shadow underneath his feet. It just looks a little bit more like he's actually there. Next thing I want to do is add motion blur because that is not something we enabled when we rendered out of Cinema 4D. But there's a really easy way to add artificial motion blur inside of after effects. I'm going to come over to my Effects and Presets and type in pixel motion blur. If I apply this to my TIFF sequence, I first of all want to make sure that it's in the top of my effects stack or else it will negate everything above it. Now if I zoom in here, you can see that now the motion of my robot has motion blur applied. This is a really cool effect that will analyze the footage that you apply it to and take a look at how much motion is in between each frame and then artificially apply motion blur to it, and it's extremely fast for what it does. Now this amount of motion blur might be a little bit too much. So I'm going to change the shadow angle from 180 down to 90. You can see that made the motion blur just a little bit less. Now we can preview this. So now we've got some motion blur from the camera movement as well as the movement of the animation. We've got our shadow on the ground, and our tones are warmed up to match the scene a little bit better. I think overall, he's a little bit dark. I can go ahead and just increase the brightness a little bit overall. I think that looks a little bit better, matches the scene more. I'd say that shot's in pretty good shape. Now we will just move on to my other shots and do the same process, matching the lighting, adding shadows where I need to, and definitely adding that pixel motion blur. Now let's take a look at an example that has a more complicated shadow. On my last shot, I've already composited my robot into the shot. But he doesn't really look like he's there because there's no shadows underneath him. Now I could fake the shadows and animate a mask by hand, but that could take awhile. Since we have the ability to cast shadows inside of Cinema 4D more realistically, I'm going to go ahead and do that. If I jump back into Cinema 4D, I made a duplicate of my Randall 5 shot and named it Randall_05_Shadows. If I open that up, you can see that I have my robot animating a walk across this plane. Now the plane is there as a shadow catcher. But if I stop this animation and render a single frame, you'll see that my robot isn't rendering, and I did that very intentionally. What I want from this file is just the shadows on a pure white background. To do this, I added a compositing tag to my robot by right-clicking on the Null, going to Cinema 4D tags and then clicking on Compositing. Then under the compositing settings, I made sure cast shadows were turned on, receive shadows was turned off and seen by camera was turned off. That way, we'll only cast shadows into my seen. Then I brought that Cinema 4D file into After Effects. Then I came into the Cinema 4D effects, and then under the CINEWARE options, I checked the box that say Cinema 4D Multi-Pass. Then I clicked on "Set Multi-Pass" and changed it to shadow, pressed "Okay". Now that file is only displaying the shadows of that Cinema 4D seen. So I soloed that layer, export it as an image sequence. Since this one didn't have Alpha, I just used a JPEG sequence. Then I brought it back into After Effects. Then I interpreted the footage to make sure the frame rate matched up with the source. I brought that into my composition. Turned off the original Cinema 4D file. Lined this up with where it needed to be. Changed the blending mode to multiply, and now I have a shadow that goes with him throughout the entire seen. So that's how you can produce shadows from Cinema 4D inside of After Effects. 14. Thanks!: Congratulations, you just completed the course. I know that this was a really big topic and there was a whole lot to take in, but hopefully now you have a much better understanding of how 3D camera tracking works. If you have any questions or you're running into any trouble of any kind, please post a question to the ''Ask me anything thread'' in the discussions page. I'm here to help work through any issues you run into. If you like this course, I would love it if you left me a review, let me know what you thought, and you can follow me on social media @jakeinmotion. Be sure to tag me in any post that you make online. Thanks again and I'll see you next time.