Hi J-S,

Thanks for getting back to me. I'll look to test this today. I suppose a 
related question would be whether the Collada reader/writer should be amended 
to make use of this explicitly itself? The issue being that given this is a 
graphics driver issue, and our software may be run on hundreds of machines, it 
would be a nice "comfort" factor to know that this particular problem isn't 
likely to arise.

Many thanks for thoughts and help,

Neil.


---- "Jean-Sébastien Guay" <jean-sebastien.g...@cm-labs.com> wrote: 
> Hi Neil,
> 
> I'm reordering your questions a bit to make the response more linear :-)
> 
> > Has anyone considered this already and come up with a really neat solution 
> > ? I recognise that coding around driver issues is not ideal, and may not be 
> > desireable.
> 
> Yes, the osgUtil::Optimizer supports what you want. So you could use one 
> of the osgUtil::Optimizer classes to the work for you (independently of 
> whether your input model was COLLADA or any other format). Optionally 
> you could just call osgconv with the appropriate OSG_OPTIMIZER 
> environment variable on your model. Here are the relevant 
> classes/environment options:
> 
> > One of the comments I read on the mail archive seemed to imply that in 
> > general to  avoid these scaling problems, the model vertices should be 
> > scaled directly, and not via matrix operations. 
> 
> osgUtil::FlattenStaticTransformsVisitor
> FLATTEN_STATIC_TRANSFORMS
> 
> > I guess there are some complications here as if differing nodepaths to the 
> > same model produce differing scaling factors, the collada export is going 
> > to need to write geometry definitions for each of these nodepath scaled 
> > model instances.
> 
> osgUtil::FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor (wow 
> what a mouthful :-)
> FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS
> 
> I have never used those myself, but they should work. Let us know how 
> you get on. The Optimizer also has a lot more things it can do to help 
> you optimize your scene graph, so it's worth it to explore the options 
> (osgconv --help-env) and the osgUtil/Optmizer header.
> 
> Hope this helps,
> 
> J-S
> -- 
> ______________________________________________________
> Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
>                                 http://www.cm-labs.com/
>                          http://whitestar02.webhop.org/
> _______________________________________________
> 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