				     rad
			      a radiosity program

				Philippe Bekaert
			Computer Graphics Research Group
			 Department of Computer Science
				  K. U. Leuven



			        October, 20 1995		


Features:
---------

- It does both shooting (progressive refinement radiosity) and
  gathering (Gauss-Jacobi, compile with -DGAUSS_SEIDEL if you want
  Gauss-Seidel, but personally, I like Gauss-Jacobi more)
- Hierarchical refinement if you like (for both shooting or gathering)
- Importance-driven if you like (for both shooting or gathering)
- Formfactor computation by numerical integration. The ray-casting
  for visibility determination is accelerated by using hierarchical bounding
  boxes, shadow caching and shaftculling.
- handles both triangles and (convex) quadrilaterals.
- T-vertex elimination and many other rendering options.
- reads Greg Wards MGF scene description files (see 
  http://radsite.lbl.gov/mgf/HOME.html)
- a more or less nice interface and interactive view manipulation.
- ...

Missing features (we are working on it)

- higher order bases (call it wavelets if you combine it with hierarchical
  refinement) on both triangles and (convex) quadrilaterals. 
- texturing 
- clustering 
- some form of discontinuity meshing
- Monte-Carlo radiosity (for BIG scenes)
- a nicer interface and a more original name for the program
- ...


Platforms:
----------

- Sun Sparcstation 20/ZX (Solaris + Nth Portable GL, a commercial Iris GL 
  clone or SUN-PEX)
- Linux with VOGL (see e.g. http://www.cs.kuleuven.ac.be/~philippe/vogl/)
  or the Sample PEX implementation.
- There have been reports that it compiles and runs well on Silicon Graphics
  machines as well.

Requires Motif, GNU make (or some other make that offers the .include
feature, unless you change the Makefiles a bit) and an ANSI-C compiler 
(I used gcc 2.7.0 for the development).


Compiling and installing:
-------------------------

- to make it:

	1) cp Config.[Solaris,Linux] Config
	2) edit Config and change (paths ...) if necessary
	3) make depend	(required!)
	4) make

The executable is named 

	rad

Note: use GNU make or another make that offers the .include feature

- the program uses X applications defaults in the file called 

	Rad

Make sure the path to the directory containing this file is in your 
XAPPLRESDIR environment variable. What I do: I add . (current directory) to 
XAPPLRESDIR and often invoke rad from the directory where the sources 
(and Rad) live.


Running it:
-----------

- on Solaris/NPGL: a number of environment variables, paths ... need to be 
	set. Check the npgl installation manual or have a look at the 
	npgl_setup script. That's the script we use to set the paths.

- Type

	rad

A (by default) 800x600 pixels large window (with black background) appears. 
On top of this window is a menubar. It should be quite intuitive how to use 
the program. And if you don't think so, there is a 'Help' button that you 
should click to get some more information.


Bugs:
-----

A number of bugs are known. I am not (yet) aware of others. Some bugs are
bad and I'm working on them, others have very low priority. Report anything 
you think it is a bug to me however. 

If you are using PEX importance and saving the image will not work. 
PEX support is incomplete indeed. Use Iris GL (or a clone) if you can.
The only real advantage of PEX for me is that I can do the computations
on some other fast machine with a lot of memory while displaying the results
on the console of the SUN SPARCStation 20 with ZX graphics board on my desk.
Note that the Sample PEX Implementation does not even do Gouraud interpolation
or Z-buffering (SUN-PEX does, but it can't render in a multibuffer drawable
it seems, so: forget double buffering). I implemented a Painters algorithm 
if Z-buffering is not available. It is a very known fact that the painters 
algorithm for hidden surface elimination doesn't do hidden surface 
elimination well in many cases (but it is easy to implement and still 
better than nothing, so...).


Disclaimer:
-----------

No warranty whatsoever. Use at your own risk. This is some code I use to 
test new radiosity strategies with. Some master thesis students are working
on it as well. THIS CODE IS NOT PUBLIC DOMAIN AND YOU ARE NOT ALLOWED TO 
DISTRIBUTE IT FURTHER. The Katholieke Universiteit Leuven (that's in Belgium,
somewhere in Europe) owns all the rights. You are allowed to play a bit with
it for personal purposes or for doing your research. If you are interested in
using this software (or parts of it) for commercial purposes or as part of 
some other program you want to distribute yourself (for free or not), you
should contact the author. 


Suggestions, comments, bug-reports ....:
----------------------------------------

Send it to:

	Philippe Bekaert
	Computer Graphics Research Group
	Department of Computer Science - K. U. Leuven
	Celestijnenlaan, 200A
	3001 Heverlee - Belgium

	e-mail: Philippe.Bekaert@cs.kuleuven.ac.be
		






