Jump to content
  • Advertisement
Sign in to follow this  
Bruno

shadow maps

This topic is 4348 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

Hi., I got shadow maps working (projected shadow maps) for my outdoor engine, however i'm facing a little problem. I'm using 2 shadowmaps, one of 1024x1024 that gets the shadows that are far away from the player, and 1 shadowmap of 2048x2048 that gets the shadows near the player. I'm placing the light origin above the player(at a height of 30 for the close shadowmap and at a height of 60 for the far away) and the light destination is the player itself. So, this way as the player moves around the shadows are getting updated. Now, the problem is that because the light moves with the player, the shadows move slightly in the ground, because the light is moving. One way to fix the problem is to increase the height of the light, but then i loose shadow resolution.., Any ideias on how to solve this ?? thanks, Bruno

Share this post


Link to post
Share on other sites
Advertisement
This is a problem with this kind of shadow, where the camera moves with the player.

Possible fixes I have found:

Blur the shadow maps, using variance shadow mapping and gaussian blur shaders..

Move the shadow camera at intervals instead of constantly, this way the the effect is less noticeable.






Share this post


Link to post
Share on other sites
Thanks Matt,

I can see bluring the shadow will help, if the shadow is too pixelated(the light high above), however moving the camera at intervals, won't that be worse ?
I mean, the player will see big jumps from one shadow position to the other.

thanks again,
Bruno

Share this post


Link to post
Share on other sites
You should be using an orthagonal projection matrix for your shadows..there shouldn't be any big jumps. I thought you were talking about the the little resolution shimmerers that normally happen..

It sounds like you are using a perspective matrix... this cant work. Use an ortho matrix.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!