Simplify: Relationship between 'error' and 'ratio'?
See original GitHub issueDescribe the bug Since #655 there’s a “simplify” command, however, it seems to not respect the “ratio” parameter at all (neither with nor without also specifying the error parameter).
To Reproduce Steps to reproduce the behavior:
- Download https://github.com/KhronosGroup/glTF-Sample-Models/raw/master/2.0/DragonAttenuation/glTF-Binary/DragonAttenuation.glb
- Run
gltf-transform simplify --ratio 0.1 DragonAttenuation.glb DragonAttenuation.simplified.glb
- Repeat with varying values of
--ratio
- Will always end up at the same file size and vertex count
Expected behavior
According to help simplify
changing ratio
should reduce the vertex count. Changing error
does something, but then changing ratio
also does nothing.
Versions:
- Version: v2.4.5
- Environment: Node.js CLI
Additional context
Besides the issue at hand, it’s interesting how the dragon’s backdrop is/is not optimized - looks like coplanar vertices don’t get merged at all? (this is with a very high “error” value)
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Ratios (Connecting Rates with Ratios and Simplifying to ...
Errors in Measurement II (1 of 2: Introduction to Percentage Errors and an Introductory Example). Eddie Woo. Eddie Woo.
Read more >Calculating Percentage Error in the Ratio when there is an ...
When both Numerator & Denominator changes simultaneously by Δx and Δy respectively that is Ratio=x+Δxy+Δy. Consider both increase and decrease ...
Read more >Uncertainties and Error Propagation
Derivation: We will assume that the uncertainties are arranged so as to make z as far from its true value as possible. Average...
Read more >Propagation of Error - Chemistry LibreTexts
Anytime a calculation requires more than one variable to solve, propagation of error is necessary to properly determine the uncertainty.
Read more >The Ratio Problem | NYU Law
As we show, the widely-cited “inverse U” relationship between managerial ownership and Tobin's Q is reversed when we account for error in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @hybridherbst and @zeux! Hopefully https://github.com/donmccurdy/glTF-Transform/pull/725 improves the documentation here, comments welcome. 😃
Yeah, that’s right, although there’s also cases where topological restrictions prevent the simplification to desired target no matter what the error is. This might be improved in the future, and that’s why in glTF-Transform, welding should be done in concert with simplification.
Yeah, that’s exactly right. Setting target to 0 is a great way to simplify towards the acceptable error.
It can be useful to prevent catastrophic degradation in quality - in a sense, this allows the target to be a “soft” parameter. For example, when generating an LOD chain, you might want each successive LOD level to be 50% of the previous one, but you also might be okay with a smaller reduction if attempting to reduce to 50% would penalize the quality too much.