[Algorithms] Non-realtime radiosity mapping
Brought to you by:
vexxed72
From: Paul at H. <pa...@ru...> - 2007-06-28 20:30:16
|
I'm trying to come up with a way to do some sort of global illumination system that will be used purely as lightmaps - I'm not interested in the slightest in any real-time stuff. I don't even want true radiosity effects tbh, just something convincing that will go in fairly low-resolution lightmaps akin to those seen in Quake 3 et al. I've read enough withering descriptions of form factors and other stuff but with my non-mathhead background I can't help but think that it's all overkill for games tbh. Reflected ambient occlusion is kinda what I'm after I guess. How feasible is it just do something like this. (Per lumel across the whole scene, one at a time) Put camera on lumel facing "out" along its normal Render the scene into a cubemap taking direct lighting onto "black" textures Blur all 5 faces down to a 1x1 (All of the top face and the top half of the surrounding four) Avg those 5 pixels for my result. Poke pixel into a double-buffered new lightmap Repeat for every single lumel Repeat entire process several times to bounce the light around. All but the first pass use the previous stage of lightmaps and don't do any direct lighting at all. All new calculations are additve to the previous ones Given how low detail this is, it might even be feasible to eschew the cubemap and use one very wide angle render ? I could attenuate the lighting over distance in the shader easily enough and futher mul it by some sort of material based "matt reflection" haxx0r. This sounds like it should produce something decent but I'd like to ask the panel for a sanity check before I dive in as it's gonna be a shitload of code done mostly in my spare time. I don't want to get a month in and find the results are going to be crap! Any comments/advice gratefully received. Regards, Paul Johnson. www.rubicondev.com |