Lens DOF

Photographic basis for driving ZDefocus with camera based controls.

First submitted: 30 March 2026

Author: Finley McNeilage

Compatible Nuke versions: All

Compatibility:

Takes the camera information from a camera node. This can in turn be pulling information from plate metadata or another source depending on the pipeline.

You need to set the scene scale correctly, and may also need to invert or unpremult the depth in order to get nice edges.

The 'show focus' button overlays the 'circle of confusion' calculations without applying the defocus, so it is quicker to adjust your focal point.

The offset fstop or focus knobs will adjust the incoming data from the input camera. The fstop knob can be an integer value and will do the fstop calculations for you. You can see the value being used in the final calculation on the right.

This can break if your scene values are not set correctly. It's best used to 'do it accurately' and is not as good for a 'quick and dirty' setup.

It pairs well with the 'deep to depth' if you have a deep renders. You get nicer edges but the underlying Zdefocus is lighter than PGBokeh.

or register to download or rate.

Comments

or register to join the conversation.

Download Verification