Thank you for responses! Turns out my scene contained hanging leaf transforms and it was the issue. I removed them and now it works just fine.
Regarding the root node issue you have mentioned. I've noticed the variable name "nodeWeCannotRemove" and already tried adding a dummy Group above it but without it Optimizer will just apply the transform and set its matrix to identity. So it should work anyway. Regards, Sergey. 25.04.2019, 11:26, "Robert Osfield" <robert.osfi...@gmail.com>: > Hi Sergey, > > The FLATTEN_STATIC_TRANSFORMS operation is not able to remove the > topmost node so can't flatten this MatrixTransform you've added. This > limitation is due to the optimization being called with external code > holding a pointer/reference to that topmost node. To be able to > optimize this topmost node away we'd need to come up with a new API > that requires users to replace the pointer references they have. > > Without any API changes the way to get round this limitation is to > have a Group node as the topmost node, then have the new > MatrixTransform as a child of this group, then the original scene > graph below the MatrixTransform. > > Robert. > > On Wed, 24 Apr 2019 at 21:16, Sergey Lukashev <lukashe...@ya.ru> wrote: >> Hello, osg folks! >> >> I've used FLATTEN_STATIC_TRANSFORMS and it works quite good. However, now I >> need to rotate the scene, so I added a MatrixTransform on top of the root >> node. But it does not get flattened for SOME models. I properly set >> DataVariance of every Transform to STATIC before running the Optimizer. Can >> somebody point out where issue could come from and how to debug or solve it? >> >> -------------------------------------- >> Regards, Sergey. >> _______________________________________________ >> 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 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org