Irradiance Gradients in PBRT

For this assignment I extended pbrt with the Irradiance Gradients technique[1].

I did renders as I modified the code from the standard irradiance cache so that the progression can be viewed. The following four images represent various points in the transformation. The first image is the sponza scene rendered with the vanilla irradiance cache scheme.

No Irradiance Gradients

The only change for the second render is that it was done with with stratified Monte Carlo sampling. No gradients were computed.

Just Stratified Sampling

In this render rotational gradients were introduced, but translational gradients were still not computed.

Irradiance Gradients (Rotation Only)

And finally both rotational and translational gradients were used for this image.

Irradiance Gradients

Comments

The change from no gradients to rotational gradients alone was definitely the most stark change. It's not clear that adding translational gradients help much, if at all. There is an artifact at the top of the foreground pillar that appears to get worse with the introduction of translational gradients. Other areas of the floor appear to improve.

Implementation Notes

I only implemented irradiance gradients for the luminance, not for individual spectra. This may be why the technique does not appear to be as effective as one might hope. However, the color in the test scene is mostly grays, so I doubt that color is terribly significant.

Problems

I ran into a few problems building pbrt on a recent Linux install with gcc4 and newer libraries. It's worth noting that the behavior of flex changed, so it complains about a carriage return (^M) that can be safely replaced with \r. Also, the included OpenEXR libraries don't work and an updated version should be used. I discovered the hard way that you need to be really careful making sure nothing references the old library and that one should make clean when dealing with such things.

There were a few subtle things when implementing. First of all, the k-1 subscripts in the translational gradient have an implicit modulus. The other thing is that "r sub j,k" is not well defined anywhere, but the "Improved Radiance Gradient Computation" paper explains it [2].

source code
pbrt scene
this should be replaced with my email address

[1] G. J. Ward and P. S. Heckbert, "Irradiance gradients," in Third EUROGRAPHICS Workshop on Rendering (A. Chalmers and D. Paddon, eds.), (Bristol), pp. 85--98, May 1992.

[2] K%Gř%@ivánek, J., Gautron, P., Bouatouch, K., and Pattanaik, S. 2005. Improved radiance gradient computation. In Proceedings of the 21st Spring Conference on Computer Graphics (Budmerice, Slovakia, May 12 - 14, 2005). SCCG '05. ACM Press, New York, NY, 155-159.