Final Project Report
CSS 552 – Prof. Sung
Jessica Ho and Duncan MacMichael
March 14, 2016
The Phong Illumination Model and ray tracing engine explored thus far are flexible in the kinds of illumination they can simulate, but are only part of a larger formula for producing photorealistic ray traced images. Part of the reason that basic ray tracing looks fake are because of “jagged edges, hard shadows, everything is in focus, objects are completely still, surfaces are perfectly shiny, and glass is perfectly clear” (Hart, p. 2) [1]. Depth of Field is needed as one way to enhance realism. In real life, cameras and our eyes filter light through a lens and control the amount of light allowed onto the image plane (image sensor or retina), which, according to Demers (2004) [6], causes some items to appear out of focus depending on their distance from the focal plane and the projection. Default 3D camera model does not replicate true camera functionality (such as controllable focal distance and aperture), meaning the image is rendered in perfect focus and the viewer immediately realizes that the image is computer-generated. Our current camera does provide focal distance but is not configurable by the user (“Focal Distance = Length(lookAtPoint – eyePoint)” (Harvey, 2012) [7]).
Three general approaches to solving depth of field:
For our CSS 552 final project, we implemented Z-Buffer as a post process. Below are our results.
The results shown below were not able to fully achieve the fully desired results. The main obstacle we were not able to overcome was comparing the CoC to a reasonable "pixel size" based on the scene dimensions, which would have enabled varying blur throughout the image based on how close the objects were. Providing various values for CoC calculation via aperature, focal distance, and len distance, the results showed varying levels of success and were highly dependent upon relativity to one another. Below is a sampling of the results we were able to obtain and their settings.
Blurring on the outer edges of the image is seen in particular along the checkered pattern of the image. This illustrates an exceedingly large CoC due to the controls we used.
Original | Blurred | Settings |
![]() |
![]() |
![]() |
Having the values set below, gave the illusion that the CoC was being calculated correctly and that the darker area was in focus, however, this is not the case. The CoC of the darker area below is still out of focus. This effect was achieved with non-realistic lens distance and focal distance values.
Original | Blurred | Settings |
![]() |
![]() |
![]() |
The entirety of the image is blurred with a large aperture. This is true to life where large apertures cause anything far away from the camera to be very blurred.
Original | Blurred | Settings |
![]() |
![]() |
![]() |