-
Notifications
You must be signed in to change notification settings - Fork 594
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
Decimate a mesh #41
Comments
Hey Shawn- at the moment Trimesh doesn't implement any simplification algorithms- I've been meaning to implement quadratic edge collapse decimation for a while, but never had time. If you want to implement it PR's would be accepted gladly :). In the meantime you're probably best off calling meshlabserver with subprocess.check_call or something. |
Hi Mike, Thanks for your response! And the quadratic edge collapse decimation looks really interesting. I'll read more into it - I'm not sure whether the complexity is within my coding capabilities :P And thank you also for your suggestion to use meshlabserver! I noticed that blender also has a decimate modifier, so I can try to see whether that's callable via command line. Shawn |
This code sample looks like it does the meshlabserver trick: https://gist.github.com/awesomebytes/a3bc8729d0c1d0a9499172b9a77d2622 |
It would be neat to make a nice cython wrapper then set up cibuildwheel on: https://github.com/sp4cerat/Fast-Quadric-Mesh-Simplification |
thanks for the information, one question is: is there anyway to keep track of which faces are merged into one face? like if you have a labeled mesh, after decimating, how could you know the label for each new face? |
@xuefeng7: I think that would be pretty easy in a native numpy implementation but might be tough with a wrapper. I referenced and consolidated this into the enhancements list and would be as always mega- happy if someone wants to PR this 😄 . Thanks for the report! |
I'm doing this via open3d pretty simply, I can pass on that code if it helps? |
Oh yeah actually the |
Hi Mike,
(I assume this would be a simple question :)
Would there be any simple way to decimate a mesh? Say, simplify the geometry from 10,000 faces to 1,000 faces?
Thanks!
Shawn
The text was updated successfully, but these errors were encountered: