6
\$\begingroup\$

I've generated some 2nd order SH light-probes from cube-maps in my scene and I was surprised how strong artifacts are around the back of the dominant lights. I switched to a Lambert source plus ambient and got a result just like in the image below. Stupid SH Tricks (http://www.ppsloan.org/publications/StupidSH36.pdf) suggests a technique called Han Windowing for reducing the artifacts, which I'm guessing is a convolution filter similar to a Gaussian blur, but I'm unable to tell much from the description or find an example.

I've also read some sources that say Gaussian might be best when using a HDR source.

SH ring correct too much noise

\$\endgroup\$
2
\$\begingroup\$

After skimming through a (beautiful) paper I found a small explaination (at page 12) of a convolution in the sh domain.

Hope that helps :)

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

Hmmm. With regular Fourier transforms, window functions like the Hanning window are used to isolate a snippet of a signal (such as a 128-sample snippet out of a continuous audio signal for instance). Multiplying the snippet by a window function before taking the Fourier transform can improve the ability to distinguish different frequencies in the resulting spectrum.

However, I can't make sense of how this would apply to spherical harmonics. While they're a spherical analog of Fourier transforms, it doesn't make sense to me to apply a window function, because you're not snipping out a portion of a larger signal; your input is a cubemap that covers the whole sphere of directions.

Also, the article seems to suggest blurring the cubemap using a Hanning window function as the blur kernel, before projecting to the SH basis. In the usual use of window functions, you multiply the signal by them, rather than blurring (convolving) with them.

However, even if blurring the cubemap is the right thing to do (which it may well be—I just don't understand why), it sounds expensive, especially considering the blur ought to be done in angular space, across the cube edges and corners, and is non-separable. But on a small enough cubemap it could be OK. The open-source CubeMapGen tool can do this sort of thing—it doesn't have a Hanning window setting, but it has various other blurs you can apply. It's not fast, though.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.