Thursday, 8 July 2010

Volumetric lighting

I think the aspect of light volumes that most caught my attention was the ability to perform volumetric lighting across an entire scene. Because lighting information is available for the space between objects it's possible to imitate the effect of light interacting with very fine, free floating particles such as dust, smoke or pollution. This is done simply by sampling the light volume texture multiple times along the space between the camera and the surface being rendered. The technique is known as volume ray marching and you can read about it here and here. All screenshots were taken from my light map renderer. I'll post a video soon as the effect is even nicer in motion.


Daniel said...

That looks awesome! I've been optimizing my volume light sample placement to just the play areas of maps, but that removes the ability to do effects like yours.

Stefan Kamoda said...

Thanks Daniel. It's a pretty neat effect. I'm getting good results using light volumes for character lighting and full scene fog although I haven't had much luck lighting static world geometry with volumes.

Josh said...

Are you having trouble getting good results with Lighting Volumes on static scene objects? Are there visible artifacts? Please explain, if you would, Thanks.

Stefan Kamoda said...

I was having trouble with artifacts on static scene objects. The hollow cylindrical object in the screens above proved particularly bad. With samples being taken both inside and outside it caused a lot of streaking. I'm sure it would be possible to improve the placement of samples and / or smooth the results but I haven't looked into it yet.

Post a Comment