Math 155B Final Project
Cliff R. Chan
Comments
The goal of this project was to implement antialiasing and the "depth of field" effect
through distributive raytracing. Antialiasing is done by stochastic supersampling, with jittered
subpixels. Depth of field is done similarly by jittering the eye position. The computed subpixels
are then averaged to get the final pixel color. Antialiasing removes "jaggies" from the image.
Depth of field focuses on a specific part of an image, blurring everything else.
Sources
Buss, Samuel R. 3D Computer Graphics: A Mathematical Introduction with OpenGL.
New York: Cambridge University Press, 2003.
Anti-Aliasing
No Antialiasing.
Antialiasing with a 3x3 grid of subpixels.
Antialiasing with a 4x4 grid of subpixels.
Notice that the "jaggies" around the edges of objects in the non-antialiased image
are gone in the antialiased images.
Depth of Field
DOF with 3x3 Antialiasing
Notice the "speckles" or graininess in areas that are being blurred.
DOF with 4x4 antialiasing
The "speckles" are much less pronounced. Noticeable blurring for the foreground triangle,
and the back portion of the bottom checkered triangle.
DOF only (no AA), with a large apeture size
Result is an exaggerated DOF effect. Notice that the center of the sphere is the only thing in focus.
BOOM!
I was getting images like this early on, before I got DOF working. The eye positions are
selected randomly over an enormous apeture size. I figured out later that I should sample over a
grid, similar to the method used for antialiasing, and sample more rays per pixel to reduce the
speckles. Pretty neat effect, even if it is completely wrong :)
3x3 AA and DOF Separated
I got the following picture by rendering AA and DOF separately, and then averaging the two.
The effect is a softening of the scene, and a blurring of the "speckles" around the edges.
MISC.
Bottle with Antialiasing
Here's the bottle from Project 3. It's constructed with multiple Bezier patches to form the
exterior and interior. I made it thicker than the previous version in hopes that it would show
up better.
Sphere with DOF and 4x4 AA
Here's the start of a scene I'll be completing in the future. The plan is to replace the sphere
with the spaceship from "Flight of the Navigator". The ship in the movie actually looks more like a
walnut, with ridged metal plates (sort of like armor). Alternatively, I might replace the sphere
with the famous "smiley face" alien spaceship from the movie "Heavy Metal". Neither one has anything
to do with this project really, except I wanted to end with a pop culture reference.
My work is done :)