Radiosity A Fascinating Presentation by Alex Danilevky
The Very General Idea ● Discretize your environment into n patches and calculate how they interact with each other. ● Use those values to calculate radiosity values for the patches and then we can generate an image...
What is Radiosity? ● First lets go through a few Radiometry definitions: – Radiant energy Q, is the energy of a collection of photons – Radiant flux Φ, is a change in radiant energy / time ● Φ = dQ / dt – Radiant flux area density is dΦ / dA ● This can be separated into two parts – Radiant exitance M, is the flux leaving a surface. – Irradiance E, is the flux arriving at a surface. ● Radiant exitance M = Radiosity B!!
Form Factors ● F ij is the fraction of the power leaving patch i that arrives at patch j. ● These values are based on the geometry of the scene and are therefore the same no matter where your eye is.
The Radiosity Equation ● B i = E i + p i {SUM from 1 to n}(B j F ij ) – E i = the light emmitted (light sources) – p i = diffuse reflectance – F ij = form factor ● HUGE assumption is that all surfaces are lambertian and that the radiosity over a patch is constant.
Overview
Computing Form Factors ● Matrix Radiosity (Gathering) – Hemicube approximation – Solving the system of equations ● Jacobi Iteration ● Gauss-Seidel Method ● Progressive Refinement Radiosity (Shooting) – Pick patch with the most energy and shoot rays to all the other patches, updating form factors while we're shooting. Repeat until image is accurate.
How does all this help us? ● First we rearrange some terms: – B i = E i + p i SUM(B j F ij ) – B i -p i SUM(B j F ij ) = E i ● Keep in mind that these are matrices where B and E are nx1 and F is nxn. Rewritten again the second equation looks like this:
The Hemicube ● Break up each face of the cube into cells which have precomputed form factor values ● Project surfaces onto the hemicube.
Hemicube ● Sum the form factors of the cells the surface is projected onto and use this value for the form factor F ij between the patch the hemicube is surrounding (j) and the patch that was projected onto it (i).
Progressive Refinement ● Pick patch with greatest energy – “Shoot” rays to each of the other patches and update their form factor and radiosity values as you go along. – Loop until you have a good solution.
Progressive Refinement cont... Passes 1, 2, 3, 4 and 16
A Two-Pass Approach ● Combines radiosity and ray tracing... ● Intensity out = E out + I diffuse + I specular ● Preprocess uses a modified version of the radiosity algorithm that takes into consideration the interaction between diffuse and specular surfaces. – Does so just enough to get accurate diffuse terms – Compute extra form factors that treat specular surfaces as additional routes which light can reach diffuse surfaces by.
Two-Pass Approach cont... ● Postprocess completes the solution for a given view. – Now we can efficiently calculate the specular components and add them to the diffuse terms to get accurate intensity values. ● Other hybrid techniques exist. – Use radiosity results for indirect lighting – Generate radiosity results on low resolution versions of the scene to limit computation.