Building a learning unit for radiosity
Author: Tobias Boldte, March 2004
The task of the project was to create a learning unit for radiosity calculation. This learning unit will be used as part of the GRAPA course. It provides the students with an object oriented program skeleton. This skeleton has to be extended by them in course of the two weeks this practical part will be processed. The implementation languages are C++ and OPENGL.
The target of this learning unit is to teach the students more about the radiosity principles and object orientation. They learn how radiosity works and how to structure a radiosity calculator.
The radiosity calculation is implemented as follows: Before solving the radiosity equation all formfactors are calculated using a hemicube. In the program skeleton the projection of the patches onto the sides of the hemicube is realized as a software solution. This solution has to be replaced by using the graphics hardware. The students shall implement the formfactor calculation in a very efficient way by using an offscreen buffer for rendering. For that I provide them with a class that creates a p-buffer they can use for rendering. To get good results we also have to invent a meshing strategy to mesh the scene in a good way for radiosity calculation. In the program skeleton there is no meshing strategy implemented. In course of the practical an adaptive meshing strategie has to be supplemented. For that a so-called discontinuity meshing is the best solution: Neighboured patches which have a too large radiosity discontinuity after a radiosity calculation are subdivided before a new radiosity calculation is started.
The radiosity calculater is structured in classes as the functionality demands: a radiosity class for radiosity calculation (solving the radiosity equation), a hemicube class to calculate the formfactors, a class for the precalculation of the deltaformfactors, a scene class that manages the scene format and reading and writing to disk, a patch class for creating patches, ...
The program skeleton allows the students to read a scene in Open Inventor format, make simple radiosity calculation for that scene and view the result with an Open Inventor viewer. For debugging and testing the correctness of their solutions the students get eight reference scenes. The results I got for these scenes with my reference solution can be seen on the right side. In the image gallerie you can download the results in inventor format. You can behold these view independent results with your inventor viewer (for example ivview on linux systems). For more informations please download the assignment below.