logo

The Things I Do

CS488 - Ray Tracer Project. (2006)
In my UWaterloo 4A Term, I took the wonderful course that is CS488, Intro to Computer Graphics. So, what's so awesome about it? Ray Tracing! I'm no master at it, but it was fun times.

Here are some of the canned stuff that we had to do:
ImageImageImageHere's the set of the basic Model test: Spheres, Cubes, a regular predefined model. First as a small scene, then a bigger image (using bounding boxes), then finally as an extension for my engine: Reflections.

Then the fun one: Macho Cows!
ImageImageMacho Cows, with and without bounding boxes, along with hierarchal modelling "stonehenge" pillars. The cows were 3000 polys, which made calculations near and around the cows tediously long.

And for my final scene:
Image Image

The initial image, with a sampling error.

The final image, rendered at 1680x1050


While working on the final scene, I had ran out of time, hence, random placements of shapes and spheres. I think I had called it 4D pong.

There's actually an interesting story here. I first started with a demo scene that was 256X256 resolution, which it rendered with ease. Only when I bumped it up to 1680X1050 (My laptop's screen size) did I find a flaw. I started in a frantic trace for why the ray tracer was stalling, especially with multiple light sources and reflections.

Turns out my reflection recursion equation was wrong: for every reflected ray, I was not increasing the counter to terminate the ray, hence...non-terminating if it was getting stuck between a 2 walls.

(C) Copyright 2007-2011. HaroldLi.ca. All rights reserved. Custom CMS setup (PHP, MySQL) written by Harold Li. Best viewed at 1024x768 or higher.