Skip to main content
GameDev.net gamedev.net
🔒 Locked

Shadow map method

Started by Madoc Sep 27, 2007 at 9:27 AM 1 replies 1k views
Original Post
Madoc
Madoc
Hello, I've been using stencil shadows for all dynamic shadowing for years now and I've not seriously looked into shadow maps. Now I'm moving to the great outdoors and I seriously need an image space approach. I've done a fair bit of research and I think I have a reasonable overview of all the more popular methods, but before I get into those I'd like to run some ideas of my own by someone with experience in shadow maps. One of the things I most dislike about shadow maps is the shimmering aliasing artifacts given by view-dependant methods. I am looking into directional lights, ie the sun, only (stencil shadows for other lights). My terrain is split into a square grid and each cell can be rendered independantly with it's own state set. Exploiting this, I would consider rendering a view-independant shadow map per cell. The advantages I see in this approach are: 1) View independant and hence aliasing artifacts don't move with camera transforms. 2) View independant and hence no need to re-render shadow maps for additional renderings in same time-slice (i.e. water reflections). 3) Per-cell updates means I can update distant shadow maps (very large portions of the scene) with considerably lower frequency. The only downside I see is the relatively poor distribution of samples in view space for a first person or similar view. This could result in poor resolution close up and minification artifacts further away. Also, I am presuming that I can trasform my shadow map projection so as to obtain an isotropic distribution of shadow map samples onto my square terrain cell. Not sure how yet but I presume this would be fairly easy? So, can someone with experience in shadow maps suggest how serious these issues might be and help me figure out if this approach could be worthwhile? Thanks
cignox1
cignox1
I'm not an expert on the topic, I've only implemented SM once in a pixel shader. I suppose that you already know the algorithm (I don't remember the name) wich consists of rendering multiple SM from the sun POV with increasing angle of view. Each of them is centered on the Player. You then use the SM taken with the smallest angle for closest geometry, and the one with biggest angle (and so worst resolution) for distant landscape.

If you are interested in this approach, I'm sure you would't find it hard to find the paper or a tutorial about it.
wolf
wolf
there are a bunch of threads regarding shadows. I remember that a similar idea as yours was used in Medal of Honor: Pacific Assault.
Nowadays most AAA titles use Cascaded Shadow Maps. Just google for this term or read the ShaderX5 article. Parallel-Split Shadow maps are cascaded shadow maps with a clever way to determine the size of the slices. So this article covers the determination of those slices.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.