PDA

View Full Version : selfshadowing artifacts



Krogoth
04-05-2003, 02:26 PM
I have my first implementation of zpass shadow volumes working, but im seeing some severe artifacts regarding selfshadowing:
http://www.cvmt.auc.dk/~rul/shadow1.jpg

The silhouette edge on the sphere is just too obvious and im interested in some way to make it less visible. I know I can tesselete the sphere more but that doesn't sound like a very elegant solution (and the problem is still there to some extent), and it doesn't fit well with people writing they are using low poly meshes for their shadow volumes to gain more fps. Also i have tried messing around with glPolygonOffset but it didn't really help, so I would really appreciate some adviced on how to make the selfshadowing look better.

dorbie
04-05-2003, 02:55 PM
You need to use directional lighting with *no ambient* that is appropriate for the shadow direction so the surface brightness fades towards the silhouette. There are more advanced techniques to fix second order effects but that should satisfy you for now.

Fix your lighting first THEN look here if you want to get it even better for significant additional difficulty:
http://www.r3.nu/~cass/shadow_volumes/


[This message has been edited by dorbie (edited 04-05-2003).]

Krogoth
04-06-2003, 03:09 PM
Ok, I got the lighting fixed (the fading towards silhouette did the trick) and now it's looking good with a point light and ambient. But I'm wondering why you suggested me to use directional lighting and no ambient to get it working? Also can you explain some more about the techniques to fix second order effects? Though I haven't run into any second order effects so far, but that's probably due to the simple test scene.