Has anyone done this yet?

Started by
6 comments, last by Pragma 19 years, 6 months ago
Hey, I'm thinking of trying to develop an algorithm for shadow maps that will allow volumetric fog to be a shadow receiver, and I was wondering if I could know if anyone else has done work on that matter before I continue thinking about it. If you could provide a link to a demo or article on the issue, that'd be great.
Advertisement
But shadow maps can only store single Z values right, so the fog would give solid shadows with sharp edges. I believe Pixar invented Deep Shadow Maps, that instead of recording just the closest Z value, they also store information about how much light gets through these depths... Here is the abstract of their paper...

"We introduce deep shadow maps, a technique that produces fast, high-quality shadows for primitives such as hair, fur, and smoke. Unlike traditional shadow maps, which store a single depth at each pixel, deep shadow maps store a representation of the fractional visibility through a pixel at all possible depths. Deep shadow maps have several advantages. First, they are prefiltered, which allows faster shadow lookups and much smaller memory footprints than regular shadow maps of similar quality. Second, they support shadows from partially transparent surfaces and volumetric objects such as fog. Third, they handle important cases of motion blur at no extra cost. The algorithm is simple to implement and can be added easily to existing renderers as an alternative to ordinary shadow maps."

http://graphics.stanford.edu/papers/deepshadows/

However, this is not obtainable in real-time with current hardware or standard shadow mapping techniques.
Quote:Original post by Hybrid
However, this is not obtainable in real-time with current hardware or standard shadow mapping techniques.


this technique might not be possible real-time but i swear i saw a paper on real-time fog shadows somwhere on the nvidia developer site:

http://developer.nvidia.com/page/home

i could be completely mis-remembering but take a look there through all the example papers.

-me

Hmm...after reading part of the deep shadows paper, it sounds as though that almost could be implemented on current hardware, using an RGB shadow map and FSAA (or some other kind of filter) to go from Fig 6b to 6d. However, I am mainly trying to achieve an effect as shown in Fig 11, where a translucent object is not only casting the shadow (using volumetric fog in an RGB shadow map would do it no sweat) but is also in part able to receive a shadow (read: the shadows inside the fog being cast by the pipes). In that image though, the shadows on the fog don't look quite right, especially on the right most shadow being cast on the fog.

The algo I'm intending to make would properly simulate that effect shown in Fig 11, but for a solution that would be practical on modern hardware. However, I personally would like to do more real-life research on smoke and shadows to see if things like that right-most shadow are in fact correct.

Oh, and Palidine, I can't seem to find the paper you were referring to, sorry.
Humus has a demo of shadows trough fog , maybe that will help you gettng some ideias , check it out :

http://www.humus.ca/3D/ShadowsInFog.zip
The Nvidia 6800 Mermaid demo uses deep shadows. Check it out in their "6800 leagues under the sea" presentations.

~Main
==Colt "MainRoach" McAnlisGraphics Engineer - http://mainroach.blogspot.com
just an idea i had as i read about volumetric fog casting shadow

how about a convex hull for your volumetric fog

if you have a terrain mesh with some shadow on the ground

you could deform the mesh so it matches the top of the fog

now perform 2 passes
1 with the undeformed mesh
and one with the deformed mesh *maybe do the deformation in a vertex shader at runtime*

now do the Z comparsion in the pixelshader instead of using the arb_shadow extension and get the difference between the undeformed and the deformed shadowmap

the bigger the higher the density of the fog

its just an idea now clue if that works at all though:)
http://www.8ung.at/basiror/theironcross.html
Quote:Original post by duhroach
The Nvidia 6800 Mermaid demo uses deep shadows. Check it out in their "6800 leagues under the sea" presentations.

~Main


Actually it's opacity shadow maps. It's close, but not quite the same thing. There is a rough description on the nvidia developer site at
ftp://download.nvidia.com/developer/presentations/2004/Eurographics/EG_04_AdvRenderingTechniques.pdf
We are planning to do a chapter on the hair for GPU Gems 2 which will have a more detailed description and some sample code.

I would be very interested to see deep shadow maps on gpu. It's quite non-trivial, because in the original implementation the data structures are of variable size. You would also have to consider various issues related to filtering.
"Math is hard" -Barbie

This topic is closed to new replies.

Advertisement