Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

mrmuk

Perspective shadow maps

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

I implemented the algorithm for directional lights as described in the SIGGRAPH 2002 paper by Stamminger and Drettakis, but ran into severe distortion problems. It seems that when the near plane is too near or the far plane too far, the z coordinate of the position of the light source in clip coordinates gets near to 1. This means the field of vision required for the light''s frustum to fit around the unit cube representing the view frustum becomes near 180 degrees, which is of course bad. The paper mentions adjusting the near plane as far as possible based on values read from the depth buffer, but even this method cannot work when there actually is geometry near the camera that you don''t want to be clipped away. Any ideas?

Share this post


Link to post
Share on other sites
Advertisement
Still no ideas?

I''ve also been trying to linearize the depth value distribution according to Practical Shadow Mapping by Brabec et al. but it seems it does not work very well with the extra perspective projection in the middle of the transformation hierarchy.

Is linear depth distribution even needed with PSM to get good results?

In any case I''d really like to know how to get the regular PSM working properly first...

Share this post


Link to post
Share on other sites
Sorry, I have very little experience in shadows, but can you post a link to the Siggraph 2002 papers? I''ve tried to find them (yes, I tried google), but I have not had much luck.

-------------------
Realm Games Company

Share this post


Link to post
Share on other sites
Yes, the sliding z-plane problem. A classic. It''s not that bad for far-away directional lights, such as the sun. You can adjust the near plane based on some approximation, using the objects bounding boxes.

It''s harder with local lights, esp. pointlights. It seems that everyone who has implemented PSMs have found some personal method to solve (or alleviate) the problem, there is no real generally accepted algorithm. Unfortunately, this is one of the rare situations, where I just can''t tell you how we did it. It took us quite some time to come up with an algorithm to almost solve that problem completely, but some things just need to stay confidential if you want to stay competitive. Sorry about that, I know that this problem is highly annoying.

Share this post


Link to post
Share on other sites
Ok, fair enough. I''m wondering if you could still elaborate a bit on other areas of PSMs, such as the depth value distribution issue I mentioned?

Share this post


Link to post
Share on other sites

  • 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!