MagicDefocus v1.1


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Gilles Vink
Website: www.vinkvfx.com
2d and depth defocus with optical lens effects
Requirements:
13.1, 12.2, 12.1, 12.0, 11.3, 11.2, 11.1, 11.0, 10 or later
Linux, Mac, Windows
02 May 2021
1061

MagicDefocus logo

What is it?

MagicDefocus is an upgraded all-in-one version of the (Z)Defocus node with built in:

  • Catseye
  • Barndoors (cropped bokeh in edges of image)
  • Lens breathing based on the bokeh created (spherical/anamorphic lens)
  • 2D defocus and depth based defocus
  • Easy to use bokeh creation tool, with a default beautiful bokeh
  • And many more

 

Short demonstration video:

MagicDefocus vimeo thumbnail

Watch the video here

 

How to install

Copy/move the MagicTools folder into your .nuke installation. Then merge the contents of the init.py file with your init.py file (if you do not have one copy the file provided in the zip). Or add the following line to the existing init.py file:

nuke.pluginAddPath('./MagicTools')

 

Examples

Lens breathing

Left spherical, right anamorphic (also barndoors)

MagicDefocus lens breathing

Catseye

MagicDefocus catseye

Barndoors

MagicDefocus barndoors

 

How to use

It looks very similar to the default Defocus/ZDefocus node, but it has a lot of extra options. All the knobs have a help text when hovering over the knob.

MagicDefocus knobs

 

User interface

  1. The first tab contains all the main controls for the defocus. The size slider controls the main size of the defocus, as well as the max size when using depth defocus.
    To change to depth defocus, change the method knob to depth.

  2. The second tab is the bokeh creation tool. If you click the preview filter knob, it will give a preview of the bokeh created with the settings. You can also use your own bokeh kernel. To use your own image: set the filter type to image. Lens breathing is linked to the aspect ratio knob in this tab. When using for example 0.5, the breathing will be anamorphic. A value of 1 will make the breathing spherical.
  3. The third tab controls the non-uniform bokeh. Ticking the enable non-uniform checkbox will enable the other options. Hover over the knobs to see what everything exactly does!

 

Changelog

Thanks for all the awesome responses!

v1.1 - Includes multiple small fixes;

  • Pixel aspect other than 1 (anamorphic footage) will now output correctly
  • Fix for rendering depth mode on farm (focal plane now set correctly)
  • Fix for image artifacts when using high non-uniform values

v1.0 - Release

 

Suggestions

If you have any feature requests, questions, feedback or other ideas, feel free to contact me or leave a comment!

 

Thanks

Special thanks to Chris Fryer who inspired me with his blogpost about cropping the image into slices, and for his excellent explanation of the amazing timeblur node.

Also thanks to everyone who took the time to look at the node, and gave me feedback!

Please login in order to download these files.

Comments   

 
# Matthew Thomas 2021-04-29 11:10
Hey, this is a great! One thing I have found is that it is not picking up the pixel aspect of the plate/ project. Currently, if you feed it an anamorphic plate (with the pixel aspect of 2), it spits it out as 1.
 
 
# Gilles Vink 2021-04-30 08:41
Hi, great to hear that you like it! Thank you for feedback. I am definitely going to take a look at it!
 
 
# Gilles Vink 2021-05-02 20:33
Hi again! I just released version 1.1, it should work now!
 
 
# Florian Dehmel 2021-04-30 10:05
Nice one! I was looking for a zDefocus with non-uniform bokehs and breathing for quite some time. A nice addition would be a camera-input like pgbokeh or OpticalZDefocus by Jed Smith to incorporate aperture/filmba ck into the correct defocus size.
 
 
# Gilles Vink 2021-05-02 20:29
Thank you for your comment! That is a great idea. I will work on an implementation of that feature.
 
 
# Nicola Borsari 2021-05-01 18:44
A really and interesting tool! If you are patching things up you might wanna find a way to hide the knobs rather than disabling them when toggling between 2d and depth. I've seen a couple of people thinking that this was nukex only because of the greyed out knobs. Furthermore, if you only disable the focal_point knob you can still see the viewer overlay and moving it re-enables the knob.
 
 
# Gilles Vink 2021-05-02 20:30
Hi! Thank you very much for your feedback! Interesting to hear, I will think about a way to make it easier!
 
 
# Peter Timberlake 2021-05-08 00:22
Nice work Gilles!
 
 
# Andrey Sokolov 2021-05-21 17:22
Gj Gilles!
 

You have no rights to post comments

We have 2052 guests and 20 members online