[osg-users] Tiny normals: osgviewer vs osgcompositeviewer

Per Nordqvist nordqvist at gmail.com
Sun Dec 3 13:34:48 PST 2017


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20171203/51d2b83b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: red.osgt
Type: application/octet-stream
Size: 6904 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20171203/51d2b83b/attachment.obj>


More information about the osg-users mailing list