zeux / meshoptimizer

Mesh optimization library that makes meshes smaller and faster to render
MIT License
5.49k stars 473 forks source link

Mesh simplification glitches #705

Closed mathieu-lemuzic closed 2 months ago

mathieu-lemuzic commented 2 months ago

Hello, I noticed that the mesh simplification gave strange results with a rather simple, single-sided, semi-spherical mesh.

I can't really explain it yet, but as you can see, I end up with ghost triangles, the outer shell is good though with back face culling, but without culling the ghost triangles start to show in my viewer...

See images below:

Original mesh:

image

Simplified mesh:

image

Command used: gltfpack.exe -i original.glb -o simplified.glb -si 0.1

The original mesh: original.zip

More info:

The flipped triangles start showing in the first collapse round already, they appear very thin and tiny at first, I guess that they start growing as more iterations are performed

image

zeux commented 2 months ago

Duplicate of #346.