Compositing is more than stacking nodes, plugins and footage. Position, depth and normal passes can also take part in calculations to create more controllable effects. The examples below break down the data relationships behind depth-offset rim light, MatCap and object dissolution, then rebuild them in Nuke.
Compositing often builds an image through layers, Alpha masks and combinations of nodes. The focus is on choosing suitable nodes, plugins or footage and assembling them into the effect.
When the footage includes 3D data passes, those relationships can also be used to calculate effects, rather than relying entirely on existing images.
Rendered data passes such as position, depth and normals are useful not only for inspecting a scene, but also as inputs to compositing calculations.
Borrowing from the way technical artists write shaders, start with three questions: What data does the effect need? How are those values related? How can that relationship be expressed in Nuke?
A useful reference is real-time rendering in games. MatCap, Normal Relight, depth-offset rim light, pop-art dots, halftone screens and dissolving effects often have calculations that can be broken down and reused.
Once the principle is clear, rebuild the calculation with the available passes, then refine the result with grading, masking and image processing. What is reusable is the relationship between the data, rather than a particular node layout.
Before choosing nodes, analyze how the effect is calculated and check whether the available passes contain the data it needs.
For example, MatCap starts with camera-space normals, remaps the sampling components to 0–1 and samples a MatCap image. A basic Normal Relight starts with the dot product of a normal and a light-direction vector. Pop-art dots can combine a spatial grid from the Position pass with brightness calculations to control dot size.
NPR toon rendering: depth-based rim light
The reference explains the principle: duplicate a depth image, offset it slightly, then subtract it from the original. The difference around the edges can be used to generate a rim-light mask.
A similar approach is possible in After Effects. The following video provides an additional reference.
Hyakushitani: making a rim-light effect
Extract the Depth pass and split it into two branches. Connect the original depth to Merge's B input. Offset the second branch with Transform and connect it to A. Set Merge's operation to from to calculate B−A: the difference between the original and offset depth.

Adjust the difference with Keyer to create a suitable rim-light mask, then connect it to Grade's mask input to control which areas are brightened.


Change the Transform offset direction and check where the rim light appears. Confirm that the basic node setup produces the expected result.
