-
Notifications
You must be signed in to change notification settings - Fork 26
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
Not all degenerate faces removed. #12
Comments
Yeah,
Out of curiosity: have you tried playing around with the different skeletonization methods to see if any is robust against the errors in your meshes? |
I hadn't noticed the height parameter, I'm going to play around with it and see how it works. I have played with CGAL's skeletonization https://doc.cgal.org/latest/Surface_mesh_skeletonization/index.html, which gives you some good parameters to play with for optimizing, but I have to move back and forth between python and C++(at least in the short term..). Default settings do a decent job for my needs, but I'd like to see if I could do a better job at spines.. I haven't yet compared it to Skeletor's skeletonization options, as I am still working on getting a nice workflow that reliably gives me good clean watertight meshes without my intervention. The two biggest problems are these t-vertices, and larger holes (which trimesh as far as I know cannot close.). Meshlab does great and fixing those things and more (e.g. ambient occlusion for removing internal geometries, nice control over decimation), but the python interface currently has some bugs, so that would for the short term have to be implemented in C++(they are doing a great job at making better...) As I mentioned, Blender does well but it is not as fast as meshlab and I find the GUI-first API annoying. I don't know if you have played with CGAL, but if you are interested I can get back to you once I compare them on our meshes. |
Yeah, let me know what you find. If you are happy sharing one of your meshes, I could have a crack and see how far I get with them. Curious to see if I can make the skeletonizations more robust against errors in meshes. |
Skeletor is relying on Trimesh 's "remove_degenerate_faces()" to deal with degenerate faces, which will only remove faces composed of two vertices, as I understand it. Our neuron meshes are generated with a rather unfortunately large number of t-vertices (3 vertices in a line with a zero area face associated with them). Possible solutions would be to switch to Blender's degenerate dissolve to deal with them, which I believe works pretty well. Meshlab's function for removing them via edge collapse also seems to work for me and is what I have been using. An additional solution may be to roll our own by finding the ones with zero or negligible area (trimesh.base.area_faces or maybe trimesh.base.face_angles ) and then dealing with them by collapsing the edge associated with the middle point? Or by deleting the middle point and then using trimesh.repair.fill_holes(mesh) to put the face back? This would save having to do a type conversion to blender or meshlab and back...
The text was updated successfully, but these errors were encountered: