Archive for December, 2007

h1

So you wanna be a rockstar (Lightcuts implementation)

December 11, 2007

Finally, I implemented “Lightcuts: a scalable approach to illumination” paper . It took me two weeks and several nights (working during late night is not very healthy but extremely efficient). It would not be possible without great help of ANL and Thomas and his amazing blog. It would be also very hard without this paper (Implementing Lightcuts – Miksik M. (2007)).

First attempts was not very promising:

Lightcuts - first tryLightcuts - second try

After four days it start to work (with o(n^3) cut tree creation complexity, and wrong distance bounding). Then I focused on writing optimal cut tree creation. When I get o(n log n) it start to be usable.

Implementing oriented lights bounds took me another week. Finally it start to work.

6207 lights (voxels) overall time: 323.89 sec, propagation time: 2.51 sec, avg cut size 288 (this number of lights per pixel was actually computed)

The Cornell Box

55334 lights (voxels) overall time: 977.87 sec, propagation time: 37.59 sec

corridor.mgf

155731 lights (voxels) overall time: 2748.81 sec, propagation time: 341.79 sec

soda.mgf

Next steps:

  • optimization of everything (shadow rays instead of full one and so)
  • adaptive anti-aliasing
  • testing environment/day light
  • multi threaded rendering
  • reconstruction cuts (maybe)