Classic radiosity LiU, ITN, TNCG15 Ali Khashan,
[email protected] Fredrik Salomonsson,
[email protected] VT 10 Abstract This report describes how a classic radiosity method can be solved using the hemicube method to calculate form factors and sorting for optimizing. First the scene is discretized by subdividing the faces uniformly into smaller faces, called patches. At each patch a hemicube is created where the scene is projected down onto the current hemicube to determine the visibility each patch has. After the scene has been projected onto the hemicube form factors are calculated using the data from the hemicube, to determine how much the light contribution from light sources and other objects in the scene. Finally when the form factors has been calculated the radiosity equation can be solved. To choose witch patch to place the hemicube onto all patches are sorted with regard to the largest unshot energy. The patch that comes on top at iteration of the radiosity equation is the one which the hemicube is placed onto. The equation is solved until a convergence of radiosity is reached, meaning when the difference between a patch’s old radiosity and the newly calculated radiosity reaches a certain threshold the radiosity algorithim stops. After the scene is done Gouraud shading is applied to achieve the bleeding of light between patches and objects. The scene is presented with a room and a few simple primitives using C++ and OpenGL with Glut. The results can be visualized by solving the radiosity equation for each of the three color channels and then applying them on the corresponding vertices in the scene.