Skip to content

Rebuild Nuke

Overview

In this tutorial you will rebuild a render from COATcreate in Nuke and adjust the exterior body paint color. Then add depth of field, glows and a color grade to create a final image.

In the above image, the left is the original render from COATcreat and the right is the rebuild. The rebuild will not have the same tonemap from COATcreate applied from COAT becasue that is a post proces that creates a look. When doing a rebuild you have the original pixels to work with before the tonemap is applied. When rebuilding you get apply any look you choose.

Set project

In Nuke it preferrable to have a Project set, this will allow all of your files to have a relative path. This will allow you to move the project between users and filesystems with out having to re-path the input images.

On a new script save the file into a folder where you are going to have all of your files. Then go to you projects settings ( by hitting "S" in the node graph window ). Then click "Script Directory", this will set the project to the directory where the nuke script is saved.

The file path "./renders" now referes to the renders directory in the project path.

The project folder, inside renders are all the orignal renders from COAATcreate. The write node is set to "./output.png" that you can see in the project folder.

If you drag files in to the node graph you will need to change the file path to include the relative path.

Rebuild with Merge

You will need the following Files:

* PtDirectIllumination.exr
* PtGlobalIllumination.exr
* PtRefractions.exr
* PtReflections.exr
* PtSelfIllumination.exr

Use a "Merge" node, set to add to combine them together. They are all being added together which allows this to be done in one node. There is no particluar order to the images in the merge node.

Point your viewer to the merge node. Now you will see a rebuild of beauty pass using the elements from COAT.

This beauty image will look different than the png or beauty. The Png has an ACES tonemap applied to it to give it a more finished look directly from the renderer. The Beauty.exr is slightly different and we are working with Nvidia to sort out the cause of this.

Adjust Rebuild

The main advantage of a rebuilt image is that you can affect the different elements more specifically.

In this example we are using a grade node to brighten up the Global Illumnation tint it a bit cooler.

We are also applying a denoise node to clean up some noise on the refaction pass that shows the interior in th render.

Adjust Paint

First we will need to create a mask to use to adjust the paint. In this example I am pulling the mask from the PtDiffuseFilter.exr file. This image is the diffuse color of every object without lighting or shading.

To begin use a ChromaKeyer to select the body paint color. Then you can usea roto node to create a garbage mask around the car ( the red line in the image above ) to remove any other parts of the image that where selected. Next use a dialate with a value of -0.5, this will address the anti-alaiasing in the mask later. Finally use a invert on the alpha channel so the the car paint mask is white, and everything else it black.

Below the merge node, place a "hue shift" node and connect the mask we just made to it. Hue shift will alow us to swing the color and adjust it to what we are looking for for.

Here you can see we've taken the blue car and shifted it to red.

Effects

After color adjustemts, then apply any effects to the shot. In this case I've shuffled in the PtZDepth.exr as the depth.Z channel and then used the ZDefocus to add some depth of feild. Then a glow node to add some softness to the edge of brighter elements like the headlamps.

Color Grade

Finally we can apply a final look to our image. This case we are using a color correct node to adjust the colors to our liking.

Compare

If we compare the beauty.png, beauty.exr and our final comp they are all slightly different and the is ok because they are all valid for their partiular use. The Png file, is made to have a good looking image that is ready to use as is. The exr is a "raw" image before any tonemapping and our comp is what we have chosen our image to look like.

Conclusion

We have rebuilt a beauty imge, using the exr passes from COATcreate. We have adjusted particualr passes, changed the paint color, added effects and applied a final "look" at the end.