Radiosity Demo

Questo e’ un estratto da Chimera che dimostra la generazione di lightmaps usando il processo di radiosity interno, l’immagine sopra rappresenta la demo funzionante che potete scaricare qui:

Scarica (0.5MB, eseguibile per Windows 7+)
Scarica (1.4MB, app per 10.7+, certificata)

La spiegazione che segue e’ estratta dal manuale di Chimera (che e’ in inglese).

About Radiosity:
Radiosity assures the full handling of global illumination, shadows generation and efficient light distribution however, like any other raytracing legacy process, it is very slow.
A common trick is to calculate radiosity not per point (“pixel” of a surface) but per vertex, then use OpenGL blending capabilities to interpolate color/luminance value between vertices.

This involve multiple, faster, pass first reiterating vertices segmentation (at least until shadows are generated..):


then accumulating values using multiple pass:


in this demo the result, using only vertices (and not single points) in three step requires less than 0.5 seconds to generate decent lightmaps:

In this demo the exe calculate and saves the generated lightmap texture for every object.
This way when you launch the scene again you can use the lightmap from the previously processed scene WITHOUT having the radiosity processor redo all the calculations from start.
Lightmaps textured are stored in the DATA folder, named <obj>_xx_LITE.PNG.