Hi Per, A quick response as I've got a clean build of the OSG happening and can't test anything till it's finished. My guess is that the osgUtil::Optimizer is doing something like flattening static transforms in the scene. The transforms that you have in the scene are really extreme w.r.t scaling, also why so many, this is really inefficient.
Robert. On 3 December 2017 at 21:34, Per Nordqvist <[email protected]> wrote: > Hi all, > > I came across something strange recently; > the attached model is a red triangle scaled down by a factor 1000. > The normals are squashed and I see some rendering problems in my app, > which uses osgcompositeviewer. > > Confirmed with > osgcompositeviewer red.osgt - renders with white color (incorrect) > BUT > osgviewer red.osgt - renders with red color (correct) > > I did some digging in the OSG code, it seems the difference is that > osgviewer always > optimizes the scene graph, something that osgcompositeviewer never does. > Adding an optimizer to osgcompositeviewer fixes the rendering. > > So first question; would it be better if the two viewers applied same > optimizer settings? > Since users would expect them to display things in the exact same way. > > Second and more interesting; how can optimizer correct a "broken" model? > > Thank you! > > /Per > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

