Perspective shadow maps

Started by
4 comments, last by mrmuk 21 years, 1 month ago
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?
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...
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
-------------------Realm Games Company
Googling for "siggraph 2002 papers" gave this as the first hit. I don''t know if all of them are there though.
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.
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?

This topic is closed to new replies.

Advertisement