Hi Terry,

Sorry about the delay on reviewing and getting your new visitor
integrated, been rather blown off my feet by the quantity of
submissions pouring in.  You new visitor is now integrated into
osgUtil::Optimizer, and is called
FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor, rather than
just FlattenVisitor as you had before.  I've gone for the long winded
by informative name as it's more useful for maintenance long term to
have descriptive names - end users will rarely construct it directly
themselves so it shouldn't be a problem having the long name.

I haven't enabled the use of this visitor by default as the potential
for greater memory consumption is something that we might not want to
adopt for all scene graphs.    In the Optimizer::OptimizationOptions
there is a new enum entry
FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS that can be
used to enable the operation of the new visitor, and env support for
enabling this too i.e.

export OSG_OPTIMIZER="DEFAULT
FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS"
osgconv mymodel.flt mymodel.ive

With the merge I also change the coding style so it was more closely
aligned with the rest of the OSG.  In performance testing I saw around
a 3% improvement on a big OpenFlight town model I had.  Not huge, but
certainly welcome.

Cheers,
Robert.

On Fri, Apr 25, 2008 at 9:40 AM, Robert Osfield
<[EMAIL PROTECTED]> wrote:
> Hi Terry,
>
> Sorry about this, been so rushed off my feet that I've missed some
> submissions.   Once the dust has settled after OSG-2.4 I'll get back
> and review your submission.
>
> Robert.
>
> On Thu, Apr 24, 2008 at 11:45 PM, Terry Welsh <[EMAIL PROTECTED]> wrote:
>> Hi Robert,
>>  Just thought I'd check on your plans for using this Flattener or see
>>  if you wanted help integrating it into Optimizer.  If it doesn't
>>  interest you, I'll probably use it a couple more places here at work
>>  and get it checked into my own repository.
>>  - Terry
>>
>>
>>
>>  On Thu, Feb 21, 2008 at 5:24 PM, Terry Welsh <[EMAIL PROTECTED]> wrote:
>>  > Here's my flattener that wipes out static transforms and duplicates
>>  >  subgraphs as necessary.  If you have a model with a lot of static
>>  >  transforms, this may make it run faster at the cost of a lot more
>>  >  memory.  My models got about a 25% framerate improvement.
>>  >
>>  >  This works with some pretty complex models that I have tried it on,
>>  >  but I'd be surprised if I thought of every possible corner case.  I
>>  >  hope other people can try it out.  Sorry I didn't include a demo
>>  >  application, but that stuff is all secret and stuff.  It's a simple
>>  >  visitor so it's easy to add to existing code.
>>  >
>>  >  Before it gets rolled into Optimizer it will need a better name, and
>>  >  there might be ways to have better code reuse (some of the functions
>>  >  are quite similar right now).
>>  >  --
>>  >  Terry Welsh - mogumbo 'at' gmail.com
>>  >  www.reallyslick.com | www.mogumbo.com
>>  >
>>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to