[Algorithms] Occlusion maps for local lights via SH?
Brought to you by:
vexxed72
From: Aras P. <ne...@in...> - 2003-12-03 09:09:02
|
Hi, I was thinking on SH, ambient occlusion maps, local (eg. point) dynamic lights, shadows and similar stuff. I have idea like this: 1. At many points (eg. vertices) of a static model, we have a spherical visibility-distance function. It's not plain visibility function (0 or 1), but rather a "visible distance" function. 2. Now, we approximate the function using spherical harmonics. 3. for each point light: 3.a. for each point (eg. vertex) of a model: 3.a.a. evaluate SH in direction "from point to light" to obtain visible distance 3.a.b. compare visible distance and distance to light to get shadow/nonshadow 3.a.c. do old normal shading (diffuse, etc.), modulate by shadow I don't know if low-order (eg. 25 coeffs) SH approximation of visibility-distance function will be too crude; or if all this will outperform conventional methods (eg. shadow maps) =] So far, I've done only very basic tests, using only 9 coefficients for SH. It's somewhat too low - I get shadows when "deep in shadow", but also lots of false small shadows/nonshadows. The reason for 9 coefficients was that I could only find Cartesian expressions of SHs up to that order... Anyone has code/expressions for higher order SHs? :) Aras Pranckevicius aka NeARAZ http://www.gim.ktu.lt/nesnausk/nearaz/ |