<div dir="ltr"><div><div>Hi Maya,<br><br></div>I have just had a quick look at the osgUtil code and can't spot a dedicate utility that just removes duplicate vertices from osg::Geometry. The osgUtil/MeshOptimizer's and osgUtil::TriStripVisitor have code for removing duplicates, these ensure that not only vertices but any associated texcoords, normals etc. are all duplicates before removing the duplicates. I guess you could try an run these over your dataset.<br><br></div><div>One thing to note is that the .osg and .osgt formats are ascii and not write out to the same precision as floating point values handled natively by the CPU so you might not see differences in the output that exist in memory. <br><br></div><div>Another avenue you could take is to write you own code to dedicate duplicate vertices and remove them.<br></div><div><br></div>Robert.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 2 October 2015 at 13:36, maya leonard <span dir="ltr"><<a href="mailto:mayaleonard3@gmail.com" target="_blank">mayaleonard3@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><pre>Hi Robert,<br><br>I'm looking for TriangleLists that do not reproduce the same vertices in VertexArray.<br><br>---------------------------------------------<br>For example I want this:<br><br>DrawElementsUInt TRIANGLES 5766<br>{ <br>2 0 1 2 1 3 1 2 4 1<br>}<br> <br>VertexArray Vec3Array 1024<br>{<br>-291.43 -202.75 266.13<br>-272.63 -202.75 267.03<br>-253.83 -202.75 265.69<br>-235.03 -202.75 267.56<br>-235.03 -202.75 297.56<br>...<br>}<br><br>---------------------------------------------<br></pre><pre>but I'm getting this:<br><br>DrawElementsUInt TRIANGLES 5766<br>{ <br>0 1 2 3 4 5 6 7 8 9<br>}<br><br>VertexArray Vec3Array 1024<br>{<br>-253.83 -202.75 265.69<br>-291.43 -202.75 266.13<br>-272.63 -202.75 267.03<br>-253.83 -202.75 265.69<br>-272.63 -202.75 267.03<br>-235.03 -202.75 267.56<br>-272.63 -202.75 267.03<br>-253.83 -202.75 265.69<br></pre><pre>....<br>}<br></pre><pre>Thank you,<br></pre><pre>Maya<br></pre><pre><br>Hi Maya,
What do you mean by unique?
Robert.
On 1 October 2015 at 22:04, maya leonard <<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" target="_blank">mayaleonard3 at gmail.com</a>> wrote:
><i> Hello OSG developers,
</i>><i>
</i>><i> I'm trying to have all my VertexArray outputs unique in my osg output
</i>><i> file. I tried using set OSG_OPTIMIZER=INDEX_MESH and other settings, but my
</i>><i> VertexArray always has duplicates.
</i>><i>
</i>><i> The osg output file is from osgUtil::DelaunayTriangulator.
</i>><i>
</i>><i> I tried using the osgconv tool, but have the same problem.
</i>><i>
</i>><i> Can someone point me in the right direction to have unique VertexArray
</i>><i> outputs?
</i>><i>
</i>><i>
</i>><i> Thank you,
</i>><i> Maya
</i>></pre></div>
<br>_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">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>
<br></blockquote></div><br></div>