"Simple Ray Tracer"
Final Project for CPE 473 Spring 2011- Ray Traced Particle Simulation
Massimo 'Max' Becker
Spring 2011



Project Description:


My final project was to use a particle simulator to generate scenes that would then by rendered using a ray tracer.

Features:


The ray tracer will take something that has been abstracted as a scene generator and ray trace a generated scene.
Either a CPU or GPU version of the ray tracer may be used for the rendering.
Images will be output in TGA format.

Design:


Current generators available in the ray tracer are the particle simulator or a povray format parser but others can be added easily thanks to the generator abstraction.
A generator is provided to the ray tracer when it is created, each time the ray tracer is asked to render a frame, it will make a call to its given generator to get a scene and then render that scene.
In the case of the particle simulator, each time the ray tracer renders a scene, the generator will increment the time step in the particle simulator, build a scene from the state of the particles and give it to its caller (the ray tracer). The ray tracer then renders that scene and outputs it.
For the GPU implementation, all rendering is done on the GPU. The rays for the scene are generated on the CPU. The rays and scene information are then given to the GPU. The GPU will process all lighting models, shadows, transformations, and intersections and then color each ray. The resulting image is retrieved from the GPU and then written out to a file.


Screenshots:


<Single Sphere>
Image

<Single Sphere>
Image

<Single Sphere>
Image

<Single Sphere>
Image

<Single Sphere>
Image

<Single Sphere>
Image

<Single Sphere>
Image

Future Work:
Improve CUDA features and add support for larger scenes with CUDA usage
Add reflections and refractions to GPU implementation
Add additional image formats for output
Abtract out the image output system so that rendered scenes can be output to a file, displayed with glut, or put into a movie format.
Implement a Bounding volume higherarchy on both the CPU and GPU implementations
Add texture mapping
Add both cone and box objects to possible scene objects
Add openGL preview feature

References:

Max Becker's Particle Simulator
Shirley Ray Tracing Chapter
NYU povray parser