Java Ray Tracer

For COMP 557 course, I wrote a ray tracer from scratch. My code supports hierarchy and Instances. I implemented

  • Ray generation
  • Sphere class, ray-sphere intersection, and UV Mapping for spheres
  • Blinn-Phong shading
  • Shadows and multiple light sources
  • Plane with checkerboard pattern, and ray-plane intersection
  • Bounding boxes and ray-box intersection
  • Ray tracing triangular meshes, ray-triangle intersection and acceleration structure (with a single b-box)
  • Anti-aliasing with stochastic super sampling, and jittering.

Some Images:

A single sphere (Blinn-Phong)
A single sphere (Blinn-Phong)
A mesh object with a plane
A mesh object with a plane

 

Two light sources, a mesh object, a UV mapped sphere, a Blinn-Phong shaded sphere with anti-aliasing.
Two light sources, a mesh object, a UV mapped sphere, a Blinn-Phong shaded sphere with anti-aliasing.

Future Work

I am planning to extend my work with reflection, refraction, environment maps, and  motion blur. I am also planning to convert this project a ray tracing tutorial from scratch.