The DeepCrop node in Nuke is severely limited for isolating specific areas of your Deep render. Here is a more flexible technique.
Locked To The Frustum
When using the DeepCrop node to isolate an area of your Deep render in Nuke, you are at the mercy of your render camera's orientation in 3D space.
If the camera's frustum doesn't happen to align with the area you want to isolate, it becomes very difficult to crop the Deep accurately.
That's because the DeepCrop node crops the Deep based on the distance from the camera. It relies on the camera’s orientation in relation to the scene – using the camera’s frustum to crop the Deep.
Below is an example scene with a railing in front of a wall. The camera is viewing the scene at an angle:
The example scene.
The scene when viewed through the camera.
Let’s say we want to isolate the railing.
Using the DeepCrop node, we run into issues because the camera is at an angle to the scene:
DeepCropping with the camera at an angle to the scene.
💡 In the video above, I constrained a Card to the Camera’s frustum and linked the Card's position to the zfar distance of the DeepCrop, to show more clearly how the DeepCrop node crops based on the camera’s frustum.
Because the DeepCrop is affected by the camera’s orientation, isolating just the railing becomes very difficult.
The DeepCrop keeps unwanted parts of the wall and floor, and crops out parts of the railing which we want to keep.
In this case, the DeepCrop’s limited capabilities fall short. Instead, it's much more useful to set up your own deep holdouts to crop the Deep and isolate specific areas.
We can position a Card to block parts of the scene from the camera, and use it as a Deep holdout.
By lining the Card up with the railing, we can block everything behind the Card (from the camera’s perspective):
Holding out the Deep using a Card, to isolate the railing.
💡 What the Card covers when seen through the camera is what will be held out from the scene.
The Deep holdout method keeps the entire railing and nothing else, just as intended.
💡 The DeepCrop node’s zfar knob works similar to a Card covering the entire frustum of the camera (you can make it smaller by changing the format in the bbox knob). It crops out anything beyond the Card’s Z distance from the camera. The znear knob works in the same way, only it crops out anything in front of its respective Card – i.e. anything between the camera and the znear distance.
To use the Card as a Deep holdout, simply output the Card through a ScanlineRender node using the same camera and format as your main scene or Deep render, and connect the two with a DeepMerge (holdout).
Lastly, connect a DeepToImage node to output the image.
DeepCrop setup vs. Deep holdout setup.
I hope you found this tutorial useful. For more Nuke tips & tricks, see Nuke.