How to represent a point using spherical harmonics?

Started by
12 comments, last by Emergent 11 years, 5 months ago
Firstly, thanks all, for your remarks. Things are becoming much clearer now.
I would like to say the following.

1) Although, I do not quite understand why a point light source is a Dirac Delta function in the frequency space. I know that the span of the spatial domain is inversely proportional to the span in the frequency domain, i.e. if a function is spread in (x, y, z) coordinates, it will be concentrated in the frequency domain.
BUT - a point light source is concentrated in the spatial domain (it's just a line) and thus, I would expect it to be spread out in the frequency domain.
Why is this not the case?


2) Perhaps I should explain what the motivation behind the problem is. Very often we come across images which contain dark spots. By adding a point light source to the current scene illumination, I wanted to make these spots lighter, i.e. 'more visible'. Since all of you are advising against using a point light source, do you see any other variant of how to address this problem?

Thanks,
opengl_beginner
Advertisement
Point lights being Dirac delta functions has nothing to do with frequency space. The function that we are trying to approximate using spherical harmonics is the radiant intensity (measured in Watts per steradian). If light is coming concentrated from a single point, that function is actually a delta (some amount of light is coming from a single point, which means something like infinite radiant intensity at that particular point).

By the way, delta functions are not actually functions: They are measures. I felt dirty after having written the paragraph above. :)

1) Although, I do not quite understand why a point light source is a Dirac Delta function in the frequency space. I know that the span of the spatial domain is inversely proportional to the span in the frequency domain, i.e. if a function is spread in (x, y, z) coordinates, it will be concentrated in the frequency domain.
BUT - a point light source is concentrated in the spatial domain (it's just a line) and thus, I would expect it to be spread out in the frequency domain.
Why is this not the case?


A point light is a delta in the spatial domain, not the frequency domain. A point light is infinitely small, so in the frequency domain the response is infinitely large (hence why you need infinite SH coefficients).


2) Perhaps I should explain what the motivation behind the problem is. Very often we come across images which contain dark spots. By adding a point light source to the current scene illumination, I wanted to make these spots lighter, i.e. 'more visible'. Since all of you are advising against using a point light source, do you see any other variant of how to address this problem?


Well you can still somewhat approximate the contribution (irradiance) from a point light source if you only care about diffuse, and not specular. Just project it onto SH, and convolve with a cosine kernel to SH containing lambertian reflectance. Then you just "look up" into the SH at runtime in your shader by projecting your normal direction onto SH and calculating a dot product between the two SH vectors. You can even roll the cosine convolution into the runtime lookup, since it's just a multiply by 3 scalars. Games have done this in the past to approximate the contribution from "unimportant" light sources. Like I said before though you may ringing artifacts if you project lights that can have high intensities.

By the way, delta functions are not actually functions



double const diracDelta( std::function<double const(double const) > testFunction )
{
return testFunction(0.0);
}


:-D

*ducks*

This topic is closed to new replies.

Advertisement