Open Settings after uploading a model.
The Meshoptimizer part is here
Simplify - MeshoptSimplifier implements mesh simplification, producing a mesh with fewer triangles/points that resembles the original mesh in its appearance. The simplification algorithms are lossy and may result in significant change in appearance, but can often be used without visible visual degradation on high poly input meshes or for level of detail variants far away.
The algorithm aims to reach the target âratioâ, while minimizing error. If error exceeds the specified âerrorâ threshold, the algorithm will quit before reaching the target ratio. Examples:
ratio=0.0, error=0.0001: Aims for maximum simplification, constrained to 0.01% error.
ratio=0.5, error=0.0001: Aims for 50% simplification, constrained to 0.01% error.
ratio=0.5, error=1: Aims for 50% simplification, unconstrained by error.
The last option parameter, lockBorder, defines whether to lock topological borders of the mesh. May be necessary when adjacent âchunksâ of a large mesh (e.g. terrain) share a border, helping to ensure no seams appear and individual levels of detail can be stitched together later without gaps.
Reorder - Pre-processes GLB model to improve index and vertex locality which increases compression ratio before quantization and compression.
Quantize - Quantizes vertex attributes with KHR_mesh_quantization, reducing the size and memory footprint of the file. KHR_mesh_quantization extension will be added to the resulting GLB file.
If you want to apply Meshopt Compression there is no need to check reorder and quantize checkboxes (in order to avoid double quantization which may be too lossy). Reorder and quantize are already included into the Meshopt function (but one may use them separately as well, without Meshopt Compression).
One may choose from 2 available Meshopt Compression levels: âhighâ and âmediumâ. EXT_meshopt_compression extension will be added to the resulting GLB file.
Both extensions, KHR_mesh_quantization and EXT_meshopt_compression, are supported by Babylon GLTF Loader.
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.
Thatâs great. Means we can now just do shit modelling, disregarding everything, and just run the tool Iâd rather think some have already âanticipatedâ this new feature
Last time I said this, I got bullied
I had to rectify: "
Not all free models are (a piece of cr*p). I believe - as in everything - 15 to 20% of them are at least âacceptableâ; 5% are âgoodâ and about 1 to 2% are âgreatâ.
Essentially, I think when downloading a model or template - being free OR paid - one should not admit that this will save him/her from doing anything more As per my experience, 95% of the external sources I get/gather, require at least a level of âadaptationâ, be it just ânormalizingâ or making it âconsistentâ for the use in my project.