MP2
Accelerated Ray Tracing
Due: October 16, 11:55pm
For your second programming assignment you will implement:
-
Reading and rendering a mesh in the OBJ or PLY format.
See Ray Tracing from the Ground Up Chapter 23 Meshes - A spatial data structure to accelerate intersection testing.
A uniform grid is sufficient, but you could implement any of the following instead:- A KD-Tree wikipedia link
- A Bounding Volume Hierarchy wikipedia link
- An Octree wikipedia link
-
Support for shadows.
See Ray Tracing from the Ground Up Chapter 16 Shadows -
Support for point lights.
See Ray Tracing from the Ground Up Chapter 14 Lights and Materials - Shading that uses both diffuse and specular reflection.
You can use the Phong reflection model wikipedia link
Hand-in
You will hand in your code and 2 images:
- One rendering of a scene with a lot of spheres…feel free to add other stuff if you wish.
- One rendering of an interesting triangle mesh…feel free to add other stuff if you wish.
Both images should exhibit:
- Shadows
- Diffuse and specular reflection
- Lighting using point lights
You also need to write a brief technical report that briefly describes which acceleration structure you implemented.
Write one paragraph and include a table that shows the time required to render the following:
- Rendering the mesh without acceleration
- Rendering the mesh with acceleration
- Rendering three different scenes with a growing number of spheres
For eample, 100 spheres, 1000 spheres, and 10,000 spheres would be reasonable.
Include a README.txt file in which you list all pieces of code you did not write.
This includes any libraries, source code downloaded, or source code you typed in or adapted from a listing you read.
Please use something like the following format 1. Name-Of-Piece-Of-Code URL-to-Source
Hand-in will be done on Compass.
Resources
Note that these meshes may need to be scaled and translated to work with easily. You can do so as pre-processing step or you can implement affine transformations in your renderer…see Ray Tracing from the Ground Up Chapter 20 Affine Transformations
Rubric
Feature | Points |
---|---|
Acceleration Structure | 5 |
Rendering a Mesh | 4 |
Point Light | 1 |
Diffuse and Specular Shading | 1 |
Shadows | 1 |
Technical Report | 3 |
TOTAL | 15 |