In this project we will use Monte Carlo ray tracing for computing global illumination.
Requirements
Monte Carlo sampling for indirect illumination with a single bounce.
Optional: You can implement indirect illumination as a new ambient light source type. Given a point and a surface normal, the Illuminate method of this light source generates Monte Carlo samples over the hemisphere and returns an average light intensity. This average is computed by weighting each sample using the geometry term.
XML Scene Format
In the XML scene format we add an emission color to the Blinn material. This parameter allows any object act like a light source.
The following source code files are provided to help you with this and upcoming projects. You are not required to use them, but it is highly recommened that you use them and refrain from modifying them. Some of these files include additional code as compared to the same files in the previous project, so make sure to download them all again.
xmlload.cpp: Includes the LoadScene() function that parses a given scene XML file using the TinyXML library.
scene.h: Includes an irradiance computation map for the RenderImage.
materials.h: Includes an emmision parameter for the Blinn material.
viewport.cpp: OpenGL based preview and user interface launched by calling the ShowViewport() function. It requires GLUT or FreeGLUT. This allows rotating the camera (for viewing only) and displaying the irradiance computation image.
Test Scenes
The following scene files are provided to help you test your implementation. You can also prepare other scenes to show your work.
Cornell Box: A Cornell box scene with a Utah teapot and a sphere.
Skylight Teapot: A teapot on a plane illuminated by a skylight from enviroment.
Optional Feature Suggestions
Multiple bounces for indirect illumination.
Quasy Monte Carlo sampling for indirect illumination.
Inverse square fall off for point lights and indirect illumination.
Gamma correction.
References
[Kajiya 1986]
James T. Kajiya. 1986. The rendering equation. In Proceedings of the 13th annual conference on Computer graphics and interactive techniques (SIGGRAPH '86), David C. Evans and Russell J. Athay (Eds.). ACM, New York, NY, USA, 143-150.