In this project we add depth of field support to our ray tracers.
Requirements
XML Scene Format
In the XML scene format we specify depth of filed using the "dof" and "focaldist" tags inside the "camera" tag as below.
<camera> <!-- Additional camera parameters --> <focaldist value="70.0"/> <dof value="1.5"/> </camera>
The "dof" value specifies the radius of the circle of confusion and "focaldist" is the distance from the camera to the focal point.
You can use this test scene to verify that your implementation is correct.
Resources
Here is an updated header file that includes classes for keeping the new scene definition in the memory and Here is an example implementation of the XML parser using TinyXML.
Optional Feature Suggestions
Student Project Pages