Defocus and lens aberration tool that simulates a variety of optical effects
Defocus_Aberrations
Updated: 14 August 2022
Author: bsales
Compatible Nuke versions: 10.0 or later
Compatibility: Linux, Mac, Windows
Defocus-Aberrations simulates a range of optical aberrations related to lenses and defocus.
This started as a chat message from another comp supervisor I work with. He had a shot he was working on that was heavily defocused and had cat's eye and cropped bokeh visible. He asked if there was a good Nuke tool to handle this and I wasn’t aware of any so built a really simple one to help that shot. Defocus_Abberations grew out of that and I added a number of additional effects along the way.
This is my first contribution to Nukepedia. It’s not as fast as I would like and in some circumstances can have visible artifacts, but I think it might be useful to others.
Here’s a list of the supported features
Internal bokeh generator with noise and onion rings (or external input)
ZDefocus - Nuke’s math or lens based optical defocus (thanks Jedediah Smith
Preprocessor with gamma and highlight boost
Cat’s eye bokeh (circular vignetting)
Astigmatism (radial and tangential stretching)
Cropped bokeh (matte box flagging)
Bokeh color fringing (axial chromatic aberration)
Field curvature effect (causes corner or center blurring)
Lateral chromatic aberration (corner color smearing
Coma
Two styles of vignetting (natural cos^4 falloff and image circle)
To handle effects requiring localized processing for different regions of the screen, the image is divided up into an array of segments and then merged back together after processing. You can determine the size of the array, but rebuilding and processing slows with larger grids.
ChangeLog:
1.0 - Initial release
1.1 - Modified initial reformat of image input to preserve bounding box outside image area for improved edge handling
1.2 - Swapped shuffles nodes to v11 compatible versions (Thanks to Nikolai Wüstemann)
1.3 - Changed some node naming to avoid render farm errors (Thanks to Gregor Stephani)
CAT'S EYE BOKEH - with green-magenta axial chromatic aberration:
ASTIGMATISM:
CROPPED BOKEH - with red-blue axial chromatic aberration:
FIELD CURVATURE - with vignettes and green-magenta lateral chromatic aberration:
ZDEFOCUS SUPPORT: