PDA

View Full Version : Shadow volume bug



ioquan
10-28-2002, 08:09 PM
Take a look at this screenshot to see the bug I'm getting: http://home.earthlink.net/~ioquan/shadowbug.jpg .

Has anyone ever had this problem with shadow volumes or know what causes this?

I think it may be in the way I set up connectivity for the silhouette determination. I printed out the output for my adjacency information and noticed that there were more edges than expected which did not get assigned a neighbor (like one out of every 30 edges or so). I wonder if these edges which arent getting assigned a neighbor are responsible for the bug. Maybe the model file has duplicate vertices so my algorithm doesnt recognize them as being shared between the two adjacent triangles?? Does this sound like it would cause the phenomenon in the screenshot?

Any help with locating or solving the problem would be appreciated.

NitroGL
10-28-2002, 08:53 PM
Looks like the mesh might not be completely closed.

Pentagram
10-29-2002, 02:08 AM
Hmm it can be caused by some "model error". I have had similar problems by edges used by 3 triangles (mdl/md3 models Dont'ask me how that came in the model.)
The solution I use is setting all neighbours for this edge to null so you always cast a shadow with it. It may not be the best solution but it only happens for a few edges in a model normally.