Jump to content
  • Advertisement
Sign in to follow this  

Normalization in Stupid Spherical Harmonics

This topic is 755 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts


I am struggling with digesting Normalization section (page 12) in Stupid Spherical Harmonics by Sloan.
In essense, I do not understand the need for normalization and how the author derives the formulas.
Can you help me with the following questions please:
1.Do we represent incident radiance by what we call light color in computer graphics?
2.If we use incident radiance in the range from 0 to 1, then there is not guarantee that output radiance will be in the range from 0 to 1 as well? Why?
3.What does Sloan actually means by normalization? Is it the procedure which guarantees that output radiance will be in the range from 0 to 1?
4.He provides an integral which computes a scale factor c, where  c is found to be 1/dot(L, V). What is V? Is it output radiance direction? He does not expand much on this. How was this derived?
4.The transfer function when we compute output radiance includes both cosine lobe and BRDF function. Sloan does not seem to include BRDF contribution.
Even if we have diffuse surface where BRDF is constant, we should include material albedo. How do we treat it then?
5.He mentions the term "normalized clamped cosine in SH". What does "normalized" mean for the clamped cosine function?
6.Sloan talks about "normalized clamped cosine" function. It feels like it should be sufficient to use only this function for the normalization. Should not incident radiance function participate in the normalization factor computation?
Edited by _void_

Share this post

Link to post
Share on other sites

I was able to clarify the things via mail communication with Peter-Pike himself :-) His answers are listed below:


1) "light color" in computer graphics is more often the emitted radiance, incident radiance is the projection of all the lights (and possibly indirect light), the key distinction is it is light arriving at some location.

A point (or spherical light) will have incident radiance that is just 1/d^2 in general.


2) If incident radiance is in the range of [0,1], then outgoing radiance will always be in the range [0,1] if you have energy conservation - ie: BRDF's are normalized (so diffuse is albedo/Pi - I'll get to this more later, etc.), etc.

This is just a result of the physics of light transport (ie: otherwise you could generate "free energy", etc.)


3) So "normalization" is a bit overloaded - for diffuse reflectance, the "1/pi" normalizes the cosine term (ie: integral over the hemisphere of a cosine is pi, so the "normalized cosine kernel", which is cos/pi, integrates to 1.)


4) I am not sure I totally am following you, but if you look at the diffuse reflectance equation: integral( albedo * L(s) * cos( theta ) / pi ), you can factor the albedo ( a [0,1] number that is just the diffuse reflectance) out of the integral,

and you are left with two other terms (the above integral is in a coordinate system where the normal is Z.) The whole idea of the "normalization" section is if you have some type of light projected into SH, you want to solve for an "intensity" so that it reflects unit radiance.


If this is a directional light L(s) is just sum_i( y_i(d) y_i(s) ), where d is the direction to the light. T(s) is just the cos(theta)/pi term from the reflectance term - so it's the projection of a normalized cosine into SH.

The reflectance integral reduces to the dot product of the light projected into SH (L(s)) and the reflectancce (T(s) in the paper due to the orthogonality of the basis (integral of the product of two functions expressed in an orthogonal basis is just the dot product of the coefficient vectors...)


So that section is about how to reason about values to assign to different light types so that they reflect "unit radiance" with a diffuse material. This is done just by making the normal point at the light, and solving for the unknown intensity "c" from that equation (V is really "T" - and the symmetry of the light types means we only need to look at the ZH basis functions...)


5) What I said above, it's how you make an energy conserving diffuse BRDF (albedo / pi), cos/pi is the "normalized clamped cosine function" (clamped because it really is max[0,cos]/pi, ie: just integrated over a hemisphere.)


6) This "normalization", is just a way to pick "[0,1]-ish numbers" to assign as light intensities. If you are doing real PBR, you don't do any of this stuff. Though in practice we do something similar - ie: the values you assign to a light are specified so that a diffuse material with unit albedo pointed at the light 10 meters (or some fixed distance) away reflects some amount of light (specified in f-stops generally.) This is useful whether you use SH or not. ie: all of this math can be done with analytic equations, other BRDF's, light sources, etc. The point of that section is to solve for a modifier to a [0,1] value that makes specifying light intensities more intuitive, that's pretty much it..


Unfortunately I don't have the original document, otherwise I would change 1/dot(L,V) to 1/dot(L,T)

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!