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    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to