Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • OpenMesh OpenMesh
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 15
    • Issues 15
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenMeshOpenMesh
  • OpenMeshOpenMesh
  • Merge requests
  • !84

Fixed broken indices for some cases of OBJ parsing by using two passes

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Ghost User requested to merge obj-fix-wrong-indices into master Aug 30, 2016
  • Overview 5
  • Commits 1
  • Pipelines 1
  • Changes 2

(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 to~59 seconds from ~65 seconds, so I believe the performance overhead could probably be considered acceptable.

Looking forward to your feedback!

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: obj-fix-wrong-indices