Ray

by Aurelien Serandour and Jason Scherer

Last modified on Tuesday, 09-Dec-2008 21:36:06 MST


Assignment Complete

We have completed assignment four.

A report in PDF form is available here. The source code can be downloaded here. If you just want the binary, it's here.

Following is a series of renders that we created when building and testing the raytracer, presented here in more or less chronological order.

Lighting, Shading, Reflections, and Refractions:

This was the first render that used lighting and shading.
First render using reflections.
Playing around with materials. These are the same balls, but their specular color and diffuse color are switched.
Another render using reflections. Now the spheres are inside a big white sphere (you can see the reflections against the wall)
First render using shadows. You can see the shadows distort against the concave surface of the inside of the sphere.
Another view of the same scene, with a large number of reflection bounces. Note the succession of shadows, reflections, reflections of shadows, etc, almost converging to a point.
First render using refraction. In front of our five balls we now have a smaller and a larger glass ball.
Larger version of the render.

Antialiasing and Soft Shadows:

reference scene without antialiasing
2x2 grid supersampling
3x3 jittering supersampling
reference scene with direct light
reference scene with soft shadows

Further Experiments:

The ball has a diffuse color of red, but a very high reflectivity, so on the bottom surface there is no red at all. This is, of course, not a realistic material. It's transparent but has no refraction, so it looks like a hollow glass ball.

The golden egg was modeled in Blender and then converted from obj format to our raytracer format using a converter program that we wrote. There's some sort of bug with the normals -- not sure where that is happening.

The reflective blue box is proportioned according to the "golden mean".
This and the following renders are studies in colored light. The lighting effects were created by using different combinations of 3 possible light sources.

This scene looks down on few balls which hover above a "floor" -- behind the camera is a hemisphere.
Purple light.
Green light.
Green/yellow. There's a translucent sphere in the middle now.
Moved the translucent sphere closer to the viewer and added a rectangle.
Further away.

Sphere study:

reference scene with lambertian spheres
spheres with 2x2 jittering supersampling
mirror floor added
test with soft shadows
with reflective spheres
spheres with 2x2 grid supersampling
reflective spheres with 2x2 grid supersampling and soft shadows
small atom and its electrons 2x2 grid supersampling. Each electron has an emissive part.
having fun !

Progress

We have begun by creating three main modules:

RenderSpecification

This module parses the input file and stores all the values in that file. Currently we are parsing width, height, maxdepth, output filename, and camera.

Renderer

this module is responsible for rendering the scene. We have coded the raytracing algorithm with a Ray class and the Camera class. The output of the raytrace is stored in a buffer of unsigned integers.

FileWriter

This module is responsible for writing the output file from the buffer.

Object, Sphere, Triangle, Light

We have created an abstract superclass of all renderable objects called Object. Object has different subclasses such as Sphere, Triangle, etc. Every object has an "intersects" method which is used to test intersection with the ray being traced. Of course, we also create a Light class to deal with lighting.

Goals

In addition to fulfilling the requirements of the assignment, we woudl like to attempt to implement additional functionality such as:



Here are some example images: