DefocusPlus v1.2

This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Damian Binder
DefocusPlus is meant to be a step-up from Nuke's default Defocus node offering some more control over the filter shape while keeping it lightweight and intuitive to use.
12.0, 11.3 or later
Linux, Mac, Windows
13 Sep 2020
DefocusPlus is meant to be a step-up from Nuke's default Defocus node offering some more control over the filter shape while keeping it lightweight and intuitive to use.
Features include:
-Filter shape. Control the basic shape of the convolution filter or use a custom one via the Filter input.
-A Tilt-Shift mode that mimics depth of field driven by a matte via the Mask input.
-Faster rendering. Includes optimization options such as performing a pre downres to the incoming image.
-Bokeh Swirl. Emulates swirly bokeh or cats-eye effect.
-GPU accelerated.
The idea for this tool came from the realization that many artists tend to use Nuke's ZDefocus node when a custom filter shape is required, even if it's not being used for the 'Z' matter. This leads to slower rendering times since ZDefocus usually takes longer to process. A more appropriate option would be using the Convolve node. While it can be a bit of a hassle to set up, it is a far better option in terms of processing time. DefocusPlus makes use of the Convolve node since it is pretty lightweight and can be rendered on GPU.
The 'Mask' input can be switched to a Tilt-Shift mode which allows for smooth focus transitions controlled by ramped mattes. This can be used as a fake depth of field effect or a cheap ZDefocus.
The 'Speed Up' section includes an option to perform a pre downres to the incoming image before applying the defocus. The idea behind this being, depending on the size of the defocus, rendering at full resolution is not always necessary since the image is being defocused anyway, therefore losing its detail. By doing so, processing time gets drastically reduced and the output effect barely differs.
The 'Swirl' tab focuses on replicating swirly or cats-eye shaped bokeh shapes that get more pronounced towards the edge of the frame. This takes a bit more processing time but it can be sped up using the pre downres method mentioned above. Inspired by Chris Fryer's cfCatsEyeDefocus and his cycling crop approach. Credits to him (:
Since this tool uses only native Nuke nodes it should be supported on most Nuke versions.
- Bug fixes and performance improvements.
- Solved an issue where the TimeBlur node that drives the swirl effect would slow down Nuke's UI interactivity even if disabled. When using the swirl feature, please consider precomping whenever possible or activating it only for rendering to avoid script slowdowns.
- The swirl tab has been extended with more options and improvements.
- Added a Quality knob for the Tilt-Shift mode that includes an 'Eco' mode which uses 7 convolutions instead of 13.
How to install:
- Place the “Damian_Binder” folder inside your .nuke folder.
- Add this to your file located in your .nuke folder:
- Add this to your file also located in your .nuke folder:
toolbar = nuke.toolbar('Nodes')
m = toolbar.addMenu('DamianBinder', icon='DamianBinderNukeLogo.png')
m.addCommand('DefocusPlus', 'nuke.createNode(\'DefocusPlus\')', icon='DefocusPlus_Icon.png')
*** If you don't have and files inside your .nuke folder use the ones provided.
*** If the folder “Damian_Binder” already exists in your .nuke folder (because of already installed tools by Damian Binder like TimeMorph or Looper for example), move the “DefocusPlus” folder (located inside the downloaded “Damian_Binder” folder) to the already installed “Damian_Binder” folder.
Please login in order to download these files.


0 # oat meal 2020-10-16 10:11
Hey, I really like this plug-in! Just wondering if there's any intentions for it to support zdepth at any point in the future, since this is the only DoF plug-in I can find that supports swirling and isn't entirely deprecated / abandoned. Thanks once again!
+1 # Damian Binder 2020-10-18 10:23
Hey! Since I wanted to keep it lightweight I did not include a zDefocus as of yet but rather a fast / cheap approximation that only needs a simple ramp to work. If you need a zDefocus with swirling check out Chris Fryer's cfCatsEyeDefocu s on his web page. I might add a zDefocus section in the future. We'll see how this tool evolves.
+1 # oat meal 2020-12-19 12:42
Thanks for the recommendation, however cfCatsEyeDefocu s is horrendously slow and looks worse in comparison to your efforts (and other bokeh vignetting attempts). Would like to see zDefocus support as a result.
0 # Fred Raimondi 2022-10-28 20:03
Terrific Plugin....well done!

You have no rights to post comments

We have 4767 guests and 137 members online