My investigation with the "sbad.osg" model reveals that the Simplifier is
not removing the centermost edge because it thinks it is a boundary edge. It
thinks this because the two vertices are repeated twice in the model, each
time with a different normal. The Simplifier encounters the edge twice, each
time with only one triangle. If I go in and hack the model to use the same
normal everywhere (as in the "sgood.osg" model), then the Simplifier
encounters the edge once, with two triangles (one on either side), and does
not consider it a boundary edge, and proceeds to collapse it.
 
I can see the value in not collapsing boundary edges for the purpose of
generating terrain tiles. However, I wonder if there is some value in
providing a mode that would allow boundary edges to be collapsed? I'll run
some tests and see if I can obtain good results with some trivial changes.
   -Paul
 
 


  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Martz
Sent: Thursday, October 16, 2008 11:40 AM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] Simplifier algorithm


Robert -- Thanks for the previous explanation. I believe that the
EdgeCollapse is confused about its definition of an error.
 
I've attached two nearly identical models. To simplify them:
   osgconv --simplify .3 sgood.osg sgood-out.osg

   osgconv --simplify .3 sbad.osg sbad-out.osg
 
sgood.osg simplifies as I would expect -- the center edge collapses, and the
model retessellates.
 
The model sbad.osg does not simplify at all. Note, however, that if the
analogous center edge were removed from sbad.osg, and the model
retessellated (as was done for sgood.osg), the resulting model would be
identical in appearance to the original. Thus, collapsing sbad.osg's center
edge would not introduce any error to the model. That right angle along the
x-axis in sbad.osg appears to make the EdgeCollapse class incorrectly
conclude that removing the center edge would introduce an error, when, in
fact, it would not.
 
I understand the Simplifier is used by VPB for terrain. However, I'm
wondering if it could be enhanced to handle the sbad.osg model. I can
probably spend a few hours digging in. I'd appreciate any pointers (yes, I
know it's been a while since you coded it :-).
 

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com <http://www.skew-matrix.com/> 
+1 303 859 9466

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to