You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
FreakTheMighty
changed the title
Any way to improve normal when using aggressive simplification?
Any way to improve normals when using aggressive simplification?
Oct 24, 2019
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.
zeux
changed the title
Any way to improve normals when using aggressive simplification?
simplifySloppy aggressively welds vertices causing issues for attribute discontinuities
Dec 28, 2020
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: