CameraTracker overview

Nuke's 3D Camera Tracker is a powerful tool that allows you to do 3D matchmoveshots with live-action clips.It reconstructs the original live-action camera move and generates a pointcloud, 3D reference points located in the scene.You can then use that information to add 3D objects to the original scene.First, let's get an overview of the CameraTracker workflow.We'll start by getting a clip, so type R on the keyboard for Read node, selectthe Project Media folder.

Go to the Lesson_04_Media and select the camera tracking clip.And we'll open that and hook it up to the Viewer.Let's get a little more screen space here and I am going to type H on thekeyboard to fit to the viewer.Now this is an idealized training clip that I created to have a successful andhappy CameraTracking experience.Using the real live-action clip will introduce problems and difficulties andmake the process a lot harder to learn. We'll stop this.

Now let's add the CameraTracker node, up to the 3D tab, select theCameraTracker node.Now the Camera Tracking process moves in three distinct steps.First is the Track Features.The program throws a whole bunch of 2D trackers on the screen and uses thoseto track 2D locations.Second, the Solve Camera step, this takes the 2D track information collectedand then computes or reverse engineers, if you will, the live-action cameras location.

Three, Create Scene, this builds the point cloud and puts the 3D camera in sothat you can now line up your 3D objects.So let's start by tracking our features.And it doesn't matter where the playhead is, because when you click TrackFeatures, it jumps to the first frame in the clip.I am going to move the Progress bar down here so I can show you, I am going tolower the Gain just little bit,here are the 2D point trackers.The algorithm just throws a whole bunch of them all over the screen and they'reused to track 2D targets in the scene, which becomes data for the Camera Solve.

And it's now tracking backward because the Nuke CameraTracker is a two-pass tracker.We are all done now and notice that we have orange colored points.Let's push in and take a look at one.As I scrub through the Timeline, you can see that it's showing you the path of that track.And the shorter the path, the slower it's moving and it also shows you the angleor the kind of motion, it's got a circular motion here, whereas these points uphere are more straight.

Also, if you put your cursor on a point, it gives you the length of that track.That says that this point was actually tracked for a full 100 frames, this beinga 100 frame clip, it did a fine job.Okay, I'm going to re-home the viewer with the H key and take a look at our nextstep, the Camera Solve.All we have to do is click the Solve Camera button and the CameraTrackeranalyzes all of those 2D tracking points to compute the camera's position.After the Camera Solve, the points have been colorized to sort them intodifferent categories.

The green points are high quality or very reliable points, the red points areunreliable, and sometimes you'll see some yellow which are questionable.Notice as I zoom in to the same point, we now have some additional information.I put my cursor on that point.There is our original track length of 100, but now there is an Error of 0.74.Now watch what happens when I move the playhead one frame, and now the Error is1.08, and another frame, Error is 1.07.

So that error number is showing you the tracking error for that point on this one frame.The next line, the RMS Error, is kind of an average of the tracking error overthe whole length of the clip.And the third one, the Max Error is simply the largest error that itencounters during tracking.Okay, so let's re-home the viewer with an H and now go to step three, create the scene.Before I do that I want to move my Viewer node over here, because it tends tocreate a bunch of nodes and clobbers my viewer.So let's click Create Scene.

And now here's our new nodes, it's added the CameraTrackerPointCloud node, hereis my camera, and of course the scene node just to tie it altogether.So let's switch to the 3D view, see what we got.Switch to 3D, zoom out a little bit;there is my point cloud, now if I play the clip, there is my Camera Solve.This is a 3D camera that duplicates the motion of the originallive-action camera.Now personally I like to adjust the camera's uniform scale way down, so itdoesn't have a silly huge camera in the shot.

Now let's take a look at our point cloud through the camera's viewfinder.Don't forget to turn on the Lock View button.So we can see the point cloud is now moving based on our moving camera, and yesthat does look like our scene. We can see the wall over here with Marcy, thereis our picture window and the little wooden box in the front, and these pointsout here are the points outside the window of the far mountains.Now we can do a confirmation of how good our camera solve and point cloud is bysimply compositing the moving point cloud over the original clip.

Here is how we do that.Let's hook up the original Read node to input two of the viewer.Then, we'll set the viewer wipe controls to over, and we want the CameraTrackerover the Read node and then switch the viewer to 3D.So you see, the CameraTracker, which is the point cloud, is over the Read nodewhich is our background play.Move the wipe control off to the side so you can see the whole thing and youmight want to adjust the viewer gain control for best visibility.

Now we can play the clip and confirm that the points seem to be locking to the scene.Of course, the points that represent the far distant mountains are cruising wayin the background there and may look kind of funny.But all the points that are in the room appear to be locked to their targets,which is what we want.Now, this 3D grid can get in your way.If you want to get rid of it, click in the viewer, type S on the keyboard toget your viewer setup, select the 3D tab, and turn off the grid right here with this button.

And now you can watch your confirmation without any interference from the grid.When you are all done, don't forget to turn the 3D grid back on, there you go.Now that we have the big picture of how the CameraTracker works, let's back upand take a closer look at each step of the process.

Resume Transcript Auto-Scroll

Author

Released

4/6/2012

This course reviews the Nuke 6.3 tools and performance enhancements that make keying, motion tracking, color correction, and 3D compositing in Nuke more powerful than ever. Author Steve Wright covers the introduction of 3D particles, the enhanced spline and grid warping, the all-new planar tracker, an audio scratch track for matching audio cues to effects, and a briefing on deep compositing, the powerful new method of working with deep images.

Nuke 6.3 New Features was created and produced by Steve Wright. We are honored to host his material in the lynda.com library.