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

Merge Doubles To use BMesh Layers. #110

Open
989onan opened this issue Jan 30, 2025 · 1 comment
Open

Merge Doubles To use BMesh Layers. #110

989onan opened this issue Jan 30, 2025 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@989onan
Copy link
Collaborator

989onan commented Jan 30, 2025

Merge doubles currently uses an internal
Method where it Merges doubles per vertex and then tries to read the vertex changes per merge.

The issue is that even with the optimizations it has received, it is extremely slow on big models with lots of vertices.

To fix this, meshes should be turned into BMesh structures with 2 custom data layers that store both the vertex position and vertex number. These will be per vertex and the original stored in a dictionary.

The vertices after merging all moving vertices will have their custom layers checked, and if a vertex number or a vertex position in the layer doesn't match its original, then mark the vertex as missing. (Save for some extra logic to count properly)

This will allow the system to do all vertices at once without duplicating the mesh per moving vertex. This will greatly accelerate the advanced merge doubles process, and make it possibly just as fast as simple.

@989onan 989onan added the enhancement New feature or request label Jan 30, 2025
@989onan 989onan self-assigned this Jan 30, 2025
@Yusarina
Copy link
Member

Yusarina commented Feb 4, 2025

This sounds interesting, but I think it should be Alpha 3 thing maybe as it sounds a bit of work. But I do agree this would be a better thing to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants