Skip to content
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

Manifoldness repair #97

Open
pca006132 opened this issue Jan 26, 2025 · 5 comments
Open

Manifoldness repair #97

pca006132 opened this issue Jan 26, 2025 · 5 comments

Comments

@pca006132
Copy link

Outline

Repair triangle soup that are not manifold.

Details

Basically, a valid solid mesh should be both manifold and has no self-intersection. However, models from the internet may contain defects. This project is about coming up with an algorithm that converts and repair a triangle soup into a manifold mesh.

This will contain a lot of heuristics, basically what we need is:

  • Stitching faces together, and maybe join faces that are close enough.
  • Fill holes.
  • Duplicate vertices and edges such that the result is a manifold in terms of connectivity.

Expected Outcome

Implementation of said algorithm.

Future Possibilities

Project Properties

Skills

  • C++
  • Graph data structure.
  • Algorithms.

Difficulty

Hard.

Size

Long (350h)

Additional Information

@elalish
Copy link
Contributor

elalish commented Jan 29, 2025

We have a starter algorithm for this: Merge() that only merges nearby edges. It's conservative and gives up if the mesh is not close to manifold to begin with. Still, it's a reasonable place to start.

We do not expect a result free of self-intersections for this project - that's a separate project.

In general, a non-manifold mesh can require a lot of heuristic additional surfaces, so part of this project is artistic in nature: what additions make the most sense and look reasonable?

@Abhyudaya30Singh
Copy link

Hi @elalish @pca006132 , I'm Abhyudaya Singh, and I would love to contribute to this issue! I notice the Merge() function assists in stitching together neighbouring edges. What are its existing constraints when working with non-manifold meshes, specifically situations where the merge vectors were compromised? Are there known failure modes or edge cases that need special treatment?

@pca006132
Copy link
Author

I think you can check the definition of manifoldness first. By non-manifold, we typically mean meshes with holes, as well as meshes that are non-manifold geometrically (due to shared vertices/edges). I am not sure what you mean by "the merge vectors were compromised".

@elalish
Copy link
Contributor

elalish commented Feb 20, 2025

Generally the merge vectors are not so much "compromised" as missing entirely. Merge() can only stitch together verts within tolerance of each other - it simply hopes this is enough to make a manifold. For any larger gaps or holes, a more serious bunch of heuristics are necessary. Our triangulator may help with hole filling, but it may need some help with significantly non-planar ones. Perhaps something like our CreateFaces function could first break the holes into more nearly planar patches? Anyway, there are lots of possibilities. First step is to go find a set of popular meshes that aren't manifold (which is most of them), so we can test.

@elalish
Copy link
Contributor

elalish commented Feb 20, 2025

I'd recommend looking at art / video game style assets and 3D scans - they often have much worse manifoldness than e.g. 3D printing meshes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants