What is Radiosity?
To quote Allen MartinWorchester Polytechic Institute:
"Radiosity is a method of rendering based on an detailed analysis of light
reflections off diffuse surfaces. The images that result from a radiosity
renderer are characterized by soft gradual shadows. Radiosity is typically
used to render images of the interior of buildings, and can achieve extremely
photo-realistic results for scenes that are comprised of diffuse reflecting surfaces."
What do we have here:
What we have here is an applet which shows how radiosity images are calculated. Once you run
the applet you will see lines of varying colors. The color of the line is only there to show the
generation of the ray. Every time a ray is reflected it becomes a generation older. Another
thing to keep in mind is that because these are diffuse surfaces every reflection of a ray would
result in many rays being created with a fraction of the energy of the original. In order to keep
things simple I have only shown one of the reflected rays. The resulting pattern of rays are what
would be computed inside of the radiosity engine. Each point of in the final image would be calculated
with sum of the intensities of each ray at a particular point, in RGB of course.
To create your scene, pick a few of the objects on the right side of the applet and place them in the black
drawing area. If you want to create your own shape use the User Defined Polygon button. This must be
a closed shape. To finish it, simply click on the first point you added.
The objects allow you to change some of there properties once you have placed them. Of special importance is
the objects reflexivity. This is the percent of the energy which the object does not absorb. If an object
has reflexivity 0.00, all ow the energy will be absorbed. When you are satisfied with an object you MUST hit Set.
You may also use remove to cancel.
Don't forget to place a light source. A room is pretty boring with no light coming in.
You may also change the number of rays the program generates and the max number of generations to take each ray
by clicking the Main Program Settings button. The max generations for a ray is 6. As for the number of rays,
it will generate as many rays as you like. You must hit return after you enter these numbers for them to be accepted.
When your scene is set click on the show radiosity trace button and watch things go...
A ray will stop when it's energy drops below a specified level, or it is six generations old.
Main bug: Circle does not work. I have not been able to find a good, efficient method to calculate the intersection
of a ray and a circle. Therefore, rays go through circles. This will be fixed when I have time. Any suggestions on
a good fix are welcomed.
Next Bug: Because some of the vectors are so small they can suffer from floating point error. Every once in a while
you will get a ray that goes through a surface instead of reflecting. When this happens you will usually get
several of them on the same side of the surface. No big deal...it's only Java.