Cleaning up unused Vertices

Software: Away3D 4.x

EFFalcon, Jr. Member
Posted: 02 December 2014 04:48 AM   Total Posts: 44

Is there any methods that would assist in cleaning up unused Vertices.

I’m manipulating some mesh faces, and the end result is that i get a bunch of vertices that are no longer required.

I was using Facehelper.removeface, however that splits out any shared vertices, and welding them is only so effective (some models have split edges on purpose)

   

Avatar
Fabrice Closier, Administrator
Posted: 02 December 2014 11:36 AM   Total Posts: 1265   [ # 1 ]

simply ask vertices buffer and indices. make new vertices and indices buffer. Loop using old indices, fill new buffers. Use dictionary to keep track of new/old index. If the same index occurs again, push in new indices buffer with stored “new index”. This allows you to remove unused vertices, yet keep shared cases. of course this applies to uvs, normals, secondaryuvs as well and is to be done during same loop.

   

EFFalcon, Jr. Member
Posted: 09 December 2014 05:09 AM   Total Posts: 44   [ # 2 ]

I’ll give it a crack.

thanks!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X