3. The Hemicube Calculations - The cube of all things !

The hemicube is central to the radiosity process. The hemicube is used to calculate in a shape dependent manner (i.e keeping the shape of the objects in mind) the amount of energy other patches receive from the patch the hemicube is centered on. The hemicube here is implemented using a neat OpenGL method described below -


  1. The Indexed Model -
    The scene is compiled into a display list where each patch is given a different color. So a patch can be uniquely indexed using its color value. This is called an indexed model.

  2. Form Factor Calculations (Trusty GL does nearly everything) -
    The hemicube is placed on a patch which is the current emitter. The hemicube has a resolution equal to the preview window. Form factors for each divison on the hemicube is precalculated and stored. Now a OpenGL camera is placed at the center of the patch in question and made to look along the hemicube axes. Now the indexed model is rendered. Whatever the camera sees (which gets recorded in the framebuffer) is the projection of the target patches onto the hemicube along the axes direction. Adding up the form factors for the pixels in the framebuffer which have the same color gives the form factor for the patch indexed by that color. So GL does nearly all the hard work. All is required is a bit of book-keeping and a few additions. The hemicube geometry looks something like this -
    Figure 1


[ Back ]




Page last updated on 28 January, 2004. pialpharhoalphagammaAT cse.iitd.ac.in © Parag Chaudhuri , 2009
DCSE, IIT Delhi Valid HTML 4.0! Valid CSS! yahoo