Building the 3D scene

With the tracking done and the camera solved with a very small solve error, weare ready to create the 3D scene.This is where the calculations for the camera and the 3D points will beturned into 3D geometry.Before we begin, there is a very important thing we have to check; that theproject size matches our clip.So cursor in the node graph, type S on the keyboard to get our Project Settingstab, 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 sizeand 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 workwith 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 tokind 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 morereasonable 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 andcheck to see that the point cloud seems to be moving reasonably, everythingseems to be in order, I'll stop this.

And again, we can confirm that our camera and our point cloud aremoving correctly by compositing it over the original clip using theviewer wipe controls up here.To do that, we need to connect the viewer to the original Read node, so I'lltype a 2 here, we'll switch back to the 3D view, set the viewer wipe controlsfor 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 turnviewer 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 toalign 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 atthe scene orientation.Now if I orbit around here and get right down on the ground plane of the 3Daxis, you can see that my world is tilted.

That's because the planar tracker doesn't really know where the ground is orwhere 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 theCameraTracker 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 thetranslation 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 theground plane and then we'll tell the CameraTracker, this is the ground plane andit'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, groundplane>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 pointshere, one, two, three, four, five, and that our world is now lined up with theground plane quite nicely.

Notice, if I go back to 2D and I click to deselect, the pink points here nowbecome 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 toput 3D objects into the scene.So, to do that, we'll go back in 2D, I am going to pick at least two pointsalong 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 arealong 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 arecurrently selected, and if I orbit around here, we can see that that wall is nownice 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 adding3D geometry to the scene.

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.