Real Spherical Harmonics Sign

329 Views Asked by At

Premise

I'm currently developing a graphical application that makes use of Spherical Harmonics Lighting. In particular I'm using real Spherical Harmonics up to the 2nd band (9 coefficients). While writing down a function to implement SH evaluation I've noticed that some sources use negative sign when m (the index within each l band) is odd, while other don't. Here are two contrasting examples:

I've read that this has to do with the so-called Condon-Shortley Phase.

Question

My question is of a practical nature: Are the two definitions equivalent as long as I'm consistent in my choice between the two when applying first SH projection and then SH evaluation?

1

There are 1 best solutions below

0
On BEST ANSWER

Yes. SP lighting is just a way to push the lighting computation into another basis for "continuous functions on the (hemi)sphere", namely, the spherical harmonics basis, and then truncate (i.e., perform projection onto a low-dimensional subspace that you think might capture most of what you care about).

Negating one (or more) basis vectors alters the coordinates you get (by negating one or more coordinates), but it doesn't alter the plane to which you're projecting, and if you reconstruct with the same basis you used to project, you'll get the same thing as if you'd used the original basis (with no negated vectors).

Short answer: you're fine. Be consistent, and it'll all work out.