Project information

  • Course: COMP 4490
  • Name: Ray Tracer

Feature Outline

Feature 1 – BVH
  • Description: I used a BVH for my acceleration data structure with axis aligned bounding boxes. I started by surrounding all the primitives (spheres and triangles) and then partitioned them and recursively built my tree. Planes were separated and put in their own list.
  • Reference
Feature 2 – Camera
  • Description: I made it so in the json file you can specify the camera position, up and look at vectors.
  • Reference
Feature 3 – Texture Mapping on meshes
  • Description: I used the stb library to help me load in the texture. I then calculated the UV coordinates for an intersection and then got that value on the texture.
  • Reference
Feature 4 – Displacement Mapping
  • Description: I used the stb library again to load in the image for the normal map. I then calculated a basis matrix using the tangent, bitangent and normal and multiplied that by the normal from the image to get our normal (in our coordinate space)
  • Reference
Feature 5 – CSG
  • Description: For the project I implemented a simple version of CSG which is just the combination of 2 objects both of which are either type mesh or sphere. To do more complex objects I would just need to make my CSG into a tree and recurse on it so we could have multiple combined objects.
Feature 6 – Antialiasing – Jittered Sampling
  • Description: I used jittered sampling to improve the quality. In the json I specified if I wanted to do this and if so, how many samples to take per pixel. The offset for each sample for the pixel was random (jittered).
  • Reference
Feature 7 – Depth of Field
  • Description: I made it so in the json file you could specify an aperture so that you give the same effect as with a normal camera where you have a specific depth that is in focus.
  • Reference