   Shadow Map Questions: (less pressure :))
  I've got my shadow maps "working". But now I am curious how to improve them. How do you normally manage shadow maps (I assume there are many not just one huge one)? Right now my scene is only lit by 1 directional light. So I was thinking I could just move the light around the xz plane always looking in the same direction and use this updated position to render the shadow map. Maybe a grid of 9 moved around like this could cover the whole viewing error. But then since they are projections wont they overlap if the scene is far away? Or not cover all if the scene is close? Also I'm getting a weird self shadowing artifact, any suggestions?Progress:[Edited by - honayboyz on December 6, 2005 6:48:14 PM]
  For the general problem of how to manage shadow maps in an outdoor scene... that's a tough one, and something I'm currently trying to work on.But as for the self-shadowing, just offset the depth a little either at the shadow map render stage, or when doing the depth comparison.;Quote:Original post by honayboyzAlso I'm getting a weird self shadowing artifact, any suggestions?For those artifacts in the image, try to play with D3DRS_SLOPESCALEDEPTHBIAS.Cheers, Altair;Quote:Original post by AltairXQuote:Original post by honayboyzAlso I'm getting a weird self shadowing artifact, any suggestions?For those artifacts in the image, try to play with D3DRS_SLOPESCALEDEPTHBIAS.Cheers, AltairShould have mentioned I'm using opengl..As far as polygon offset. I've been trying to use this at the render to texture stage. When I offset the occluding geometry towards the light, I get more complete self shadowing but it still looks like poop. When I offset the geometry away from the light, I lose all self shadowing and related artifacts but I get un realistic shadows on curves due to the lack of self shadowing.My method culls front faces while rendering their depth to the texture. Since the back face is where the fighting is occuring, shouldnt' I draw the front faces and offset away from the camera alot, instead of drawing the back faces and offsetting towards the camera?I've always hated stencil shadows but I feel like using a strictly shadow map environment is never going to look right (at least outside)...   ;  I'm sure there's something equivalent to that render state in OpenGL since constant bias + slope-scale bias are pretty much standard ways to tweak biasing issues in shadow mapping. Rendering back/front faces is tradeoff between either having shadow or light leaks. Also rendering back faces requires you actually have back faces in your objects to render, which may not be the case for optimized geometry. I use front faces myself and just try to do proper biasing.Cheers, Altair