Sign in to follow this  
l0calh05t

Soft Shadow Volumes

Recommended Posts

l0calh05t    1796
Recently I read an article on 2D lighting with soft shadows (gamedev article iirc), and the technique described there was basically a shadow volume technique with added penumbra regions (calculated for a circular light). My first thought was that this could be extended into 3 dimensions, to create realistic realtime soft shadows. After a bit of searching I found a few articles that dicuss this possiblity (here: http://graphics.cs.lth.se/research/shadows/ ) So I wanted to ask: has anyone here tried implementing these? And what were your results?

Share this post


Link to post
Share on other sites
ph33r    380
I havn't implemented soft volumetric shadows myself but I know that you can get volumetric soft-shadows using post-processing effects. I also know that Eric Lengyel implements it in his C4 engine check it out at http://www.terathon.com/index.html

Share this post


Link to post
Share on other sites
l0calh05t    1796
I just looked at that link, and he does not use Post-Processing effects to achieve soft shadows, he uses penumbra wedges which is exactly what i meant. Besides, post processed soft shadows are usually just blurred hard shadows and thus fairly uninteresting (as they are obviously incorrect-looking)

Share this post


Link to post
Share on other sites
OrangyTang    1298
Shadow rendering with penumbra wedges seems to me to be the logical 3d extension of the 2d method (although I think it was actually around first, I hadn't actually spotted it before though). But its vastly more complicated, requiring pixel shader voodoo to render proper 3d volumes. Very nice results from what I've seen though.

The post-process versions (usually doing a blur between two hard shadows) tends to be not physically accurate and have weird shimmery artifacts as the view moves because of the low-res blurring. Shadows tend to bleed too.

Share this post


Link to post
Share on other sites
Eric Lengyel    3460
Here are some notes on my experiences with penumbral shadows. BTW, you can download the slides from my GDC lecture on the topic from http://www.terathon.com/.

* The most correct algorithm is very complex, but does produce very nice looking results. Unfortunately, it is also very slow, so unless your scene is made up of a bunch of simple boxes, you're not going to have a great frame rate even on today's best graphics cards. If you throw a character in there with even a modest polygon count, forget it.

* You can gain a lot of performance by tossing physical correctness out the window and only softening the outer half-wedges around the ordinary stencil shadows. By dropping the inner half-wedges, you'll no longer get true symmetric penumbrae or umbrae having finite range, but the shadow edges are still very soft and look good.

* Even more performance can be gained by throwing out the light coverage calculation altogether and just doing a dumb linear falloff between the extruded stencil volume and the outer planes of the penumbral wedges. I haven't implemented this one yet, but I'm hoping to soon, and I bet it will be fast enough to use in moderately complex scenes. The fact that it's not anywhere near physically correct probably doesn't matter a whole lot in a fast-paced video game.

-- Eric Lengyel

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this