-
Notifications
You must be signed in to change notification settings - Fork 13
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
Change the ratio but output file don't change #2
Comments
Unable to replicate. Can you provide an example? Does your mesh have enough complexity to support the desired reduction granularity? The example below provides a complete demonstration of successful compression to both 0.2 and 0.06 ratios using the included bunny.obj image:
|
Here is an example using the Pascal code showing similar performance:
|
./simplify '/home/moman/test of ismile/Upper/P-003 Upper jaw - 13 - Model.obj' obj02 0.2 |
./simplify '/home/moman/test of ismile/Upper/P-003 Upper jaw - 13 - Model.obj' obj0.06 0.06 |
I suspect that your mesh is not a manifold surface but has lots of holes/gaps/tears in it. This will make simplification difficult and high resolution images will illustrate these errrors in the original mesh: What tool created the upper jaw model? If you created this from a voxelwise imaging dataset, make sure to use a marching cubes method that does not create a lot of tiny gaps. For example Surfice has the Advanced/ConvertVoxelwiseVolumeToMesh menu item. The MeshLab CleaningAndRepairing/MergeCloseSurfaces might help. My biggest fear is if the software that created this did a poor job merging vertices it may also have done a poor job of ensuring consistent face normals. In general, good simplification requires a well designed input image. So I fear you really want to go back to your mesh creation and make sure you are using a good algorithm. Here is an elegant implementation - just make sure to include a tiny tolerance for vertex location to handle rounding errrors. As a Hail Mary, you could try compiling the Pascal version of this repository and set the tolerance to a value greater than 0.0.:
So the call might be:
If you like the result, you could port the Pascal code to C for the vertex merging (also referred to as vertex welding). |
I try to minimize file with 0.1 but it output the same file with 0.2 to 0.06
The text was updated successfully, but these errors were encountered: