Full scene shadow rendering

Thomahawk

Newcomer
I've got a 3d engine that I've been making in my spare time for a couple of years. It displays 200,000 polys onscreen and handles maps with millions of polys. I mostly do large outdoor maps right now.

I implemented stencil shadows a long time ago, but the old implementation is just not feasible for the outdoor maps any more because there's so many polygons onscreen.

I think that the approach I should try is shadow mapping, but I'm not too clear on how I should approach it on such a large visible scene. I've got a shadow mapping implementation in place, but the shadow map isn't very good if I try to fit the entire visible scene.

Should I break it down into subsections and render several shadow maps? Or do you guys think I'm doing something wrong?

I was wondering if anyone had tails from the trenches that will give me a headstart?

-Thomas
 
Probably a multi-shadow-map approach such as Parallel-Split Shadow Maps is the best way to go. That does largely depend on how your scene is configured though... I find that PSSM work really well when you have a pretty uniform distribution of depth through your scene (from the camera's point of view); otherwise you really need to start aggressively implementing the "geometry approximation" stuff in the paper.

Splitting in light space (for example, 4 tiles) is also an option, although you'll get at best a (rather small) constant-factor improvement with that scheme, making it probably more expensive than it's worth.

Frustum warping techniques such as trapezoidal shadow maps are also work looking into, although they can introduce their own sets of problems.
 
I'm just musing about the possibility of a hybrid approach:

1) Render the scene front the lightsource's POV
2) Occlusion query all of the rendered polygons
3) render stencil shadows for the queries that return sufficiently high numbers

My first intuition is that it should be a reasonable algorithm. Does anyone have any strong intuitions about the feasibility of this approach?

-Thomas
 
Occlusion query *every polygon*?? That's gonna be expensive, even with fast occlusion queries. Every object might be reasonable, but certainly not every polygon.

Furthermore that technique will still inherit the main problems with stencil shadows: heavy fill-rate usage, heavily dependent on the geometric complexity of the scene and requires extrudable (I know it's not a word ;)) geometry.
 
I'm just musing about the possibility of a hybrid approach:

1) Render the scene front the lightsource's POV
2) Occlusion query all of the rendered polygons
3) render stencil shadows for the queries that return sufficiently high numbers

My first intuition is that it should be a reasonable algorithm. Does anyone have any strong intuitions about the feasibility of this approach?

-Thomas

What about:
1/Use ShadowMaps
2/Use Occlusion Queries with ShadowMaps
3/Use LOD with ShadowMaps (depends on the quality you want though)
 
If you can tell me what the heck "tails from the trenches" actually mean and where you got that from, I'd be more than willing to provide suggestions! :)
Perhaps he is refering to WW1 where horses nand mules were still used in battle. I suspect their tails frequently got caught in the barbed wire. Someone, no doubt, probably collected it and posted it home and hence "tails from the trenches" :p
 
At one time, I'd taken the opposite approach (started off with shadowmaps, then stencils) and more or less had the same issues. Here's what someone wrote me after I sought his advice :
DasypodidaeDeveloper said:
I use four "shadow mip maps" for the large outdoor areas. It still takes quite a lot of resolution and samples to get things looking good with shadow buffers.
 
Back
Top