Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on some code here, and here is what I have done. It is based on the work by Ng et al. An example of what this looks like is here.

Background: Here, a "lighting cubemap" is a bunch of color values that sit on the faces of a cube.

an example of a lighting cubemap

The above lighting cubemap can be considered as a light source, where each individual pixel represents a quantity of light.

Now, say we find the visibility function at each vertex. A visibility function is just a description of what directions a vertex receives light from. Where there is geometry, set the pixel to 0 (total blockage of ambient light), and where there is no geometry, set the pixel to 1 (totally clear ambient light).

visibility from a vertex in a scene

So clearly, if you just multiply and sum (lighting cubemap function • visibility function) you will get the total light sent to that point by the lighting cubemap.

Now here is the strange part:

The massive amount of visibility maps needed for a large scene makes memory consumption enormous and the dot product extremely computationally expensive. So, take the Haar transform of the visibility maps, with the Haar transform of the lighting cube map. Drop all but 1% of the coefficients in both of these.

The result of dotting the filtered, Haar transform of the visibility function and the light function yields approximately the same result!! You don't have to "unwavelet" transform as it were-- you just multiply and add, and whammo, you get the correct color at each vertex in the scene.

Why is that?

share|cite|improve this question
A hint is that you can model reflection as convolution, so conversion to the wavelet domain means convolution becomes multiplication. – bobobobo May 3 '12 at 19:01
I believe joriki's answer below is correct. Consider the lighting and visibility cubemaps as vectors $\mathbf l$ and $\mathbf v$, and the Haar wavelet transform as a matrix $\mathbf W$. The dot product of the Haar transforms is $(\mathbf W\mathbf l)^T(\mathbf W\mathbf v)$, which is equal to the dot product you want, $\mathbf l^T\mathbf v$, because the Haar transform is orthogonal, i.e. $\mathbf W^T\mathbf W = \mathbf I$. – Rahul May 26 '12 at 1:22

Isn't this just the unitarity of the Haar transform? (See e.g. here.)

share|cite|improve this answer
your link is broken – Dec 17 '14 at 11:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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