Volumetric Lighting

Hi all,

Aurilliance and me have been working on Volumetric Lighting in Panda. The algorithm we used is based on this one:
http.developer.nvidia.com/GPUGem … _ch13.html
It’s at the moment fully integrated into CommonFilters (and thus compatible with shader generator)

Some screenshots: (yes, taken in Panda)



Credit goes to aurilliance for sharing this beautiful shader with us :slight_smile:
[size=0]suppress-screenshots[/size]

Credit goes to pro-rsoft for taking the time to get it working properly :smiley:.

For everyone’s information, I’m throwing together a demo to show off the shader. You should be able to download it here in a few days max (depending on how much study I need to do :stuck_out_tongue:).

impressive !

I’m eager to see what can be done with this

Sweet, especially that it is in the common filters system:-)

How does it handle the light exiting the view/being just outside the view?

Well, right now, the rays disappear once the sun is out of view. We’ll need to find a solution for that.

Amazing! Awesome! Great! Incredible!!!

PS:Does it also include shadows? I need shadows badly…

EDIT: My mistake, ignore this info and see below

As of 1.6 I believe there will be shadows in the auto shaders, and this effect is in the auto shaders atm. So yes, it should work with shadows in 1.6.

Hmm, wishful thinking? :slight_smile: I don’t think there will be shadows in 1.6.0, unfortunately. Maybe for a later release.

But to answer your question, birukoff, yes, since this is a postprocessing filter (and requires just one additional rendering pass, which is with all objects black, for occlusion) you will be able to use this with any kind of shader without any problems.
But this technique doesn’t offer shadows itself, you do need a separate shader for that.

jaw down here, outstanding teamjob - looks like I can’t wait the upcoming Panda birth

How about correct occlusion on complex objects? :slight_smile:

uber quality
is this achievable with 1.6.x then?

Yep, since 1.6.0. The problem currently is that all reflecting light is also directed away from the sun, so in a bright scene that will get noticeable.
I’ve already solved this problem with a second occlusion pass (as shown in the screenshot) but it’s still very hacky, so I’m looking for a way to cleanly integrate that.

In launchpad, Volumetric Lighting is shown as “in progress” and seems to be the last thing to be solved before 1.7.0. Is that true or is this thread outdated?

and yes, I am impatient about 1.7.0 :slight_smile:. it should be just around the corner, right? :smiley:

It’s in already since 1.6.0, but I’ve been meaning to add some extra functionality for a long time now. Never got to doing it though.
But yeah, it’s usable already. :slight_smile:

wohaa , looks pretty nice!!!

Is there a sample, or tutorial for this?

I’d love to start playing with it, but haven’t messed with shaders at all with panda yet.

Search for the demomaster thread, it has a couple samples.

discourse.panda3d.org/viewtopic … 6203#36340