New shadow mapping method - seen it before?

Started by
6 comments, last by Vilem Otte 11 years ago

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?

Advertisement

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.

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.

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.

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.

http://directtovideo.wordpress.com/2010/01/15/ambient-occlusion-in-frameranger/

http://www.andrew-whitehurst.net/amb_occlude.html

https://developer.nvidia.com/sites/default/files/akamai/gamedev/files/sdk/11/MultiViewSoftShadows.pdf

These are all similar, and related to what you're doing (which is basically an extremely rough approximation of ambient occlusion).

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!

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 -

">
).

There is even better technique called Imperfect Shadow Maps -

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

My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com

This topic is closed to new replies.

Advertisement