-
Notifications
You must be signed in to change notification settings - Fork 510
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
simplifySloppy doesn't have a way to specify the target error #112
Comments
So I think there's two parts here.
I plan to spend more time on the simplification algorithm after the next release (where I'm trying to finalize geometry compression), so I'll definitely look into this but not immediately. Would you be able to share the model in quiestion in an .obj format to be able to investigate pt 2? |
Thanks for your answer, very appreciated. My issue is that the source models used as basis to construct the collision mesh are provided by the users, and therefore have a huge variety as far as the level of details/quality/triangles density are concerned. Some are simply light pole, some are representing a complete airport terminal. Some of them could be used as they are, since very optimal, some others are over-tesselated. Therefore, using a triangles count target is basically not an option (there is no way to define a proper rule because of the issues mentioned above). An error tolerance threshold is the solution I think.
I will extract some of the meshes as obj (remember I first remove all attributes other than the position and collapse similar vertices using your meshopt_generateShadowIndexBuffer() function) and attach them in that thread later today. Thanks a lot for your help, it's really appreciated. Also let me know if I can help. |
Hi Zeux, thanks a lot for that update, really appreciate. I'll try to have another go with these changes in a couple of weeks, I'll let you know the outcome ! |
Hi,
I'm playing a bit with your great library in order to decimate some over-detailled 3D models, before using the result as basis for a collision mesh.
The input I have is therefore basically a list of vertex positions, and a list of indices (not other vertex attributes).
I'm first running meshopt_generateShadowIndexBuffer() in order to have all vertices with a similar position to be collapsed.
Basically, my issue is that I haven't managed to get a result that's simplified enough using meshopt_simplify(). The initial mesh has 345k triangles, the output has 285k triangles, whatever parameters I've tried.
I've set the target indices count to something very low (50) and even tried to increase the error to its maximal value (1.0f), however, that doesn't make a big difference.
Using meshopt_simplifySloppy(), results are much better (basically reaching the indices target count), however, I'm want to use an error threshold rather than a target indices count (since I don't want the artists/user to have to enter a target indices count, moreover, the input meshes are really variable, some are too detailled, some are not, so an error threshold makes much more sense to me).
So, I'm stuck with meshopt_simplify() I think, appart in the case you have an idea how to use meshopt_simplifySloppy() with an error threshold as input ?
meshopt_simplify:
meshopt_simplifySloppy:
What puzzles me a bit is that meshopt_simplify() doesn't modify the topology, despite having the error threshold set to 1.0f and the target indices count set to 10. You can clearly see that when looking at the windows of the building in the foreground. Despite the significant threshold, the windows are not simplified.
Is that normal ? Can I improve that ? Or is there a way to use meshopt_simplifySloppy() with an error threshold as input, rather than a target indices count ?
Thanks a lot for your help !!
The text was updated successfully, but these errors were encountered: