Re: [Algorithms] Undershooting in spherical harmonics generated bycubemap convolution
Brought to you by:
vexxed72
|
From: Sam M. <sam...@ge...> - 2009-05-05 12:10:13
|
Hi Alen, I'm not quite sure what you mean by diffuse radiance? There are roughly 3 diffuse values that I think about: - incoming radiance (ie. an environment cube map) - irradiance (ie. a blurry cube map: the radiance convolved with the cosine) - exit radiance (ie. irradiance multiplied by the surface albedo) I definitely left off those details in my email :) If you start with a SH function in a cube map (say, an L1 term), "do your thing" to get it into SH, and then regenerate a cube map (or similar) from your generated SH data you can still check whether it's correct as the end result should just be a scaled version of the original. The scaling should depend on which of the 3 of the above you are working with in the "do your thing" step. If it's radiance it should be exactly the same, if it's irradiance it should be scaled by the cosine terms (see the ramamoorthi paper) and if it's exit radiance it'll be the irradiance * albedo. Even if you ignore scaling you should still be able to check that if you put a single SH term in you get a single SH term back - all other terms should remain 0. Cheers, Sam -----Original Message----- From: Alen Ladavac [mailto:ale...@cr...] Sent: Tue 05/05/2009 09:56 To: Sam Martin Cc: Game Development Algorithms Subject: Re: [Algorithms] Undershooting in spherical harmonics generated bycubemap convolution Sam wrote at 4/28/2009: >> Do you mean to generate a cubemap by evaluating SHs with synthetic >> values like (1, 0, 0,..., 0) and see if they transform back to >> themselves? Sounds interesting. Will have to try that. > Yep, exactly. You can turn this into a proper unit test. Unfortunately, it seems that this is not a correct test for my case. Perhaps I haven't specifically mentioned a "slight" detail: this used to specify diffuse radiance, not irradiance. As this includes the cosine term, I believe that such two-way transformation is not possible. Right? Alen |