Join Mark Lefitz for an in-depth discussion in this video Getting started in Nuke, part of Photorealistic Lighting with Maya and Nuke (2012).
So, now that we have all our rendered elements, we can now set up our Nuke composite. The first thing we need to do is read in our car.exr file, which I demonstrated how to create at the end of chapter 4. We can either click-drag it in, like this, and then view it. So, let's go ahead and delete that. The other thing is, we can hit the R button, which creates a Read node, and then it automatically browses for the location of the file.
So, here we are in our car/images directory, in our Car.exr. So let's go ahead and open that up, and let's go ahead and add that Grade node that we have been working with in our linear workflow. Let's hit the shortcut G, and let's hit the gamma to .454, so now we have a properly gammaed image. I also like to set my Properties to less than 10, preferably 1, so I only have one Property node in Nuke at a time.
The next thing we want to do is we want to set our Project Settings; the shortcut key for that is S, and within our Project Settings, we want to set our full size format. As you can see, everything we have rendered out from Maya so far was set to 1280 by 720. Nuke defaults something other than that. This simply means that if we bring in any script generated elements, such as constants, and color bars, and roto shapes, it'll automatically default to the full size format.
So for instance, let's hit the Tab bar. I am going to type in a constant, and let's view that. So now we are at 2048 by 1556. We want to have all these script-generated elements to be the same as our rendered elements. So let's hit S again, and let's select 1280 by 720. We can also create new ones. So for instance, we can type in Car HD, and then we can type in 1280 by 720, and let's say OK.
Notice right away that are Constant now sets its default size to 1280 by 720. Back in our Project Settings, we also have our proxy scale. Our proxy scale enables us to work at a much smaller resolution, making our workflow much faster, so we don't have to render everything out at 1280 by 720 while we are in the Nuke comp. So, right now we are set at .5, which is 50% our HD scale. So, to enable proxy scale, we can go up to our Viewer here, and toggle proxy scale on.
Let's view our Grade node. So we are at half-res now: 640 by 360. Our hot key in order to initiate our proxy scale in Nuke is Ctrl+P on a PC, and Command+P on a Mac. Also, in our Project Settings, notice that there is frames per second, and frame range. We can ignore that for now, because we're only rendering a still. These are very important attributes to set if you are working in animation. Now we are ready to composite.
Our Car.exr has embedded render passes that we created out of mental ray. We're going to have to extract all those passes using shuffle nodes, and then putting them together into a single image. So then, once they are separated out, we can use our mattes that we created to color correct each of those render passes. So, let's hit the Tab key, and create a new Shuffle node. Let's bring the leader up to Grade, and under our rgba, let's select diffuse.
Let's rename our Shuffle node to diffuse, because we are going to be creating a couple of these here now. Tab, Shuffle, into the Grade node, and now let's redirect that to indirect, and rename it. So now we can view the diffuse in indirect passes. There we go. That looks pretty good. So let's keep going here. We have several more to do. Shuffle, into the Grade node, next is reflection, and let's just call this reflection. Tab, Shuffle, let's bring the leader up to Grade, into the refraction, call this refraction, and take a look at that too; make sure we got it right.
Bring the leader to the Grade, and under our rgba, let's select specular, and let's just call this specular. Let's take a look that. So now what we're going to probably have to do is we are going to have to use the Merge node with the operation set to plus, and add them all up. So the hot key for the Merge node is M, or Tab, Merge, bring the leaders here, double-click, make sure it's in our property window, set the operation to plus.
Now that would be the diffuse and the indirect added. Let's go ahead and create another Merge node. We are going to keep adding all these passes up here. Set the operation to plus. We've got specular. Let's go ahead and create another Merge node. Make sure it's in our property window. Set the operation to plus. With the node selected, on the keyboard hit Ctrl+C, and in the empty space here Ctrl+V. We are going to keep adding all these passes up here; it saves me a bit of time. And now finally, we have to add a new Grade node.
So let's just Ctrl+C; copy and paste that here. So now all our associated passes add up to what our original render looks like here. Now that we have our basic setup in Nuke, we can start to color correct our passes.
- Understanding image-based lighting
- Analyzing and color correcting the background plate
- Creating a 3D camera to match the plate
- Lighting with low-quality settings and proxies
- Setting light samples
- Setting up render passes
- Rendering mattes ground shadow, and occlusions passes
- Adding gamma correction in Nuke
- Adding the object to the plate and rendering the final composite
- Retouching the composite using Photoshop