CSE 168 Final Project: Fire Ants

Yunjiu Li, Spring 2010


For my final project, I added the following features to my ray tracer:

I wanted to render an image showing high quality caustics but didn't know exactly what to render. One day I randomly thought of a magnifying glass providing sharp caustics and zooming in on small objects.


I didn't have any modeling experience and followed tutorials online to learn how to model a magnifying glass. The ant model was downloaded online at a free 3D model website.


My anti-aliasing implementation used supersampling with randomly jittered sample points. All images in the following sections use 16 samples per pixel. An example image of the scene without anti-aliasing is shown below.


Above is the texture I used on the ant. The obj model had texture coordinates for each vertex. I converted this JPG texture to PFM format using HDRShop and re-used the environment map class to do a texture look up.

Procedural Bumpmapping

A procedural bumpmap was added for the tiles on the ground and the ant model.

Photographic Tone Mapping

Photographic tone mapping was implemented. The above image and all the images in the sections below uses key value (key_a = 0.7f) and white level (L_white = 0.95f)

Depth of Field

Same ant with 16 depth of field samples per pixel. Samples were taken by tracing a ray to a focal length d and using that hit point to generate direction vectors. Sampling was done on a grid from the eye by generating orthogonal vectors to the viewing direction.

Caustics Photon Map

Photon Map of caustics was implemented using the Photon Map implementation from Prof. Jensen's book Realistic Image Synthesis Using Photon Mapping. 1 Million caustic photons were used but 10,000 was already enough. The above images show different light sources around the scene.

Final Image

In the final image below, I decided not to use Depth of Field for clarity of the details in the scene.

Special Thanks To:

Henrik Wann Jensen
Toshiya Hachisuka

Disclaimer: No ants were harmed and I do not endorse such activities.