Simulating Photoreal DOF

Depth of field is a hugely important part of simulating photoreal imagery. Focal length and bokeh and film back size greatly affect the look of a photograph. I recently uploaded a couple of Nuke tools that I created in my spare time to visualize and simulate physically accurate depth of field. OpticalZDefocus: A ZDefocus replacement which creates physically accurate defocus using the depth of field equation.

DofCalc: A tool to visualize the range of focus, given the specified lens geometry, focus distance, and depth unit.

These tools are also on Nukepedia - OpticalZDefocus and DofCalc. I also uploaded a tutorial on depth of field, if anyone is interested in hearing me ramble on about nerd stuff!

Outline

  • Terminology - What is depth of field, circles of confusion, hyperfocal distance, etc
  • What variables affect depth of field and how: lens focal length, lens f-stop, camera filmback size, and focus distance
  • How to simulate depth of field in Nuke
    • ZDefocus
    • Explaining z-depth channels and how they work
    • Demonstrating the OpticalZDefocus Tool
    • Visualizing depth of field behavior with changing lens parameters with the DofCalc gizmo
    • Simulating lens bokeh more accurately by sampling a bokeh from a plate and using that as a filter input to our defocus tool