[Algorithms] Pick dominant light from sh coeffs
Brought to you by:
vexxed72
From: Dan T. <dan...@gm...> - 2012-02-02 23:22:28
|
I have 9 red, 9 green and 9 blue sh coefficients (packed using the method in appendix 10 of http://www.ppsloan.org/publications/StupidSH36.pdf). I want to pick a single dominant light to use for specular. How would I go about efficiently extracting the direction and color of that light from the coefficients? Looks like I need to calculate the "optimal linear direction" which is supposedly in this paper http://research.microsoft.com/en-us/um/people/johnsny/papers/ldprt.pdf, however I can't see it. Worse still, if it is in there, it is probably an integral that I will struggle to turn into code! Thanks Dan |