Hi Terry,

You can't flatten a static transform when anything it its subgraph is
shared with other transforms, if you do flatten it the the object is
the trying to be in two places at one time, something it can't do,
what happens to these objects is undefined, in fact quite rightly
disallowed until you hacked away at it...

The only way to flatten these objects shared beneath multiple
transforms is to duplicate the subgraph so that each transform has its
own unique subgraph.  This itself has its own penalties in terms of
performance.

Robert.

On Jan 29, 2008 7:14 PM, Terry Welsh <[EMAIL PROTECTED]> wrote:
> So I have a big city database that I built in Creator with lots of
> external models loaded under transform nodes.  I assumed that
> Optimizer could flatten this out for me with
> FLATTEN_STATIC_TRANSFORMS.  Unfortunately, I only end up flattening 35
> out of 911 transforms.
>
> Tracing through the code, I find that line 804 of Optimizer.cpp is
> where things go bad for me:
>
> if (_firstMatrix!=matrix) _moreThanOneMatrixRequired=true;
>
> This line rejects most of my flattening because later on
> _moreThanOneMatrixRequired seems to be used to decide whether or not
> to flatten.  If I comment this line out, then all but the first
> instance of each model disappears from my scene.
>
> Understanding all the logic in Optimizer.cpp could take me a long
> time.  Is there some fundamental reason why having more than one
> matrix makes it impossible to flatten a model, or is this just
> incomplete code that I could extend to give me a more thorough
> flattening?  Any tips on how to try and extend it would be great
> too....
> --
> Terry Welsh - mogumbo 'at' gmail.com
> www.reallyslick.com  |  www.mogumbo.com
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to