Re: [Algorithms] Some question about "Lighting andMaterialofHalo3"and "Lightmap compression in Halo
Brought to you by:
vexxed72
From: David N. <da...@re...> - 2010-02-01 19:45:16
|
Hi, I can't access that paper as the website seems to be down right now but I can talk about convolving the signal with a cosine function. Check out the paper "An Effecient Representation for Irradiance Environment Maps" by Ravi Ramamoorthi and Pat Hanrahan. As Sam pointed out while the cosine function is circularly symmetric the input lighting is very complex. You can think of the cosine function as a low pass filter. It leaves you with a non-symmetric function. Now, where I think you are getting confused is how coefficients are getting through when the odd terms > 1 are 0 for the cosine coefficients projected against the associated legendre functions. The derivation is in the environment map paper so I won't explain it here but the key equation is (7). $E(\theta, \phi) = \sum _l_m [A_l * L_l_m * Y_l_m(\theta, \phi)]$ (you can copy the above LaTeX equation into an online viewer such as http://www.codecogs.com/components/equationeditor/equationeditor.php if you can't read LaTeX) Notice, how l is defined for l <= 2 and it does contribute to the equation and as l gets higher it quickly dampens the function. As you can see for the first 9 coefficients cosine will not zero out any terms. Mind you this is 9 coefficients for just one color channel multiply that by 3 for RGB. -= Dave From: Sébastien Lagarde [mailto:seb...@do...] Sent: Monday, February 01, 2010 9:55 AM To: Game Development Algorithms Subject: Re: [Algorithms] Some question about "Lighting andMaterialofHalo3"and "Lightmap compression in Halo 3" Hi Sam > does not produce a radially symmetric SH In fact I am not sure to understand fully the SH math, that why I ask, I attached a picture showing the part of the "Lighting and MaterialofHalo3" which I will highlight. The equation (4) is the projection of incoming lighting in SH. The equation (5) is the diffuse reflectance equation used in Halo3 They sum the SH coefficient of the incoming lighting multiply by the SH coefficient of the projection of the cosine lobe. As you said, this is a convolution, From Precomputed radiance transfer for real-time rendering in Dynamic, low-frequency lighting environments (http://research.microsoft.com/en-us/um/people/johnsny/papers/prt.pdf) in the section "convolution" we can read: " In other words, the coefficients of the projected convolution are simply scaled products of the separately projected functions. Note that because h is circularly symmetric about z, its projection coefficients are nonzero only for m=0. The convolution property provides a fast way to convolve an environment map with a hemispherical cosine kernel, defined as h(z) = max(z,0) " So I am a little lost here, I think I misunderstanding the math, in the case of the convolution, as said in the Halo3 paper you get a non nul result when you multiply the coefficient for i = 0, 2 and 6 (based on order 3 SH) so you don't need to store more than 9 SH coefficient ( 3 zonal harmonic for 3 color channel) for the incoming lighting, right ? Is that statement mean that the lighting is radially symmetric SH, I am not sure. > “Zonal” harmonics, where m != 0 are 0 Sorry for the unclarity of my word, I mean that A3 = 0 (notation from halo3 picture joint). the coefficient for A3, A4 etc... can be found in this paper (http://www.eecs.berkeley.edu/~ravir/lighting.pdf) and are not given in halo paper for order > 3 that why I said the zonal hamonic SH coefficient of the 4 band don't need to be store. Thanks to enlighten me :) Lagarde Sébastien |