From: Bruce Woodard <bwoodard@in...>  20080521 21:03:57

"Yeah I'm not sure I follow why in your case its incorrect to do a standard cosine lobe SH lookup per basis vector (ala irradiance env mapping). Afterall that's exactly what the HL2 basis stores, the cosine weighted incident lighting along each basis vector." It's conceivable that my approach was correct, however it was based on an intuition rather than a derivation. bruce ________________________________ From: gdalgorithmslistbounces@... [mailto:gdalgorithmslistbounces@...] On Behalf Of Rowan Wyborn (2K Australia) Sent: Tuesday, May 20, 2008 11:38 PM To: Game Development Algorithms Subject: Re: [Algorithms] Projecting SH into the Half life 2 basis Hi Bruce, Yeah I'm not sure I follow why in your case its incorrect to do a standard cosine lobe SH lookup per basis vector (ala irradiance env mapping). Afterall that's exactly what the HL2 basis stores, the cosine weighted incident lighting along each basis vector. I was thinking about trying to encode the actual PRT transfer SH with a non clamped HL2 basis (which needs a proper basis projection)... I'm yet to sit down and try and wade through the maths thou if anyone has any thoughts :) Also thanks matt for the basis change derivation, explains things perfectly. Thanks, Rowan From: gdalgorithmslistbounces@... [mailto:gdalgorithmslistbounces@...] On Behalf Of Bruce Woodard Sent: Wednesday, 21 May 2008 3:32 AM To: Game Development Algorithms Subject: Re: [Algorithms] Projecting SH into the Half life 2 basis IIRC, Peter went over the derivation on this mailing list. Might be worth a troll through the archives. Also, FWIW (realizing that Peter will likely groan with disgust) for Warhawk I simply did a standard SH lookup per basis vector (spun into worldspace) in my vertex shader. I used this as a way to mix my ambient volume lighting and point lights for a constant perpixel (HL2 lookup) cost. bruce ________________________________ From: gdalgorithmslistbounces@... [mailto:gdalgorithmslistbounces@...] On Behalf Of Rowan Wyborn (2K Australia) Sent: Tuesday, May 20, 2008 1:04 AM To: gdalgorithmslist@... Subject: [Algorithms] Projecting SH into the Half life 2 basis Howdy, The paper "Normal Mapping for Precomputed Radiance Transfer" (http://www.ppsloan.org/publications/) contains a handy matrix to project 3rd order SH into the half life 2 basis. I was just wondering if anyone (or P.P.S if he's still on this list :)) had any insights into how this matrix is derived? Additionally I wonder whether its possible to generalize this solution to an arbitrarily oriented set of basis vectors? Its not clear to me whether the results in this paper for the HL2 basis are achieved by: a) rotating the SH lighting into each vertex's basis orientation and projecting using the given matrix or b) by generating the projection matrix on the fly for each vertex's basis orientation. Anyone got any ideas? Thanks, Rowan 