Home » Community » Forums » Graphics Programming and Theory » Quality shadows in large environments
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 Quality shadows in large environments
Post New Topic  Post Reply 
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

 User Rating: 1996   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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...

 User Rating: 1045   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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 ?


 User Rating: 1996   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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/

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Adaptive shadow maps

 User Rating: 1045   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Thanks sjelkjd, I'll take a look at it.

Digicube: this is the paper I was talking about in my post

 User Rating: 1996   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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..."

 User Rating: 1045   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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?

 User Rating: 1031   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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?

 User Rating: 1045   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Because stencil buffer can be used as an accumulation buffer, so you'll just use it for whatever needs you have.

 User Rating: 1031   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Might as well get a real accumulation buffer then. =)

 User Rating: 1045   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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

 User Rating: 1996   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: