OpticalZDefocus v1.0


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Jed Smith
OpticalZDefocus is a physically accurate ZDefocus, which controls circle of confusion (coc) size based on lens geometry using the depth of field equation. Set your lens and film-back characteristics, your focus distance, and adjust the size of your bokeh with the aperture size, just like a real lens.
Requirements:
11.0, 10.5, 10.0, 9.0, 7.1, 7.0 or later
Linux, Mac, Windows
03 Jun 2017
354

OpticalZDefocus screenshot

 

OpticalZDefocus is a physically accurate ZDefocus, which controls circle of confusion (coc) size based on lens geometry using the depth of field equation.

Set your lens and film-back characteristics, your focus distance, and adjust the size of your bokeh with the aperture size, just like a real lens.

Features

  • Unpremultiply your depth channel by the selected alpha
  • Sample the z-depth value at a given x/y coordinate
  • Supports multiple depth units: mm, cm, m, dm, inches, feet
  • Automatically snarf lens geometry data from a selected camera node
  • Min z-depth value to avoid long processing times on cg with transparent alphas
  • Fast constant defocus mode which will not calculate depth of field

The latest version will always be here: https://gist.github.com/jedypod/50a3b68f9b5bbe487e1a

There is also a video about depth of field which includes a section about how to use the tool here, for those that are curious: Simulating Physically Accurate Depth of Field

Please login in order to download these files.

Comments   

 
# Warrachat Khamfun 2017-05-28 05:41
Very Nice script :-)
 
 
# Jorge M 2017-06-07 21:49
thanks man ! it's really impressive!
 
 
# Jorge M 2017-06-07 21:59
Do you know if it would be a difference if I use the depth from the deep data and plugin it into your OpticalZdefocus instead of a regular depth ?
 
 
# Rich Bobo 2017-06-21 00:12
Jed,

Holy cow!! I can't even begin to say how *awesome* this is! I have been suffering with Nuke's ZDefocus for so long - and now there's a ZDepth tool that actually works the way it should! Thank you, thank you, thank you! If I ever see you, remind me that I owe you several drinks. I'm serious.

Already added it to our facility's toolset and I've been experimenting with it on a bunch of previous comps of all kinds. Our Head Creative Director even said we should go back and re-render one of our jobs, just so it looks better on our reel!

Thanks a ton,

Rich
 

You have no rights to post comments

We have 2779 guests and 39 members online