[WML-Source: radiosity.wml][TOC][Part00]

[chapter]Dunno...

[section]Radiosity

Most rendering models, including ray-tracing, assume a simplified spatial model, highly optimised for the light that enters our 'eye' in order to draw the image. You can add reflection and shadows to this model to achieve a more realistic result. Still, there's an important aspect missing!

When a surface has a reflective light component, it not only shows up in our image, it also shines light at surfaces in its neighbourhood. And vice-versa. In fact, light bounces around in an environment until all light energy is absorbed (or has escaped!).

  [images/rad01.jpg]

In closed environments, light energy is generated by 'emittors' and is accounted for by reflection or absorption of the surfaces in the environment. The rate at which energy leaves a surface is called the 'radiosity' of a surface.

Unlike conventional rendering methods, radiosity methods first calculate all light interactions in an environment in a view-independent way. Then, different views can be rendered in real-time.

In Blender, Radiosity is more of a modeling tool than a rendering tool. It is the integration of an external tool and still has all the properties (and limits) external tools.

The output of Radiosity is a Mesh Object with vertex colors. These can be retouched with the VertexPaint option or rendered using the Material properties "VertexCol" (light color) or "VColPaint" (material color). Even new Textures can be applied, and extra lamps and shadows added.

Currently the Radiosity system doesn't account for animated Radiosity solutions. It is meant basicall for static environments, real time (architectural) walkthroughs or just for fun to experiment with a simulation driven lighting system.

[subsection]GO! A quickstart

(Does the manual contain a CD? Then make a reference here-cw-)
There's a new tutorfile at the ftp download which includes 3 examples for Radiosity: ftp:/ftp.blender.nl/pub/tutor_1.6.tgz<

  1. Load the file called "radio.blend" from the 1.6 tutor. You can see the new RadioButtons menu displayed already.
  2. Press the button "Collect Meshes". Now the selected Meshes are converted into the primitives needed for the Radiosity calculation. Blender now has entered the Radiosity mode, and other editing functions are blocked until the button "Free Data" has been pressed.
  3. Press the button "GO". First you will see a series of initialisation steps (at a P200, it takes a few seconds), and then the actual radiosity solution is calculated. The cursor counter displays the current step number. Theoretically, this process can continue for hours. Fortunately we are not very interested in the precise correctness of the solution, instead most environments display a satisfying result within a few minutes. To stop the solving process: press ESC.
  4. Now the Gouraud shaded faces display the energy as vertex colors. You can clearly see the 'color bleeding' in the walls, the influence of a colored object near a neutral light-grey surface. In this phase you can do some postprocess editing to reduce the number of faces or filter the colors. These are described in detail in the next section.
  5. To leave the Radiosity mode and save the results press "Replace Meshes" and "Free Radio Data". Now we have a new Mesh Object with vertex colors. There's also a new Material added with the right proprties to render it (Press F5 or F12).
The same steps can be done with the examples "room.blend" and "radio2.blend".

  [images/rad02.jpg]

[subsection]The Blender Radiosity method

During the later eighties and early nineties radiosity was a hot topic in 3D computer graphics. Many different methods were developed. The most successful solutions were based at the "progressive refinement" method with an "adaptive subdivision" scheme.

(Recomended further reading: the web is stuffed with articles about radiosity, and almpost every recent book about 3D graphics covers this area. The best still is "Computer Graphics" by Foley & van Dam et al.).

To be able to get the most out of the Blender Radiosity method, it is important to understand the following principles:

[point]Finite Element Method

Many computer graphics or simulation methods assume a simplification of reality with 'finite elements'. For a visual attractive (and even scientifically proven) solution, it is not always necessary to dive into a molecular level of detail. Instead, you can reduce your problem to a finite number of representative and well-described elements. It is a common fact that such systems quickly converge into a stable and reliable solution. The Radiosity method is a typical example of a finite element method.

[point]Patches and Elements

In the radiosity universe, we distinguish between two types of 3D faces:
  1. Patches. These are triangles or squares which are able to send energy. For a fast solution it is important to have as few of these patches as possible. But, because the energy is only distributed from the Patch's center, the size should be small enough to make a realistic energy distribution. (For example, when a small object is located above the Patch center, all energy the Patch sends then is obscured by this object).
  2. Elements. These are the triangles or squares used to receive energy. Each Element is associated to a Patch. In fact, Patches are subdivided into many small Elements. When an element receives energy it absorbs part of it (depending on the Patch color) and passes the remainder to the Patch. Since the Elements are also the faces that we display, it is important to have them as small as possible, to express subtle shadow boundaries.

[point]Progressive Refinement

This method starts with examining all available Patches. The Patch with the most 'unshot' energy is selected to shoot all its energy to the environment. The Elements in the environment recieve this energy, and add this to the 'unshot' energy of their associated Patches.

Then the process starts again for the Patch NOW having the most unshot energy.

This continues for all the Patches until no energy is received anymore, or until the 'unshot' energy has converged below a certain value.

[point]The hemicube method

The calculation of how much energy each Patch gives to an Element is done through the use of 'hemicubes'. Exactly located at the Patch's center, a hemicube consist of 5 small images of the environment. For each pixel in these images, a certain visible Element is color-coded, and the transmitted amount of energy can be calculated. Especially by the use of specialized hardware the hemicube method can be accellerated significantly.

In Blender, however, hemicube calculations are done "in software".

This method is in fact a simplification and optimisation of the 'real' radiosity fomula (form factor differentiation). For that reason the resolution of the hemicube (the number of pixels of its images) is important to prevent aliasing artefacts.

[point]Adaptive subdivision

Since the subdivision of a Mesh defines the quality of the Radiosity solution, automatic subdivision schemes have been developed to define the optimal size of Patches and Elements.

Blender has two automatic subdivision methods:

  1. Subdivide-shoot Patches. By shooting energy to the environment, and comparing the hemicube values with the actual mathematical 'form factor' value, errors can be detected that indicate a need for further subdivision of the Patch. The results are smaller Patches and a longer solving time, but a higher realism of the solution.
  2. Subdivide-shoot Elements. By shooting energy to the environment, and detecting high energy changes (frequencies) inside a Patch, the Elements of this Patch are subdivided one exta level. The results are smaller Elements and a longer solving time and probably more aliasing, but a higher level of detail.

[point]Display and Post Processing

Subdividing Elements in Blender is 'balanced', that means each Element differs a maximum of '1' subdivide level with its neighbours.

This is important for a pleasant and correct display of the Radiosity solution with Gouraud shaded faces.

Usually after solving, the solution consists of thousands of small Elements. By filtering these and removing 'doubles', the number of Elements can be reduced significantly without destroying the quality of the Radiosity solution.

Blender stores the energy values in 'floating point' values. This makes settings for dramatic lighting situations possible, by changing the standard multiplying and gamma values.

[point]Rendering and integration in the Blender environment

The final step can be replacing the input Meshes with the Radiosity solution (button "Replace Meshes"). At that moment the vertex colors are converted from a 'floating point' value to a 24 bits RGB value. The old Mesh Objects are deleted and replaced with one or more new Mesh Objects. You can then delete the Radiosity data with "Free Data".

The new Objects get a default Material that allows immediate rendering. Two settings in a Material are important for working with vertex colors:


-cw- Last modified: Fri Aug 18 15:25:35 CEST 2000