With the tracking done and the camera solved with a very small solve error, we are ready to create the 3D scene. This is where the calculations for the camera and the 3D points will be turned into 3D geometry. Before we begin, there is a very important thing we have to check; that the project size matches our clip. So cursor in the node graph, type S on the keyboard to get our Project Settings tab, double-check that the full-size format matches our clip.
If they don't match, then all your camera renders are going to be the wrong size and nothing will line up. Okay, we are done with that. We close the Project Settings and open up the CameraTracker Property panel. I am going to setup the viewer, so we got a little more screen space to work with here and re-home the node graph. Okay, we are ready to create the scene, so we just click Create Scene. Nuke adds a few more nodes, we've seen these before. Here is the point cloud node, here is the 3D camera, and a little scene node to kind of pull it altogether.
To see the camera and the point clouds, we'll switch the viewer to 3D, pullout, look around, now as I said before, I'd like to have my camera a little more reasonable size for the scene. Okay, I am going to set the playhead for ping-pong and play. Okay that looks reasonable and we can look through the camera viewer here and check to see that the point cloud seems to be moving reasonably, everything seems to be in order, I'll stop this.
And again, we can confirm that our camera and our point cloud are moving correctly by compositing it over the original clip using the viewer wipe controls up here. To do that, we need to connect the viewer to the original Read node, so I'll type a 2 here, we'll switch back to the 3D view, set the viewer wipe controls for over, and we want to have the CameraTracker over the Read node. Switch your viewer back to 3D, there we go.
So I'll move the viewer wipe control over here and again, you can turn viewer gain down a bit in order to see your point clouds better and then we'll play that. And go yes, it looks like our points are tracking very nicely with the clip. Notice that the points have taken on the color of the object that they are in front of. So the points here on the floor are brown, the points on the box are dark brown, these over here are gray and then we have some white ones here on Marcy's hair.
So by texture mapping the color of the clip onto the 3D points, it helps you to align things up in 3D. Okay, we'll stop this and turn off the viewer wipe. Turn off the camera viewport lock and go back to the default view to look at the scene orientation. Now if I orbit around here and get right down on the ground plane of the 3D axis, you can see that my world is tilted.
That's because the planar tracker doesn't really know where the ground is or where the sky is or anything like that. It's all 3D points relative to a 3D camera. So there are two ways we can setup the scene orientation at alignment. First, on the CameraTracker Property panel, let's double-click on the CameraTracker to put it at the top of the Property Bin. The Scene tab, the Scene tab we can change the scale or the rotation or the translation of our scene.
Okay, I am going to undo that. The second way is to use an automatic procedure, which I personally prefer. So let's take a look at that. First, we have to set our viewer to 2D. The idea here is we are going to select at least three points to define the ground plane and then we'll tell the CameraTracker, this is the ground plane and it'll orient the point cloud and the camera for us perfectly. So, first we scrub through the shot looking for a good view of your points.
So we'll take this one, Shift this one, Shift those, Shift these. The rule is at least three points. You want them widely spread out. Once your ground points are selected, simply right mouse pop-up, ground plane>set to selected. We get the little pink dots. Notice that the selected points are yellow. So let's switch back to the 3D view and we can see we now have yellow points here, one, two, three, four, five, and that our world is now lined up with the ground plane quite nicely.
Notice, if I go back to 2D and I click to deselect, the pink points here now become pink points on the 3D side, one, two, three, four, five. So when a point is selected, it turns yellow, otherwise its default texture map color. Next, we want to orient the point cloud to make it easy to line up geometry. So I am going to take this wall and orient it to line up parallel with the Z axis.
By having our point cloud oriented to the 3D world neatly, it makes it much easier to put 3D objects into the scene. So, to do that, we'll go back in 2D, I am going to pick at least two points along the base of this wall. But first, I'll scrub through the shot, looking for my best view. Okay, so I'll pick this one and this one, making very sure that they really are along that baseboard. If they happen to be out of position, it will misorient my scene.
So, with at least two points selected, right mouse pop-up, ground plane set to Z. Now we'll go back to the 3D view. There is my two yellow points that are currently selected, and if I orbit around here, we can see that that wall is now nice and parallel to the Z axis. It does not reposition it over to the Z axis, it aligns it with the Z axis. Now that we have a properly oriented camera and point cloud, we can start adding 3D geometry to the scene.
Nuke 6.3 New Features was created and produced by Steve Wright. We are honored to host his material in the lynda.com library.
- What's new in Nuke 6.3
- 3D tracking in the Camera Tracker
- Creating a cloud with the Point Cloud Generator node
- Building meshes with the PoissonMesh Generator node
- Understanding the Reconcile3D node
- Demoing the PointsTo3D node
- Introducing the Modeler node
- Aligning 2D and 3D points
- Displacing with the Displacement shader
- Adding audio
- Working with the Planar Tracker
- Working with 3D particle systems in Nuke 6.3