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

## Recommended Posts

I have been working with Spherical Harmonic / Irradiance for more than a week now, and some help would be highly appreciated! What I am trying to do is to generate the matrix M to represent an Irradiance environment maps (http:www.csie.ntu.edu.tw/~cyy/courses/rendering/07fall/lectures/handouts/lec15_SH.ppt) To generate the 9 coefficients per channel (using order 2), I generate a cube map and compute the SH coefs using D3DXSHProjectCubeMap. For debugging purpose, I set +X face to red and all the other ones to black. D3DXSHProjectCubeMap returns these 9 coefs for the red channel: 0.590712f, -0.000000f, 0.000000f, -0.850431f, 0.000000f, 0.000000f, -0.364121f, 0.000000f, 0.630666f What should the matrix look like? I tried this one c1L22 c1L2−2 c1L21 c2L11 c1L2−2 −c1L22 c1L2−1 c2L1−1 c1L21 c1L2−1 c3L20 c2L10 c2L11 c2L1−1 c2L10 c4L00−c5L20 from: http://www.cs.columbia.edu/cg/pdfs/60_envmap.pdf , with constants: c1 = 0.429043; c2 = 0.511664; c3 = 0.743125; c4 = 0.886227; c5 = 0.247708; but doesn't seem to work. If I try with normal (-1, 0, 0), the value should be 0 (as -X face is black) but I still get a value higher than 0 (0.7 something) Any help on what the matrix should look like working with value output from D3DXSHProjectCubeMap would be highly appreciated! Thanks. [Edited by - Skiz0 on July 7, 2008 8:56:14 PM]

1. 1
2. 2
Rutin
19
3. 3
khawk
18
4. 4
5. 5
A4L
11

• 12
• 16
• 26
• 10
• 44
• ### Forum Statistics

• Total Topics
633768
• Total Posts
3013743
×