• Jan Möbius's avatar
    Merge branch 'obj-fix-wrong-indices' into 'master' · 4c35d544
    Jan Möbius authored
    Fixed broken indices for some cases of OBJ parsing by using two passes
    
    (Continuing fixing / discussion from https://graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/merge_requests/51)
    
    This merge request is fixing an issue that came up as a follow-up of the following merge request:
     https://graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/merge_requests/51
    
    The problem it fixes occurs for some kinds of OBJ data, where vertices and face data are stored interleaved and, at the same time, the mesh contains some non-manifold geometry.  As non-manifold geometry triggers the on-the-fly creation of new vertices during parsing, the indices from the OBJ file do not match any more and the result gets messed up.
    
    The straightforward solution applied on this branch is to parse to whole OBJ file in two passes, first the vertices and then the material data and faces. This way, possible extra vertices will always be added to the back, not interfering with indices from the OBJ file
    
    I tested the performance on a 1.1 GB OBJ file. The loading time on my machine increased from ~59 seconds to ~65 seconds, so I believe the performance overhead could probably be considered acceptable.
    
    Looking forward to your feedback!
    
    
    See merge request !84
    4c35d544
Name
Last commit
Last update
CI Loading commit data...
Doc Loading commit data...
cmake Loading commit data...
debian Loading commit data...
qmake Loading commit data...
src Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
.qmake.cache Loading commit data...
CHANGELOG.md Loading commit data...
CMakeLists.txt Loading commit data...
LICENSE Loading commit data...
OpenMesh.pro Loading commit data...
README.md Loading commit data...
VERSION Loading commit data...
release.howto Loading commit data...