From the course: Nuke New Features Consolidated

Reconcile3D node: Basic setup - Nuke Tutorial

From the course: Nuke New Features Consolidated

Reconcile3D node: Basic setup

- The Reconcile 3D Node is poorly documented, so it's a bit of a mystery to most. The two key questions here are what does it do, and what do I use it for? To see that, let's load a script. So we'll go to our File, Open, select wherever you have your project media, go to the Lesson_04_Media/ folder, and select the Reconcile3D nuke script. We'll open that. Okay, we'll go to the far left backdrop node, select that and type F to fill the frame and type D to enable all the nodes. And we'll double click on the viewer to see what we've got. By the way, these read notes found their images because I have an expression in them that tells them to look for them in the same directory that the nuke script was loaded from. As long as they stay in the same folder, you can put them anywhere you want. So we have a 3D camera scene right here. So let's go look at the 3D setup. We'll switch to our 3D viewer, type F, orbit around, open up the Scene node, select the camera, so you can see the action. So the camera moves horizontally, and then pushes in towards the plate. To set up the Reconcile 3D node, we're going to need an axis. So, we'll go to the 3D tab, click on Axis, and it appears in the 3D viewer. So, I want to use this axis to drive this moon object. So, to do that, I want some parallax. I want the moon to move differently than the screen. So I'm going to place my 3D target back in Z, so that will get some parallax between my picture and my axis. Now, if we look through the camera, you see the camera move, you can see the axis is moving relative to the foreground. And let me reposition it somewhere. I want to put the moon up here, and maybe over there a little bit. So, let's say I like that for my 3D axis position. Now I'm ready to get the 2D coordinates frame by frame. So we'll switch to the 2D view and add the Reconcile 3D node. Come to the Transform tab, select Reconcile3D, and it hooks up to the Axis node, which is what we want. The camera input, of course, goes to the 3D camera. And we're ready to go. Make sure you do not connect anything to the image input here. The Reconcile 3D node is going to calculate the 2D position on the screen relative to the camera aperture, so you have to make sure your project settings match your clip. If you hook anything up to the image input here, it's going to change the camera aperture to match that image. In this case, this is a very small 200x200 image. So that will resize all of your tracking data and make it incorrect. So just remember, the project settings must match your input clip before you create your keyframes. Okay, we're ready to go, so we come up here to the Reconcile3D property panel and click create keyframes. It gives us a frame range choice. If you just want to track a short section, this is where you do it. So click OK, and there we go, right across the screen, and done. So there is the output point. This is the 2D point on the screen represented by that 3D point in space as seen by the camera. Now let me turn the overlays off by putting my cursory in the viewer and typing O to get rid of the path of motion. And there we can see the output point. This is what I'm going to use to drive the moon. Now that the keyframes are all created, only then I can hook up my moon image to the Reconcile 3D. I'll add a Merge node because I want to composite the output of that over my background. And there we go. So the Reconcile 3D node has actually done the translated X and Y to reposition the moon relative to the output point. However, it's not centered on the output point. It's down here in the lower left-hand corner. In other words, it's actually set at to the lower left-hand corner of the image right here. But that's an easy fix. All we have to do is adjust the offset in the Reconcile 3D node. I'm going to put Reconcile 3D to the top of the property bin by doing a command click on this little X button here, and we'll adjust the offset here. I'm going to set the offset in X, 20, 30, 40, 50, 70, 80, 90, 100, and the offset in Y, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100. There, now the output point is centered on my image. And if I move the playhead, you can see the moon is moving with it. I'll jump the playhead to frame one, and now we can hit play. Okay, I'm going to set the playhead for ping pong, that'll make a more interesting playback. Okay, we'll stop this to show you up here the XY output. These are the coordinates on the screen for the location of our output point which, of course, controls the moon point. As I scrub the playhead, you can see the XY output values are changing. The XYZ output is, in fact, the location of the 3D point, in this case, the axis. I'm going to clear the property bin and restart the playback to point out that the moon is being translated in X and Y by the Reconcile 3D node, but it is not being resized or rotated, which works in this case because my camera is translating left and right. I want some parallax between the moon and the foreground buildings, but when I push in, I don't want the moon to scale up. In this example, we had a 3D camera move with an axis, then used the Reconcile 3D node to create the on-screen 2D coordinates used to apply the match move to the moon. Note that the Reconcile 3D node itself moved the moon connected to the image input, but that's not the only workflow with the Reconcile 3D node.

Contents