A simple raytracing project done for a 3D programming university course.
The project was done in C++, and used OpenGL to help visualisation. A simple OpenGL codebase was given to allow us to have an easy to use tool to help us visualize the scenes which we created. All other features were not present in the code base.
The commits are empty as this project was coded in a private git repository which contained many works for this course.
- Intersection detection for spheres, planes, triangles and thereby more advanced meshes. These were all coded from scratch.
- Phong shader and multiple light compatibility.
- Soft shadows. Sending multiple rays to detect the occlusion of our object allowing us to create more detailed shadows.
- Reflection to simulate mirror effects, for mirrors or other potentially reflective surfaces.
- Refraction to smiulate glass, or other transparent materials.
- Motion blur for spheres, due to lack of time, this has not been implemented for other meshes.
- A KD-Tree acceleration. In order to obtain higher quality images, many rays need to be sent which can be quite costly, and using a naive method this can take multiple minutes. Adding heavier meshes, soft shadows, reflection, refraction and motion blur further increases the amount of rays sent per pixel. So an acceleration architecture was mandatory to have acceptable computation times. The KD-Tree greatly optimised this software generating results far quicker (for example, in a test scene with 4 planes and a 968 triangle mesh, my software generated results in 18 minutes 38 seconds without KD-Tree acceleration, and only 31 seconds with)