Fix for duplicate vertices in .obj importing#29
Fix for duplicate vertices in .obj importing#29mmcauliffe wants to merge 4 commits intomenpo:masterfrom mmcauliffe:obj_import_fix
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.