Wednesday, March 28, 2007

Ray Tracing - Project 8

Design Choices

Most of the code modifications occurred in the Scene class. I chose to do this since it seemed logical that different scenes be rendered using different filters and samplings. Also, the Scene class is where the rays are created, so it was a simple change in code.

The code changes had two parts. One which allowed additional samples to be calculated at different points based on the filter, and another part of the code, which calculated the weight of each sampling. I chose the Gaussian filter to implement as it seemed simple and provide okay results, although not too much better then the actual triangle filter.

Rendered with 1 sample per pixel (no jittering)

The function provided in the homework assignment

A scene of random spheres and five different material types

Rendered with 9 samples per pixel with jittering and using the triangle filter

The function provided in the homework assignment

Rendered with 9 samples per pixel using a Gaussian filter

The function provided in the homework assignment

A scene of random spheres and five different material types

Code: project8.tar.bz2

Friday, March 16, 2007

Ray Tracing - Project 7

Design Choices

For the design of the texture mappers, I followed a scheme similar to the one Dr. Parker recommended. I created a TexCoordMapper that provided a basic interface for grabbing texture coordinates. The base object class--from which all primitives are descended--were given a default coordinate mapper, which could be changed through the API.

Besides the coordinate mappers, three new materials were created--a checker material(which used two sub-materials assigned to it), a marble material, which used Perlin noise, and a image material. All three materials were implemented exactly as described in the slides.

Required Image

Creative Image - Triceratops by Rainbow (and sphere)

Extra Credit

For extra credit, I chose to add an additional procedural texture (I'm shooting for half extra-credit). This material (shown in the creative image) allows spectrums of color to be display for effects like rainbows.


Wednesday, March 07, 2007

Ray Tracing - Project 6

Design Choices

I originally intended to do a BVH using an quad-tree, where the tree were recurse down to some arbitrary size. This gave me a strange bug (which I had to use for my original image). The algorithm itself seemed simple, but and for the small part of the bunny that it did render, it rendered rather quickly. Much faster than the 2.5 hour attempt without the acceleration structure.

I then tried a uniform grid, but had difficulty debugging it (I wasn't getting anything to the screen), mostly due the short amount of time I had left on the assignment.

I also tried a octree, which gave me similar results to the quad-tree, which makes me feel the bug lies somewhere in my bounding boxes or something.

Bugged Image-If you look really, really closely you can see the form of the bunny. From the part that rendered, it seemed to work effectively, but for everything else, it completely ignored it. It was probably something really small and I probably should have just debugged the quad-tree instead of attempting the other two

Required Image-Here's my final rendering. It took about 18 seconds, wihich was a lot faster than the 2.5 hour version.