After this class you will be able to implement a recursive reflection of the view vector off objects and how to take that into account for the colour calculations.
- Extend the class raytracer.cpp so that you can set a maxTraceLevel for the raytracer
- Extend main.cpp so that it extracts the maximum trace level from the globalsettings and properly passes it on to the new function you implemented for the raytracer object.
- Implement the recursive reflection as discussed in class (also see the notes here).
- Make sure you take care of the numerical problems of intersection of the object with itself in the recursive steps.
- Test your code with this new scene file.
Your image should look similar to this:
- Implemet antialiasing by doing supersampling. Instead of shooting a ray through the center of each pixel, shoot several rays and average the results
- Learn more about supersampling here
- Use the antialiasing setting in the global_settings to control your super sampling.
This image was done using a (very simple) 5-point supersampling (center and four corners of the pixel). The devil is in the details. Look at the edges of the spheres to see the differences to the picture above.