<div dir="ltr">I tend to use <div>set OSG_OPTIMIZER=INDEX_MESH VERTEX_POSTTRANSFORM VERTEX_PRETRANSFORM<br></div><div>for these, but there might be something else preventing the optimizer from changing your geometry.</div><div>set OSG_OPTIMIZER=STATIC_OBJECT_DETECTION  INDEX_MESH VERTEX_POSTTRANSFORM VERTEX_PRETRANSFORM MERGE_GEOMETRY MERGE_GEODES<br></div><div>might do the trick</div><div>Laurens.</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 15, 2018 at 9:10 AM Jad Killian <<a href="mailto:m.hasani@outlook.com">m.hasani@outlook.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
When I import a .obj file with readNodeFile, the result is a triangle strip instead of triangles. Even if the .obj file is a simple square with 4 vertices and 2 triangular faces, the resulting primitive set in the geode geometry contains<br>
1 face, 4 indices with mode = 5 (TRIANGLE_STRIP).<br>
<br>
I tried using the osg::Optimizer, but it doesn't seem to do anything:<br>
<br>
<br>
<br>
Code:<br>
osg::ref_ptr<osg::Node> node = osgDB::readNodeFile(filepath.toStdString());<br>
<br>
osgUtil::Optimizer optimizer;<br>
optimizer.optimize(node, osgUtil::Optimizer::INDEX_MESH);<br>
<br>
<br>
<br>
for optimizer flags I tried INDEX_MESH, TESSELLATE_GEOMETRY, DEFAULT_OPTIMIZATIONS, nothing seems to work.<br>
<br>
Any ideas?<br>
<br>
Thanks<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=74401#74401" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=74401#74401</a><br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div>