Volumetric LightRays

Started by
1 comment, last by Galshin 18 years, 2 months ago
I'm trying to find some resources on how to do nice realtime Volumetric lightrays (and not just extruded geometry with additive blending). Unfortunately, I've been unable to find any good resources. Anything on the web or in a book would be nice. This thread: http://www.gamedev.net/community/forums/topic.asp?topic_id=120983 has some cool stuff, but never any indication of how to do the volumetric lightrays (I actually kind of understand the explanation for making the volumetric shadows, but don't know how to do the actualy lightrays themself).
Advertisement
I don't really remember the exact technique I used for the shots on that thread (I think it was still partially CPU assisted back then), I modified our light shaft rendering system countless times. But in essence, it always boils down to a volumetric visualization technique.

On todays hardware, you would probably use a slicing technique. You basically render multiple geometric slices through the shaft volume, orientated in parallel to the current camera plane. The slices are textured according to some 3D function - be it a 3D texture, a noise function, some pixel shader simulating a falloff cone, whatever. You then multiply with a projected shadowmap comparison (from the light point of view) to get volumetric shadows. Multiplying the result with an animated Perlin noise function simulates floating particles in the air, like dust or mist.

What effect exactly would you like to reproduce ?
I was just wanting to do lightrays in general. Rays coming through a window, or rays shooting off of a spotlight, etc... Basically, what you demonstrated in the screenshots in that thread (nice stuff btw...)

My artists have been clamoring for some nice engine assited lightrays (currently doing the extruded geometry with additive blending, which they are unhappy with). Having the shadows in the lightrays is just a bonus (though the technique you describe seems fairly straight forward).

I need to read the explanation you just give a bit more, to try and digest it... still having trouble visualizing the technique :p

But thanks, it's giving me something to think about.

This topic is closed to new replies.

Advertisement