-
Notifications
You must be signed in to change notification settings - Fork 480
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 aggressively welds vertices causing issues for attribute discontinuities #71
Comments
This is the current deficiency of the aggressive mode, or more specifically the sloppy simplifier. It does not preserve attribute discontinuities which causes issues like this. I have thoughts about improving this in the future but for now that’s expected. |
Sounds good @zeux. Out of curiosity, would throwing out the normals and recalculating them after decimation work, or is the problem more complex than that? |
It would work as an option but this requires reindexing - it’s fine to do as part of gltfpack, but it doesn’t work with the simplifier interface. Additionally this doesn’t work for texture coordinates. So my hope is that this can be solved during simplification, but it’s certainly possible that that doesn’t work well enough and we’ll need to recompute normals and give up on UVs. Regular simplifier doesn’t have this issue but it respects the mesh topology which makes it get “stuck” on some models. |
When I use the aggressive option in
gltfpack
I find that the model shading looks off. This appears to be caused by the normal being a bit messy. Attached is a screen shot from the babylon.js viewer with normal preview turned on for one of the meshes (hence the beautiful rainbow).I'm not sure if this is an unavoidable artifact, or something that can be improved. Also, I realize the input model is already pretty sparse. Nonetheless, the vertex removals seem reasonable, if only the normals were better preserved.
Here's an example of the command I'm using. I've also attached the input and output GLBs I'm using.
gltfpack -i /tmp/input.glb -o /tmp/output.glb -si 0.8 -sa -v
Archive.zip
The text was updated successfully, but these errors were encountered: