Does this implement ISimplifier and thus integrate into mesh.simpify() side-by-side with BABYLON.QuadraticErrorSimplification?
(I’m not intending to highjack your thread. I’m happy to split this into another thread if you prefer.)
Maybe I misunderstand mesh.simplify, but have observed that it (and the associated ISimplificationSettings) don’t seem abstracted enough to capture parameters likely needed with different simplify routines. In particular, a single “quality” number is passed and an optional “optimizeMesh” boolean is used to run (or not) a separate optimize function. I think there’s an opportunity to iterate on that abstraction if MeshoptSimplifier were integrated. In addition, ISimplifier does not seem conducive to being used outside of LOD given that LOD levels and distance are integrated/implied instead of attached after an abstracted simplification/optimization run. I had to go through some extra steps when using QuadraticErrorSimplification to clean up an imported mesh: instead of calling and reurning a mesh, I extracted the new optimized mesh from the existing meshes LOD (then disposed the original).
For reference: when QuadraticErrorSimplification is used separately, the following properties can be assigned after instantiating
- aggressiveness
- boundingBoxEpsilon
- decimationIterations
- syncIterations (number of parallel threads)
I don’t see a way to assign those through mesh.simplify, and the defaults don’t seem to work super well.
Edit: a good discussion, including extracting a simplified mesh from LOD is here.