A solver for the progressive refinement radiosity method in C++.
Uses OpenGL, GLFW, GLM and GLEW (included).
This code is a slightly modified version of the one from my master's degree thesis. It's an implementation of the progressive refinement method for calculating the radiosity values for a scene. The form-factor calculation is done via a Monte-Carlo integration method, as described in the book "Radiosity and Realistic Image Synthesis", Michael F. Cohen, John R. Wallace, ISBN 0-12-059756-X
The program reads scenes in the standart .obj format with an added .mtl file for materials, directly exported from Blender. A light source can be anything, with an applied material with an illum = 0 parameter in the .mtl file.
To make a light source with Blender, make a new material, remove all specular color from it and tick the "Shadeless" box. This sets the illum parameter to 0 in the mtl file. Then simply apply this material to whatever you need to be a light emitter.
Have a look at ArgParser.h to see the optional command line parameters and their default values.
To run the program, simply drag an .obj file onto the run.bat script in the Release folder.
S subdivides the surfaces of the scene, R resets the scene, D saves a screenshot and I performs 1 iteration of the radiosity solution.
The program does not perform correct color interpolation for the final rendering since I didn't have time to finish it. The calculated radiosity values must be lineary interpolated at the end of the final iteration and that should probably fix it... Or perhaps do some shader magic...
I've hard coded the initial light source intensity. There is sertainly a better way of doing this but hey, it got me by :D
Feel free to use this code any way you like.