- Radiosity
Radiosity is a
global illumination algorithm used in3D computer graphics rendering. Radiosity is an application of thefinite element method to solving therendering equation for scenes with purely diffuse surfaces. Unlike Monte Carlo algorithms (such aspath tracing ) which handle all types of light paths, typical radiosity methods only account for paths of the form LD*E, i.e., paths which leave a light source and are reflected diffusely some number of times (possibly zero) before hitting the eye. Radiosity calculations are viewpoint independent which increases the computations involved, but makes them useful for all viewpoints.Radiosity methods were first developed in about 1950 in the engineering field of
heat transfer . They were later refined specifically for application to the problem of rendering computer graphics in 1984 by researchers atCornell University [" [http://www.cs.rpi.edu/~cutler/classes/advancedgraphics/S07/lectures/goral.pdf Modeling the interaction of light between diffuse surfaces] ", C. Goral, K. E. Torrance, D. P. Greenberg and B. Battaile, "Computer Graphics", Vol. 18, No. 3.] .Notable commercial radiosity engines are Lightscape (now incorporated into the
Autodesk 3D Studio Max internal render engine), Radiozity byAuto*Des*Sys , and ElAS (Electric Image Animation System).Visual characteristics
The inclusion of radiosity calculations in the rendering process often lends an added element of realism to the finished scene, because of the way it mimics real-world phenomena. Consider a simple room scene.
The image on the left was rendered with a typical direct illumination renderer. There are three types of lighting in this scene, chosen and placed by the artist in an attempt to create realistic lighting: Spot Lighting with Shadows (to create the light shining on the floor), Ambient Lighting (without which the rest of the room would be totally dark), and Omnidirectional lighting without shadows (to reduce the flatness of the ambient lighting).
The image on the right was rendered using a radiosity algorithm. There is only one source of light, an image of the sky placed outside the window. The difference is marked. The room glows with light. Soft shadows are visible on the floor, and subtle lighting effects are noticeable around the room. Furthermore, the red color from the carpet has bled onto the grey walls, giving them a slightly warm appearance. None of these effects were specifically chosen or designed by the artist.
Overview of the radiosity algorithm
The surfaces of the scene to be rendered are each divided up into one or more smaller surfaces (patches).A
view factor is computed for each pair of patches. View factors (also known as "form factors") are coefficients describing how well the patchescan see each other. Patches that are far away from each other, or oriented at oblique angles relative to one another,will have smaller view factors. If other patches are in the way, the view factor will be reduced or zero, dependingon whether the occlusion is partial or total.The view factors are used as coefficients in a linearized form of the rendering equation, which yieldsa linear system of equations. Solving this system yields the radiosity, or brightness, of each patch,taking into account diffuse interreflections and soft shadows.
Progressive radiosity solves the system iteratively in such a way that after each iteration we have intermediateradiosity values for the patch. These intermediate values correspond to bounce levels. That is, after one iteration,we know how the scene looks after one light bounce, after two passes, two bounces, and so forth. Progressive radiosityis useful for getting an interactive preview of the scene. Also, the user can stop the iterations once the image looks goodenough, rather than wait for the computation to numerically converge.
Another common method for solving the radiosity equation is "shooting radiosity," which iteratively solves the radiosity equation by "shooting" light from the patch with the most error at each step. After the first pass, only those patches which are in direct line of sight of a light-emitting patch will be illuminated. After the second pass, more patches will become illuminated as the light begins to bounce around the scene. The scene continues to grow brighter and eventually reaches a steady state.
Mathematical formulation
The basic radiosity method has its basis in the theory of thermal radiation, since radiosity relies on computing the amount of light energy transferred among surfaces. In order to simplify computations, the method assumes that all scattering is perfectly diffuse. Surfaces are typically discretized into quadrilateral or triangular elements over which a piecewise polynomial function is defined.
After this breakdown, the amount of light energy transfer can be computed by using the known reflectivity of the reflecting patch, combined with the
view factor of the two patches. This dimensionless quantity is computed from the geometric orientation of two patches, and can be thought of as the fraction of the total possible emitting area of the first patch which is covered by the second patch.More correctly, radiosity is the energy leaving the patch surface per discrete time interval and is the combination of emitted and reflected energy:
:
where:
* "Bi" is the radiosity of patch "i".
* "Ei" is emitted energy.
* "Ri" is the reflectivity of the patch, giving reflected energy by multiplying by the incident energy (the energy which arrives from other patches).
* All "j" () in the rendered environment are integrated for "BjFji" "dAj", to determine the energy leaving each patch "j" that arrives at patch "i".
* "Fij" is the constant-valuedview factor for the radiation leaving "i" and hitting patch "j".The reciprocity:
:
gives:
:
For ease of use the
integral is replaced and uniform radiosity is assumed over the patch, creating the simpler::
This equation can then be applied to each patch. The equation is monochromatic, so color radiosity rendering requires calculation for each of the required colors.
The
view factor Fji can be calculated in a number of ways. Early methods used a "hemicube " (an imaginary cube centered upon the first surface to which the second surface was projected, devised by Cohen and Greenberg in 1985) to approximate the form factor, which also solved the intervening patch problem. This is quitecomputation ally expensive, because ideally form factors must be derived for every possible pair of patches, leading to a quadratic increase in computation with added geometry. New methods include adaptive integration [G Walton, "Calculation of Obstructed View Factors by Adaptive Integration", [http://www.bfrl.nist.gov/IAQanalysis/docs/NISTIR-6925.pdf NIST Report NISTIR-6925] ]Reducing computation time
Although in its basic form, radiosity is assumed to have a quadratic increase in computation time with added geometry (surfaces and patches), this need not to be the case. The radiosity problem can be rephrased as a problem of rendering a texture mapped scene. In this case, the computation time increases only linearly with the number of patches (ignoring complex issues like
cache use). Using a binary space partitioning tree can massively reduce the amount of time spent determining which patches are completely hidden from others in complex scenes.Since radiosity can be computed using standard texture mapping algorithms, it lends itself to acceleration using standard graphics acceleration hardware, available for a standard PC.
Advantages
One of the advantages of the Radiosity algorithm is that it is relatively simple to explain and implement. This makes it a useful algorithm for teaching students about global illumination algorithms. A typical direct illumination renderer already contains nearly all of the algorithms (
perspective transform ations,texture mapping ,hidden surface removal ) required to implement radiosity. A strong grasp of mathematics is not required to understand or implement this algorithm.Limitations
Typical radiosity methods only account for light paths of the form LD*E, i.e., paths which start at a light source and make multiple diffuse bounces before reaching the eye. Although there are several approaches to integrating other illumination effects such as specular [http://portal.acm.org/citation.cfm?id=37438&coll=portal&dl=ACM] and glossy [http://www.cs.huji.ac.il/labs/cglab/papers/clustering/] reflections, radiosity-based methods are generally not used to solve the complete rendering equation.
Basic radiosity also has trouble resolving sudden changes in visibility (e.g., hard-edged shadows) because coarse, regular discretization into piecewise constant elements corresponds to a low-pass box filter of the spatial domain. Discontinuity meshing [http://www.cs.cmu.edu/~ph/discon.ps.gz] uses knowledge of visibility events to generate a more intelligent discretization.
Confusion about terminology
Radiosity was perhaps the first rendering algorithm in widespread use which accounted for diffuse indirect lighting. Earlier rendering algorithms, such as Whitted-style
ray tracing were capable of computing effects such as reflections, refractions, and shadows, but despite being highly global phenomena, these effects were not commonly referred to as "global illumination." As a consequence, the term "global illumination" became confused with "diffuse interreflection," and "Radiosity" became confused with "global illumination" in popular parlance. However, the three are distinct concepts.The radiosity method in the current computer graphics context derives from (and is fundamentally the same as) the radiosity method in
heat transfer . In this contextRadiosity (heat transfer) is the total radiative flux (both reflected and re-radiated) leaving a surface, also sometimes known asradiant exitance . Calculation of Radiosity rather than surface temperatures is a key aspect of the radiosity method that permits linear matrix methods to be applied to the problem.References
External links
* [http://www.siggraph.org/education/materials/HyperGraph/radiosity/overview_1.htm Radiosity Overview, from HyperGraph of SIGGRAPH] (provides full matrix radiosity algorithm and progressive radiosity algorithm)
* [http://freespace.virgin.net/hugo.elias/radiosity/radiosity.htm Radiosity, by Hugo Elias] (also provides a general overview of lighting algorithms, along with programming examples)
* [http://web.cs.wpi.edu/~matt/courses/cs563/talks/radiosity.html Radiosity, by Allen Martin] (a slightly more mathematical explanation of radiosity)
* [http://www.cse.iitd.ernet.in/~parag/projects/CG2/asign2/report/RADical.shtml RADical, by Parag Chaudhuri] (an implementation of shooting & sorting variant of progressive radiosity algorithm with OpenGL acceleration, extending from GLUTRAD by Colbeck)
* [http://www.tralvex.com/pub/rover/abs-mnu.htm ROVER, by Tralvex Yeap] (Radiosity Abstracts & Bibliography Library)
* [http://dudka.cz/rrv Radiosity Renderer and Visualizer] (simple implementation of radiosity renderer based onOpenGL )
Wikimedia Foundation. 2010.