-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for duplicate vertices in .obj importing #29
base: master
Are you sure you want to change the base?
Conversation
Can one of the admins verify this patch? |
@mmcauliffe thanks so much for this! My only slight concern here is the ordering of the vertices and triangulation. Great that after the dedupe we are left with the correct total number of vertices/tris, tcoords, but do we know if the semantic meaning is retained? (i.e. vertex listed 2014'th in the .obj file is still the 2014'th vertex in My gut tells me that it probably does, which is great, just feels a little grim as VTK is generating a bunch of extra vertices and then cleaning them all back up, and we are counting on the cleanup to be an exact reversal of the original duplication. (To be clear this was obviously wrong in the current shipping version, and your fix is definitely an improvement, just want to confirm if it fully addresses the issue so that our loader returns something identical to what would be expected from the file. 👍) |
Yeah, so my visual inspection of clustering the Wave Kernel Signature from meshes using the old importer and the new looked identical (and that relies on ordering of the vertices and triangles). I've added a couple more asserts just to explicitly test it, so the first, tenth, last and ninth from last points and triangles are the same when imported as in the .obj file. |
Unfortunately this fix causes the following artefacts for the texture: The issue with the VTK vertex duplication is that the |
@jabooth and I discussed this at length and we came to the following conclusions:
|
Resolves #28. Based off of http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Modelling/Cxx/Delaunay3D.cxx, uses vtkCleanPolyData class to remove identical vertices prior to menpo processing.