Hierarchical Radiosity Made Easy
A Simple, Practical, Robust, and Efficent Implementation
Kenneth E. Hoff III
COMP238 Final Project
Turner Whitted
Abstract
Despite the robustness, elegance, and superior asymptotic performance
advantage offered by hierarchical radiosity solutions, it seems that it
is not frequently used in most basic radiosity systems because of its apparent
complexity in both conception and implementation. In this project, I present
a clean, simple, detailed, and intuitive explanation and implementation
of a simple hierarchical radiosity system upon which further research can
be easily conducted.
The Paper
The actual written paper describing this project can be obtained here
pkzipped in MS Word 7.0 format.
What I actually accomplished
-
implementation of the hierarchical radiosity algorithm as described by
Pat Hanrahan in his '91 SIGGRAPH paper.
-
found several places where the algorithm could be restructured for efficiency
-
used a simpler and much faster form factor calculation and showed that
it is sufficient under the hierarchical scheme. This supports the theory
I had that the hierarchical method drives the subdivision in order to increase
the accuracy of even crude form factor approximations.
-
demonstrated that using a very crude one ray sampling for visibility and
a simple differential-to-finite area form factor calculation can be sufficient
in obtaining fast and accurate results.
-
created a viewing system that demonstrates all aspects of the algorithm
at work: gathering and shooting radiosity at various levels, the meshing,
the link structure at various levels, etc.
-
devised a strategy using OpenGL and GLUT that will facilitate background
solver iterations that could place more emphasis on the solution building
depending on the level of user interaction. In other words, when the user
is interacting with the model, the radiosity solver demands are at a minimum;
when the system is idle, the solver continues iterating.
-
integrated a very complete viewing system that allows for various levels
of user-manipulation of the model (trackball, drive, fly, etc).
-
tested and gathered statistics on a wide variety of simple models.
-
wrote an elaborate paper fully describing the motivation for the hierarchical
method along with a complete description of our implementation.
Demonstration of Link Hierarchy Building
Higher Quality Output and Reconstruction
The Demo Source Code
-
hierarchical radiosity solver modules: hrsolver.hpp,
hrsolver.cpp
-
link hierarchy building modules: hrfflink.hpp,
hrfflink.cpp
-
triangular patch quadtree modules: patch.hpp,
patch.cpp
-
patch linknode modules: linknode.hpp,
linknode.cpp
-
vertex node modules: vertnode.hpp,
vertnode.cpp
-
the OpenGL/GLUT modules: opengl.hpp,
opengl.cpp
-
camera modules: camera.hpp
-
a 3D vector class: vec3f.hpp
-
the main driver: main.cpp
-
UNIX makefile: makefile
-
test models used for demo program: test0.dat,
test1.dat, test2.dat,
test3.dat, test4.dat,
test5.dat, test6.dat,
test7.dat
The Demo Executable for PC/Windows95 Systems
Simply download the zip file, decompress in an empty directory, and
run hr.exe (requires OpenGL .dlls):