Intro
After looking at the Lightsprint demos and wanting to emulate them, at first I was unsuccessful in finding how they worked. Finally, after months of searching, I found http://www.cs.cmu.edu/~radiosity/emprad-tr.pdf which mentions (in passing) that they were based on progressive refinement radiosity.
Today, I hacked together a little Python class to plug into my library to execute progressive refinement radiosity. It's surprisingly speedy, even though I haven't tried to optimize it. A preliminary result (first bounce):
Problem
Right now, I'm stuck on how to get energy conservation. The (admittedly pseudocode) in the link above doesn't seem to conserve energy--or perhaps I've ported it wrong. They suggest:
for (j in patches) // Shoot from patch i to patch j B[j] += radToShoot * FormFactor(i, j) * Vis1(i, j) * Reflectance[j]; S[j] += radToShoot * FormFactor(i, j) * Vis1(i, j) * Reflectance[j];
I tried dividing the radiant exitance by the all the patches available, which seemed to help, but it gives incorrect results, as energy ought to leave the scene without hitting anything.
What's the preferred algorithm here? I.e., can someone replace this inner loop with something that works?
Thanks,
G