Shadow volumes for nonmanifold geometry
Shadow volumes for nonmanifold geometry
I should mention, I don't actually use this engine, though I have great respect for both it and Carsten himself. I prefer to mess about at a lower level, even if I don't get much in the way of results that way. Now on topic.
Ca3de, like doom 3 and similar games, only casts shadows correctly if the object is "air tight" right? Well there's a paper I stumbled on recently that describes an algorithm which works for any geometry and still creates optimal volumes. You can find it here: http://www.hitlabnz.org/fileman_store/2 ... dridge.pdf I think it's slightly simpler than the original algorithm (not that I've tried the original), and all the data required can be generated from the vertex and index data. I tried it out, and you can find some lame looking screenshots here: http://www.razor.byethost.com//article. ... 8162616489
I'm just posting this because I thought you might be interested in the algorithm. It would give artists that much more freedom, and I don't know of any existing engines that use it. Oh, and I wasn't sure which forum to put this post in. It's a bit technical, but seeing as it's not really about development with the engine I put it here.
Ca3de, like doom 3 and similar games, only casts shadows correctly if the object is "air tight" right? Well there's a paper I stumbled on recently that describes an algorithm which works for any geometry and still creates optimal volumes. You can find it here: http://www.hitlabnz.org/fileman_store/2 ... dridge.pdf I think it's slightly simpler than the original algorithm (not that I've tried the original), and all the data required can be generated from the vertex and index data. I tried it out, and you can find some lame looking screenshots here: http://www.razor.byethost.com//article. ... 8162616489
I'm just posting this because I thought you might be interested in the algorithm. It would give artists that much more freedom, and I don't know of any existing engines that use it. Oh, and I wasn't sure which forum to put this post in. It's a bit technical, but seeing as it's not really about development with the engine I put it here.
Noone quite knows why I'm here...
Hi Razor,
nice to hear from you, and thanks for the information!
Good news is that Ca3DE can deal correctly with non2manifold geometry since a while, that is, it also gets shadows right for severely "broken" polygonal meshes.
The key strategy that Ca3DE implements is very simple and effective: It treats edges that only have one polygon (i.e. the polygon has no neighbour at that edge) always as silhouette edges. Edges where more than two polygons meet are treated like edges with only one polygon  they're always considered silhouette edges, too.
It's a bit surprising, but this simple strategy solves the problem reliably.
You can think of how you would treat a single triangle if it was to be used as a shadow caster. The fact that any polygonal model, no matter how "broken" it is, could be treated as a set of individual triangles, "proves" the correctness of this approach.
I've looked at the paper that you linked above, and I think that what they do is overly complicated, especially as edges with not two (or worse, more than two) neighbours should rarely occur anyway.
Anyways, thank you very much for your post  I'm very grateful for any tips in this regard
nice to hear from you, and thanks for the information!
Good news is that Ca3DE can deal correctly with non2manifold geometry since a while, that is, it also gets shadows right for severely "broken" polygonal meshes.
The key strategy that Ca3DE implements is very simple and effective: It treats edges that only have one polygon (i.e. the polygon has no neighbour at that edge) always as silhouette edges. Edges where more than two polygons meet are treated like edges with only one polygon  they're always considered silhouette edges, too.
It's a bit surprising, but this simple strategy solves the problem reliably.
You can think of how you would treat a single triangle if it was to be used as a shadow caster. The fact that any polygonal model, no matter how "broken" it is, could be treated as a set of individual triangles, "proves" the correctness of this approach.
I've looked at the paper that you linked above, and I think that what they do is overly complicated, especially as edges with not two (or worse, more than two) neighbours should rarely occur anyway.
Anyways, thank you very much for your post  I'm very grateful for any tips in this regard
Best regards,
Carsten
Carsten

 Posts: 25
 Joined: 20060220, 16:46
 Location: Lake Havasu City AZ
I didn't know that! You never cease to amaze me .Carsten wrote: Good news is that Ca3DE can deal correctly with non2manifold geometry since a while, that is, it also gets shadows right for severely "broken" polygonal meshes.
That actually works? If it's so simple then why did the writer of that paper never succeed in modifying the Crow/Bergeron’s algorithm? Or does it just work in enough cases that there isn't any trouble?Carsten wrote: It treats edges that only have one polygon (i.e. the polygon has no neighbour at that edge) always as silhouette edges. Edges where more than two polygons meet are treated like edges with only one polygon  they're always considered silhouette edges, too.
I don't really see how it's complicated... They just take the front facing polygons and use their counter scheme to find edges that aren't shared (and other cases) and need extruding. Still, you have your way implemented and tested already, so whatever the advantages or disadvantages you should probably stick with it.Carsten wrote: I've looked at the paper that you linked above, and I think that what they do is overly complicated, especially as edges with not two (or worse, more than two) neighbours should rarely occur anyway.
If the screens were of Ca3de I wouldn't be telling Carsten about it would I? And while it does look nice, 4fps really doesn't cut it.Cereus Prods wrote: Are those screenshots form this engine?! The ones in the PDF not the site.
Noone quite knows why I'm here...
No, it works "always". This is because, theoretically speaking, it reduces all complex cases to the case of a single, individual triangle. As the edges of an individual triangle are always silhouette edges, the approach is always right.RAZOR wrote:That actually works? If it's so simple then why did the writer of that paper never succeed in modifying the Crow/Bergeron’s algorithm? Or does it just work in enough cases that there isn't any trouble?
The only potential problem that I can see is that when three or more triangles meet at a common edge, there might be a small performance penalty, because a shadow volume facet gets drawn that is canceled out later when the same facet is drawn in opposite orientation.
Sure, their approach is not really "complicated", I just said that because I think that mine is even simpler.RAZOR wrote:I don't really see how it's complicated... They just take the front facing polygons and use their counter scheme to find edges that aren't shared (and other cases) and need extruding. Still, you have your way implemented and tested already, so whatever the advantages or disadvantages you should probably stick with it.
Best regards,
Carsten
Carsten
Who is online
Users browsing this forum: No registered users and 2 guests