CSC 471 Final Project – Fall 2012:

Simple Ray Tracer

Ryan Staab


Project description:

For my final project I implemented the beginnings of a Ray Tracer. This entails setting up a world with a camera, a viewing screen, and simple scene with geometries of spheres and a ground plane in the view frustum. The scene is then rendered with the following features:


Shadows, reflections, and refractions are achieved via casting a ray from the camera (or eye) through the viewing screen for every pixel in the viewing screen. If that ray intersects with any of the geometry in the scene then shadow, reflection, and refraction secondary rays are calculated from that surface point, each with its own direction based on the surface normal at that point. These secondary arrays then, in turn, affect the color of the point if they further intersect with other geometry in the scene, returning the color of any new intersections to the original surface point.

Rendered images:



Figure 1: Phong, shadows, and reflection



Figure 2: Reflections heavily weighted



Figure 3: Transparency



Figure 4: Small index of refraction



Figure 5: Phong, shadows, reflection, and transparency


References:


http://en.wikipedia.org/wiki/Ray_tracing_(graphics)

http://www.clockworkcoders.com/oglsl/rt/index.html

http://devmaster.net/forums/topic/13951-implementing-raytracer-in-opengl/

http://www.flipcode.com/archives/reflection_transmission.pdf

http://www.cs.unc.edu/~rademach/xroads-RT/RTarticle.html

http://www.codermind.com/articles/Raytracer-in-C++-Introduction-What-is-ray-tracing.html

http://scratchapixel.com/lessons/3d-basic-lessons/lesson-1-writing-a-simple-raytracer/

http://www.cs.utah.edu/~shirley/books/fcg2/rt.pdf

http://www.siggraph.org/education/materials/HyperGraph/raytrace/rtinter3.htm