Offline Ray Tracer

Built an offline ray tracer in C++ 17 that produced rendered, ray-traced ppm images, which supports rendering objects of different material types, as well as volume rendering.


Tools, libraries, and languages used: C++, VSCode


Code Walkthrough

If you’re interested in a walkthrough and explanation of the final project code, see the video below!

The Project

Throughout the semester for my Advanced Offline Rendering Techniques class, I had worked on building an offline ray tracer based on (of course) Peter Shirley’s Ray Tracing guides, specifically Ray Tracing in One Weekend and Ray Tracing the Next Week. I implemented a variety of features, including:

  • Variety of material types, including matte, reflective, and transparent
  • Positionable camera and defocus blur
  • .obj model parser and ability to render complex meshes
  • Bounding volumes for optimization
  • Volume rendering to create cloud-like effects

Volume Rendering (aka… clouds)

The final part of the project was to implement the volume rendering mentioned above. I looked for a few tutorials to reference, and found a great guide from scratchapixel.com. I also used Ken Perlin’s noise function to generate the randomized spheres (references: solarianprogrammer.com and redblobgames.com).

Code available upon request for academic integrity purposes.

Updated: