Archived

This topic is now archived and is closed to further replies.

Yann L

Quality shadows in large environments

Recommended Posts

Hi everybody, has anyone some experience with realtime dynamic shadowing of large environments ? I''m currently on a visualization job, and trying to add high quality sun-shadows to the 3D system. The system already has a precalculated (static) radiosity system (by lightmapping). Now I would like to include a full dynamic sun. Eg. you can specify the time of day, and the lighting (incl. all shadows) will move in the appropriate positions. The shadows should also be fully interactive (eg. project on moving objects). I thought about the best shadow solution for this particular situation, and I guess I''m more or less stuck with shadow maps. The geometry is very complex, so extruding and rendering shadow volumes would be incredibly costly (and thus is no option). Shadowmaps are very interactive (and rather fast, since target HW is a GF4), but the quality isn''t that good. They are just too fuzzy. I already use 2048²/24bit depthmaps, so I can''t go much higher. And since the environment is huge, I constantly need to regenerate new depthmaps, that''s not good for the framerate either. I recently found this paper about "perspective shadowmaps", it''s rather interesting. They distort the shadowmap by using the camera projection, in order to squeeze the maximum amount of resolution for the current view out of it. Has anyone tried something similar to this ? Or another idea how to manage large sets of shadowmaps, perhaps through image based rendering of depthmaps ? I''m just looking for some new ideas, I''d be interesting to hear how other people managed this particular problem. / Yann

Share this post


Link to post
Share on other sites
Have you seen last year''s SIGGRAPH paper about adaptive shadowmaps? It solves the resolution issue, but I don''t think it was implemented in real time. Maybe you can adapt it somehow...

Share this post


Link to post
Share on other sites
quote:

Have you seen last year''s SIGGRAPH paper about adaptive shadowmaps? It solves the resolution issue, but I don''t think it was implemented in real time. Maybe you can adapt it somehow...


No, I haven''t seen it. It sounds interesting. Do you have a reference or a link ?

Share this post


Link to post
Share on other sites
You can also take a look at Perspective Shadow Maps which will appear in this year''s 2002 SIGGRAPH.

The paper can be found at http://www-sop.inria.fr/reves/publications/data/2002/SD02/

Share this post


Link to post
Share on other sites
If you come up with anything, let me know =)
The paper sounded really interesting, and I walked out of there thinking "I''m sure you could get this working on programmable hardware somehow..."

Share this post


Link to post
Share on other sites
A little off topic, but when are graphics cards going to have higher resolution depth buffers? Trying to cramp 80 bits of data into a 24 bit depthbuffer is not exactly a picnic We already get 32 bits on the RGBA channel, why do we have to cramp depth and stencil into 32 bits? Ideally they would provide us with a float for depth channel and another float for stencil channel. When do you think we''re going to see that happening?

Share this post


Link to post
Share on other sites
I''m guessing we''ll see 32 bit depth on nvidia hardware when they _REALLY_ want to compete with 3dlabs.

And what do you need more than 8 bits of stencil for?

Share this post


Link to post
Share on other sites
OK, so I tried various methods. As I read the adaptive shadow maps paper, I had the same feeling as sjelkjd: there must be a way to put that on hardware... Well, unfortunately, there isn''t. It requires a constant feedback loop between the fragment pipeline and the highlevel renderer. If a fragment gets to blurry, it actually queries the renderer to render additional geometry. This concept is totally incompatible with current 3D card design. Oh well.

I implemented the perspective shadowmaps paper, that is supposed to be presented on this year''s Siggraph. Works well, good quality most of the time. But their projection degenerates, if you look directly into the lightsource direction. The shadows kind of blur away, very weird effect. I''ll try to remove this behaviour.

Conclusion: there is no perfect shadow algorithm... What a surprise Thanks for the suggestions anyway !

quote:

Ideally they would provide us with a float for depth channel and another float for stencil channel.


OK, I agree with the 32bit depth channel, but a floating point stencil buffer ?! This would be fun having floating point inaccuracies using the increment/decrement stencil ops... You''d have stencil-fighting on shadow volumes

/ Yann

Share this post


Link to post
Share on other sites