To round out my previous post concerning GSoC I thought I should list out the changes I have made and how the milestones are lining up.
- Reimplemented the photon map data structure from the ground up.
- Lots of changes to the photon emission code to make it physically accurate.
- Code to emit from spotlights in place but untested.
- Re-factoring of the indirect light and direct light classes into independent raytracer and photonmapper engines
- A new structure (LightCalculator) that will loop through the sector elements and add up the components from each engine (raytracer and photon mapper).
- Many new command line options for tweaking the photon mapper and calibrating it with the raytracer.
- Filtering in the photon map to help eliminate artifacts and smooth out noise (still needs work).
- A new final gather implementation (still needs work).
- The beginnings of an irradiance cache to speed up final gather.
- Updates to the texinfo documentation for lighter2 (still needs work).
- A new version of the Cornell box model (with more lights and fixed colors).
- a brand new model of 'Construction in Wood' (another example of color bleed).
- Photon mapper is working and, although noisy and not artifact-free, giving usable results.
- Photon mapper is an order of magnitude faster.
- New rendering engines can be implemented easier in the future using the LightCalculator/LightComponent classes.
- Work has already begun to further eliminate noise (final gather), speed up even more (irradiance cache) and remove artifacts (gaussian filter).
Despite the noise and artifacts still present I think it's safe to say Milestone 1 is complete (or nearly so). Here's a list of things still to finish/implement.
Immediate priorities (considered unfinished Google Summer of Code obligations):
- Debug gaussian filter.
- Test spotlight emission and ensure it is correct.
- Add support for directional light sources.
- Retrieve and use surface albedo from object material (texture, color, etc). Consider accounting for normal/bump maps.
- Complete irradiance cache and then debug final gather.
Future changes (for fun and profit!):
- Add support for filtering materials (translucent w/o refraction).
- Add support for reflective/refractive materials and caustics.
- Add support for static linear/area/polygon light sources. This would require changes to:
- photon mapper - sampling over area as well as hemisphere.
- raytracer - ability to distribute rays from area source as needed.
- raytracer - ability to detect collision with the geometry of an area source (not infinitely small like point source/spotlight)
- libcrystalspace - support to parse and represent area sources within a world (but static ones only).
- libcrystalspace - support to render the geometry of an area source (no longer infinitely small).
It seems appropriate to send thanks out to Res and Scott at this point as they have both been quite helpful this summer and I'm sure will continue to be.
And now, we carry on ...