Sign in to follow this  
Inflictive

New shadow mapping method - seen it before?

Recommended Posts

Inflictive    116

I have come up with a new realtime shadow mapping method, and I was wondering if anyone has seen this before or knows what it's called. Here are some pics:

 

Plastic_2013-04-17_21-13-52-48.pngPlastic_2013-04-17_22-23-34-47.png

More pics at http://www.indiedb.com/games/physigons

 

It's supposed to simulate a "cloudy day" atmosphere. The shadows dissapear as the object gets farther away from the ground. How it works is, it creates four shadow maps looking down on the scene at different angles, then only shadows pixels that are occluded from ALL of them. Then blurs it to look nice.

I was wondering is there a name for this or did I invent something new here? 

Edited by Inflictive

Share this post


Link to post
Share on other sites
siri    283

I don't know the individual techniques but it looks like percentage closer filtering. Like I say though I don't know the techniques so yours may be different.

Share this post


Link to post
Share on other sites
FreneticPonE    3294

Interesting, seems expensive with four shadow maps, but kinda neat. Hasn't been done specifically like this so far as I can recall, though there have been multiple hard shadows from different perspectives that converge on an area light source solution, which is in principle the same sort of thing you're doing here.

Share this post


Link to post
Share on other sites
Hodgman    51234
Neat idea, you're basically ray tracing ambient/hemispherical occlusion with 4 rays per quantized area (size of shadowmap texels) in 4 fixed directions.

There are existing techniques to perform high quality ray-tracing on rasterization hardware like this, by drawing the scene from many fixed angles (combined with depth peeling), but I've not seen it specifically applied to shadow/occlusion rays.

Share this post


Link to post
Share on other sites
Inflictive    116

Plastic_2013-04-18_21-18-40-11.png

 

Here is another picture of it using a large amount of objects. It sounds like what I've got is a dynamic ambient occlusion mapping effect. At first I was thinking of using one shadow map going straight down with depth peeling, and pixels would be shadowed based on the distance between them and the nearest layer of the depth map that occludes the light source. That seemed way to complicated and expensive, plus it wouldn't properly simulate, say, a large building with a roof (the roof would be to high to shadow the floor, and the walls wouldn't be considered). I came up with this for a game where players create their own world, so any "light mapping" techniques would not work.

Share this post


Link to post
Share on other sites
MJP    19754

Share this post


Link to post
Share on other sites
FreneticPonE    3294

Hmmm, now that I think it through... I assume you'd want to go with a cascaded shadow map approach so as not to have your results just snap into reality, and since they're going to be done from a fixed position at all times you'd get it go much faster with something like: http://advances.realtimerendering.com/s2012/insomniac/Acton-CSM_Scrolling%28Siggraph2012%29.pdf which is a caching scheme for cascaded shadow maps.

 

And really what you've got here is a hacky version of shadowing a hemispherical skylighting term. Which is nice all around, especially if it's ever used for some sort of highly dynamic environment where things are going to get moved around a lot. You could also advance your shadow term even more by using all four shadow maps and something like: http://people.cs.clemson.edu/~geist/public_html/public_html/seminar/SoftShadowMapping-egsr06.pdf Which uses a shadow maps as a scene proxy to trace back to an area lightsource. With four shadow maps instead of one I'd imagine you'd avoid some of the drawbacks of such (holes and etc.) and with modern compute shaders you'd probably pick up more performance if you did it right.

 

Well, whatever, it's a neat idea any way you strike it!

Edited by Frenetic Pony

Share this post


Link to post
Share on other sites
Vilem Otte    2938

So basically you're approximating area light (in you case skydome) shadows with multiple point light shadows. This actually has been done before (F.e. the paper MJP posted - Multi-view soft shadows ... i just quick google'd some images/video for it - http://www.youtube.com/watch?v=svOnk1V314I).

 

There is even better technique called Imperfect Shadow Maps - http://www.youtube.com/watch?v=Pdp3rfyFF14 - at 3:50 there is an elephant lit by 2 large are shadows, and the paper - http://www.mpi-inf.mpg.de/resources/ImperfectShadowMaps/

 

With this technique you can render lots of shadow maps (with lower resolution) and use them to approximate GI, area lights, skylight, etc.

 

The problem with all these techniques is computational expense and memory (you need lots of memory for lots of shadow maps). Also most game-developers won't publish PC-only games, and won't write PC-only features (unless they're indie) so unless there is new generation of consoles we won't see these techniques in games too much (or unless some indie develops game with them).

The next problem is, do I want to spend a lot of time computing (semi-correct) GI & area light shadows, that players barely notices (unless it's a key role for gamplay), or should I invest that computing time somewhere else than graphics (physics?! AI?! etc.).

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