On 10/19/2012 09:28 AM, Michael Schanne wrote:
Hi,
I have a model that I converted from an .stl file to .osg. I wanted to apply a
scaling to the model, so I added a MatrixTransform with a scaling matrix above
the model's root node. For maximum efficiency I wanted to apply the transform
directly to the vertices, so I tried to run the .osg file through osgconv a
second time, with the OSG_OPTIMIZER env variable set to
FLATTEN_STATIC_TRANSFORMS. However, the new file was identical to the previous
file, with the parent MatrixTransform still in place. I set the DataVariance
of the transform to STATIC, and it had no effect. Is there something else that
could interfere with the Optimizer flattening the transform, or am I expecting
FLATTEN_STATIC_TRANSFORMS to do something that it's not intended to do?
Hi, Michael,
The structure of the scene itself can sometimes prevent the transform
from being flattened away. What happens if you try
FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS (sometimes, you
just need a bigger hammer :-) ).
--J
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org