Hi Nikolaus,

On 7/11/06, Hanekamp, Nikolaus <[EMAIL PROTECTED]> wrote:
I found the reason why the Geometry is not merged enough.

Optimizer.cpp:
mgv.setTargetMaximumNumberOfVertices(10000);

When this limit is reached, the rest of the Geometry of this Geode is not 
merged at all.
( instead of restarting the merging).
So I get lots of Geometry nodes with only 1 triangle.

After rising the number from 10000 to 32767 the merging works well.
How can this be done without changing the Optimizer code ?

Thanks for picking up on this.  I think what should be happening is
that each osg::Geometry should be capped at 10,000 vertices, but for
it not to stop merging, so that you have a collection of geometry all
that have roughly 10,000 vertices in.


The new performance data:

Loading:    8.9 sec  -> 20.7 sec  // multiple loaded
Optimizing: 1.3 sec  -> 30.9 sec
Cull:       0.3 msec ->  0.7 msec
Draw:       5.3 msec ->  6.2 msec

Some statistics:
Flt      OpenFlight
49       89    Drawables
8849     8779  Primitives
30825    29716 Vertices

The loading and optimizing is still much slower using the new .flt loader.
A simple merging of consecutive faces, which have the same state, into 1 
Geometry within the loader
could help save time for loading and optimizing.

The merging is likely to be the bit slowing things down.  Perhaps
having a OpenFlight specific merge inside the loader would be
appropriate. The original one inside the old OpenFlight plugin was
pretty ropey and not something I'd want to copy though.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to