Lecture
Radiosity algorithm
The radiosity algorithm considers a special case of solving the illumination equation, in which the materials are diffuse. A material is called diffuse if all the energy reflected from its surface is scattered uniformly in all directions. The BRDF of diffuse materials is equal to a constant, so the integral in the illumination equation takes a simpler form.
(4)
In practice, materials are far from always diffuse, and there may be a case where the BRDF has several maxima (in the English-language literature, such materials are called glossy materials). Figure 4 demonstrates various types of materials.

Figure 4 – Various types of materials
Another important limitation is the requirement that the system be closed, i.e. the total energy in the system must be conserved (which, generally speaking, is mandatory in the illumination equation). Therefore, if it is necessary to model a scene in which all materials are specified using the Phong model, the radiosity algorithm will not be suitable for two reasons. The first – in the general case the materials will not be diffuse. The second – the Phong model does not conserve energy. Let us proceed to consider the classical scheme of the radiosity method.
At the first stage of the algorithm, all surfaces of the scene are divided into patches. A patch is an elementary unit of surface. Discretizing the surface into patches allows the integral in the illumination equation to be replaced by a finite sum of integrals of a special form. Each such integral, called a form factor, specifies the mutual influence of two individual patches (i.e. how much energy transfers from one patch to another). If we know the value of each form factor (for every pair of patches), the image synthesis process reduces to solving a system of linear algebraic equations. The main difficulty in the algorithm is calculating the form factors. Figure 5 shows the formula for calculating the form factor and its explanation.

Figure 5 – The formula for calculating form factors and its explanation
As mentioned above, the radiosity algorithm requires a method for calculating the form factor. Let us first consider the hemicube algorithm. The algorithm is based on the so-called Nusselt analogy. According to this analogy, the form factor can be calculated in a purely geometric way. Consider some differential patch (an element of the patch subdivision) and some sphere centered on this patch (Figure 6). Now take the second patch, for which we will calculate the form factor, and project it onto this sphere. Project the resulting projection onto the plane of the first patch and divide it by the area of the circle. Performing these operations for all differential patches and summing the results, we obtain the value of the form factor. In the hemicube algorithm, to speed up the calculation of the patch's projection onto the sphere, the sphere is replaced by an approximating cube. This makes it possible to substantially increase the speed of the algorithm on existing hardware, but sometimes this comes at the cost of quality.

Figure 6 – Approximation of a sphere by a cube in cross-section (left) and the resulting artifacts (right)
Comments