donmccurdy / glTF-Transform

glTF 2.0 SDK for JavaScript and TypeScript, on Web and Node.js.
https://gltf-transform.dev
MIT License
1.42k stars 150 forks source link

Simplification stops abruptly at target ratio, leading to non-uniform simplification #1314

Closed marwie closed 8 months ago

marwie commented 8 months ago

Describe the bug Hello, below is a video of a 100 vertices plane simplified with ratios [0.5, 0.25, 0.125, ...] and an error of 1

Expected behavior Simplification is uniformly applied

Versions:

https://github.com/donmccurdy/glTF-Transform/assets/5083203/f8cdf367-533f-45a1-a94f-91500f141297

donmccurdy commented 8 months ago

@marwie — I think this will be outside of my control in glTF Transform, and would need to be reported on the meshoptimizer package. It may be expected behavior, it's not obvious to me whether the error metric is per-vertex or cumulative.

(and, I like your LOD videos a lot!)

marwie commented 8 months ago

Thanks for the reply - I wasn't sure - opened an issue in the meshoptimizer repo now https://github.com/zeux/meshoptimizer/issues/664

and thanks :)