Jump to content
  • Advertisement
Sign in to follow this  
zhugel_007

volumetric light

This topic is 3448 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I would like to implement volumetric light. I have found following methods: 1. shadow map + sampling plane. (http://ati.amd.com/developer/gdc/mitchell_lightshafts.pdf) (http://nis-ei.eng.hokudai.ac.jp/~doba/papers/pg00.pdf) (ShaderX3) 2. ray tracing based (Nvidia SDK 10.5) 3. image process based (GPU Gem 3) (ShaderX6) But they all have limits: 1. when you go close to the light volume: - you can see the sampling planes - framerate goes down quickly 2. slow in large unit 3. light beam disappears if the light goes out of the screen It seems that only 3 has been used in Farcry2 and Crysis(only in open area). Other methods are not even used in any game. I might be wrong. :p Is there any other way to do the volumetric light? Any suggestion would be appreciated. :)

Share this post


Link to post
Share on other sites
Advertisement
Well there are two ways to do this.

Assume you have points where the ray enters & exits the light volume.

If you use procedural light falloff, you can take path integral of the falloff function across the given segment. This is the way UE3 does it, for details see Gears of War shaders, eg. function SphereLineIntegral().

Or you can take a fixed/adaptive number of samples of falloff and projective texture along this segment, which of course will result in some artifacts.

Personally I prefer using procedural falloff and discrete sampling of projective texture combination.

Share this post


Link to post
Share on other sites
There is the simpler, obvious solution of just placing a large number of transparent billboards interleaved in the same vicinity, combined with some post processing that might work out for you?

Share this post


Link to post
Share on other sites
Quote:
Original post by zhugel_007
Is there any other way to do the volumetric light?
Any suggestion would be appreciated. :)

Yes,it is.There are a lot of other methods,for example volumetric light demo on my page,in part "2005-2006 Demos"
(I aviod to place direct link,because one of dounload steeps- via russian language page)

Share this post


Link to post
Share on other sites
Quote:
Original post by Krokhin
Quote:
Original post by zhugel_007
Is there any other way to do the volumetric light?
Any suggestion would be appreciated. :)

Yes,it is.There are a lot of other methods,for example volumetric light demo on my page,in part "2005-2006 Demos"
(I aviod to place direct link,because one of dounload steeps- via russian language page)


Wow, that looks great! Any details?

Share this post


Link to post
Share on other sites
Quote:
Original post by KRIGSSVIN
If you use procedural light falloff, you can take path integral of the falloff function across the given segment. This is the way UE3 does it, for details see Gears of War shaders, eg. function SphereLineIntegral().

Or you can take a fixed/adaptive number of samples of falloff and projective texture along this segment, which of course will result in some artifacts.

Personally I prefer using procedural falloff and discrete sampling of projective texture combination.

Do you have any link/paper/something about those techniques?

Share this post


Link to post
Share on other sites
Quote:
Original post by agi_shi
Any details?

Breafly-I use in this method per one omni (point) light:
- one cubemap with 8-bit range in alpha for all non-transparent
objects around light (closer than point light max.range)
- additional cubemap,having also 8-bit range in alpha and transperensy color in RGB,
for all transparent objects objects around light (closer than point light max.range).This ranges in both cumebaps normalised to max.light range(=radius)
-rendering in separate RT,having ~1/4 of backbuffer size for all lights ~100 spheres around each.
For each sphere I make comparison sphere radius and range in cubemaps,i.e. calculations just like in case of cube shadowmaps using.
-last steep -bluring and applying this RT like a full-screen quad after scene rendering.
Cubemaps need refresh in case of light or scene object(s) positions change,
their sise~128x128.Number of spheres per light depends from angular size of light
radius in camera space( in this demo min=16,max=128),it's the main trick for increasing speed.

ps. I don't remember .exe file version in this demo pack,but you can try
change volume light quality.
In 4th string in scene.ase file (*SCENE_FILENAME "volumelight.max" +VLH)
+VLH could be replaced to +VLL / +VLM or +VLU
Also could work( may be) such keys in this string,in addition:
+AEL / +AEM /+AEH -auto exposhure
+DFL /+DFM / +DFH -depth of field...

[Edited by - Krokhin on December 21, 2008 3:02:17 AM]

Share this post


Link to post
Share on other sites
Hi Krokhin,

your demo looks great! Could you please explain more about the use of the cubemap?
I am still confused of how you use the cubemap.

Thanks a lot!

Share this post


Link to post
Share on other sites
Quote:
Original post by zhugel_007
Could you please explain more about the use of the cubemap?
I am still confused of how you use the cubemap.

Hi,unfortunately now I'm faraway from my computer.
I will look at source code ,try to recall something and answer you
only after 1/6/2009,ok?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!