[osg-users] Tiny normals: osgviewer vs osgcompositeviewer

Robert Osfield robert.osfield at gmail.com
Mon Dec 4 00:25:10 PST 2017

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


On 3 December 2017 at 21:34, Per Nordqvist <nordqvist at gmail.com> 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)
> 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
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

More information about the osg-users mailing list