Mark Schmelzenbach
Homework #4
CS684

This assignment models a thin-lens camera. A simple raytracer typically will use a pin-hole camera as a model. The advantage of a more complicated model is that it allows for depth-of-field effects, which manifests itself in these examples as out of focus objects.

This scene is a simple checkerboard scene with 3 spheres. The scene is being viewed from <0,1,0> and looking toward <2,0,2> (with the up vector as <0,1,0>, I couldn't stand the coordinate space of the last assignment). Also, the field of view is 60 degrees.

At the moment, the raytracer does not incorporate a shading model. As such, the scene is lit only by ambient light.

The following images are rendered using multijittered sampling...

Here is the scene as viewed by a pin-hole camera:

The following scenes are rendered using a thin-lens model with the following attributes: a 50mm lens and an aperture of 5.6.

The lens was simulated by picking a random point on a disc situated at the viewer position. The ray is then fired into the scene, "bending" the direction of the ray appropriately so that objects in the focal plane will be in focus. In effect, the ray is originating from the lens. Although this does not internally model a "true" thin lens, the effect is the same.

Adding the thin lens calculations to the raytracer requires twice as many calls to the multi-jitter routine, and as a consequence roughly doubles the calculation time.

Here, the lens is focused at 3.6 meters (roughly focused on far-left sphere):

Here, the lens is focused at 2.8 meters (roughly the center of the middle sphere):

...and at 2.2 meters (focused on the sphere on the right):

For a larger image of the above scene, click here.

A less useful picture, in which the lens is focused at 8 meters: