• Advertisement
Sign in to follow this  

Shadowing Techniques?

This topic is 1587 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement