Shadowing Techniques?

Started by
2 comments, last by 21st Century Moose 10 years, 7 months ago

Is there any good shadowing techniques that work really well in XNA and are easy to implement. I have seen lots of tutorials on shadows, but many do not work on big worlds it seems like almost like the depth map can't see that far? I really just need help rendering shadow maps onto large worlds. If anyone has seen a good article or use a certain method please tell me. Thanks in advance!

Advertisement

There are a number of shadow mapping tutorials for XNA, so I guess that should be easy to implement. Shadow mapping is perhaps the most widely used shadowing technique in modern games. As you pointed out, it has some issues, especially with shadowing large outdoor areas.

If you want to have all objects cast a shadow from a directional light like the sun, for example, you might want to look at cascaded shadow maps. CSM is farily trivial to implement after having implemented normal shadow mapping, as it essentially just means you render the shadow map a number of times instead of just once. With CSM, shadow mapping generally works well in large areas.

Also for large outdoor scenes, (along with CSM as suggested), there are ways to improved depth buffer storage. Look up logarithmic depth buffers.

Perception is when one imagination clashes with another

The most suitable shadowing technique really depends on a lot of factors, but the really relevant ones would be how many lights you have, how many of those do you want to be shadow-casting lights, is your light-blocking geometry static or moving, are your lights static or dynamic, are you doing directional lights, point lights or spotlights, are you a forward or deferred renderer, and how much do you actually care about performance? (That last one's only semi-tongue-in-cheek).

Shadow maps are the standard "go to" technique but can suffer from aliasing and depth-biasing crap which can be fiddly to deal with. Oddly, I'm doing some research at the moment that seems to indicate that for certain scenarios (deferred, lots of omni-directional lights, everything can cast shadows, DX10+ GPU) using stencil shadow volumes may be a more optimal choice. This is really an "it depends" answer.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

This topic is closed to new replies.

Advertisement