This project was to create a CPU ray tracer that uses a BVH to illuminate a scene with models. Materials were also implemented to make the surface more realistic.
The rays were fired out from the camera origin through the image plane and returns all the hits on objects. When the ray hits an object it fires off multiple rays (shadow rays) in the direction of the light (only 1 if it is a point light) and returns the sum of these divided by the number of shadow rays. The pixel is then set to the colour that is returned.
A BVH (bounding volume hierarchy) is used in the to make it for efficient for collisions between the ray and objects. It generates bounding boxes around groups of triangles based of the cost of checking collisions (traversal cost). Then smaller bounding boxes are created around smaller groups of triangles within the larger groups. This continues until the traversal cost is lower than just looping through the triangle. The BVH is then traversed using nodes which connect to each other.
Date: Apr 15, 2020
Author: Lewis Bond
Categories: project
Tagged: Ray Tracer, AT, UWEGames, C++, University
Client:
Website: https://github.com/lbondi7