Before reading this very first blog entry I will like to inform the reader that knowledge about the radiosity algorithm may be helpful in order to follow the various discussions and derivations.
Introduction
In this entry I will show that the classical radiosity equation always can be rewritten such that the linear system has a system matrix, which is symmetric and positive definite. A symmetric positive definite matrix can be Cholesky decomposed, which enables the system to be solved with an arbitrary emission configuration using backsubstitution. This way the radiosity algorithm gets extremely stable numerically and faster than traditionally matrix solvers.
The motivation for making research in the rather old radiosity equation [6] is that a rearrangement of the equation of this type makes the radiosity algorithm competitive to the irradiance caching method [2] used in the photon mapping technique. I will leave that discussion for a later blog entry and for now just show how to rewrite the radiosity equation. I will however leave some final words in the conclusion.
From the Rendering Equation to the Classical Radiosity Solution
The derivation from the Rendering equation [5] to the Classical radiosity solution can be found in many text books (see for example [2,3,4]). To keep it short the idea is to express the rendering equation as an integral over surface locations and exploit that the radiance is constant in all directions making it possible to express the equation using radiant existance instead of radiance. Finally, it is discretized into a linear system of equations yielding:

where
,
, and
denotes the radiosity (radiant exitance), the emitted power per area, and the reflectance of element i, respectively, while
denotes the form factor from element i to element k. The radiosity equation can be written in matrix notation as:
B=E)
This equation expresses then the energy transfer between n pure diffuse elements.
Rewriting the Radiosity Equation
I will show that the system matrix
can be rearranged so it is symmetric; thereby reducing the storage requirements to about n^2/2 elements. Furthermore the result can be shown not only to be symmetric, but also positive definite, which enables us to perform a Cholesky decomposition [1]. This is decomposition is really neat, since it is extremely stable numerically and enables one of the fastest ways to solve a linear system of equations exact.
First we note that the equation can be written as,

where
is a matrix containing the diffuse reflectance’s in its diagonal. Second, we exploit the reciprocity relation,
,
to form a new matrix, which we know is symmetric:

Using this new matrix it is possible to rewrite the linear system of equations such that the system matrix is symmetric:
B=E\quad\Leftrightarrow\quad\left(A\rho^{-1}-F_a\right)B=A\rho^{-1}E)
where
is a matrix containing the areas of the elements in the diagonal. Note that the right hand side is known and very easy to compute since
and
are diagonal matrices. The symmetric system matrix and right hand side vector now have the form:
and 
The reader has maybe by now noticed that I have chosen
for all i. There is no particular reason for this, since the matrix still would be symmetric if the self-interaction was included (I have chosen this to simplify further derivations).
The new system matrix is positive definite if and only if all leading principal minors of the matrix are shown to be positive [7]. Let us consider the first three minors:
1.
, is always true since the reflectance is positive and the area is positive.
2.
, is always true if the reflectance’s and the form factors are constrained to lie in the domain
.
3. 

, unfortunately this determinant is not necessarily positive!
Fortunately, it is possible to exploit the structure of the matrix equation and some basic rules of matrix determinants to ensure that that this determinant and the higher order leading minors always are positive. Lets consider the case where the determinant of the 3×3 matrix is negative (given by case 3). In this case we can multiple row 3 or column 3 of the matrix without making any impact on the previously computed determinants. It is thereby possible to use the theorem saying:
If the matrix B comes from matrix A by multiplication of a row with a constant k, then 
In the present case choosing k=-1 will imply a positive determinant of the 3×3 matrix. A similar argument can be used for the n’th leading minor. It is now just a matter of bookkeeping the multiplied rows, which can be done by introducing a diagonal matrix:
)
Multiplying the new radiosity equation on both sides yields:
B=PA\rho^{-1}E)
This system looks complicated, but is in fact pretty straight forward and has a system matrix, which always is symmetric positive definite!
Solving Using Cholesky Decomposition
It is possible to perform a Cholesky decomposition on the new system matrix
,
since it always will be symmetric positive definite. However, one important note is that the coefficients of the matrix P should be in cooperated into the Cholesky decomposition and will demand that the arbitrary right hand side vector is multiplied by the respective coefficients. This in cooperation is, however, easily done and the cost of multiplying the P matrix with the right hand side is O(N), which can be combined with the inevitable multiplication of the area and inverse reflectance.
The overall operation count for the Cholesky decomposition is N^3/6 executions of the inner loop (consisting of one multiply and one subtract), with also N square roots [1]. This is not a very pleasing count. Fortunately, the system can be solved with an arbitrary patch emission vector once the Cholesky decomposition is known by performing two executions of the backsubstitution algorithm.
Instead of solving the full radiosity matrix for the exact solution for all elements in a given scene using the above method or some other matrix solving technique, the problem has been confronted with different numerical matrix solvers, which I just want to mention the names of so you can Google them: Jacobi iteration, Gauss-Seidel iteration, Southwell iteration, and progressive refinement. Note that solving the complete radiosity system exact has a storage requirement, which goes as O(N^2), which is unacceptable nowadays where the polygon count (and tessellation into elements) is greater than the memory can handle.
Final Words
Even through the execution count and memory consumptions for the Cholesky decomposition does not seem pleasing at first sight it can be shown that the radiosity at an arbitrary location in the scene can be computed in O(N) time if the full system has been solved in before hand. (where N is the size of the system). The storage requirements can be shown to be in the order of O(N). These facts are the main topics in one of my next blog entries and are the reasons why the radiosity algorithm gets competitive to the irradiance caching method. The whole discussion about form factor evaluation has been left out and I will maybe consider bringing them into the discussion also (since they are in fact the must computationally expensive). Much more about that later!
Another topic that could be interesting is how an arbitrary BRDF can be combined with the pure diffuse lighting solution obtained by solving the radiosity equation without violating the energy conservation. This is actually rather easy, but is not physically correct and I do not know whether it will provide nice images. However, introducing a specular component can not provide anything less interesting to an image consisting of pure diffuse surfaces.
It could also be interesting to consider how point light sources can be introduced correctly into the radiosity algorithm. Points in a finite element method does not make much sense, but in relation to real-time rendering, where point light sources are used a lot, this could be an interesting topic.
References
[1] http://www.nrbook.com/, Section 2.9 Cholesky Decomposition
[2] Henrik Wann Jensen, Realistic Image Synthesis Using Photon Mapping, 2001 http://graphics.ucsd.edu/~henrik/
[3] P. Hanrahan, Rendering concepts, In Cohen and Wallace, Radiosity and Realistic Image Synthesis, pp. 13-40
[4] Andrew Glassner, Principles of Digital Image Synthesis¸ January 15, 1995
[5] James T. Kajiya, The Rendering Equation, 1986
[6] Cindy M. Goral, Modeling the Interaction of Light Between Diffuse Surfaces, 1984
[7] http://en.wikipedia.org/wiki/Positive-definite_matrix
Copyright © Jakob Gath 2007