Prateek Marathe

Depth of Field with Bokeh Effect

Depth of Field with Bokeh Effect

As part of the final project for my 3D Graphics and Rendering course I worked on implementing Depth of Field and Bokeh Effects into the existing rendering engine.  I worked on this project with two other team mates namely, Rohit Ravishankar and Handa Zhang.  

We first processes the DoF followed by the Bokeh effects.

 
  • Depth of Field
 

In this project the Depth of Field (DOF) was computed using the Ray Tracing, which is implemented into the rendering engine and in done after rasterization but before the actual rendering.

The image to left shows the focal plane being set on the first teapot.  Here seventy rays were used to sample the pixels by depth to apply Gaussian blur.   

 
  • Bokeh Effect
 

The image shows the circular bokehs added to the out of focus areas of the DoF image above.  The bokehs are textures that are overlaid on the finished blurred image.  

The number and size of the bokeh as well as their relation to the focal plane is defined in the documents mentioned below.

 

A more detailed explanation as well as some more references highlighting the process of Depth of Field calculations as well as Bohek effect rendering can be found in the following paper.

Prateek Marathe