Ray Tracer

Description

This is a basic shapes CPU ray tracer, written from scratch. It is one of my 2nd year projects at university and the main purpose was applying and improving my math knowledge. I have a strong background in mathematics from my high school, so I did pretty well for the time given, considering I had no previous experience with graphics at all.
I have implemented the following features:
Rendering of sphere, plane and cube; Blinn-Phong shading model; Hard and soft shadows; Multiple light sources and colors; Ambient light/Global illumination; Light attenuation; Anti-Aliasing; Transparency; Reflections; Refractions; Bounding Volume Hierarchy

Project Details

  • Tech and Tools: Visual Studio / C++

  • Development Time: 6.5 Working Weeks

  • Platforms Supported: PC / Windows

  • Available on: Not Published

  • Team Size: Personal Project

  • My Role(s): Graphics / Engine Programmer

 Rendered Images

Project Setup

Here is my Visual Studio solution setup. Apart from the ray tracer code, I have my own math library with custom Vector2 and Vector3 classes, as well as a unit testing library (See images on the right).
Bellow, you can see the main pixel loop of the ray tracer.

Project Setup

Ray Tracer Classes

Code Samples

Anti-Aliasing Code

Vector 3 Unit Testing

Throughout the development I have adhered to the agreed upon coding standards of our university and maintained proper code structure. Here are some examples of my code.

BVH Traverse Function

Previous
Previous

Osakabe

Next
Next

Osakabe Engine (Custom Engine)