It is totally ok to use it. By default we do not add processing to meshes so you will need to call it if you need to have the faces with common indices close in the index buffer
i’m trying to optimize my scene to have highest possible fps.
When i’m finding some new feature which in theory can help to increase fps i’m trying to add it and see is fps is better than it was.
when i was implementing some other feature and reading forum i found that topic with that function. i tried it in my scene and it’s not clear if it helped with fps or not. the only thing i’m sure that loading time is much higher:) because i’m calling it for each instance (as test)
My scene have ~40 of meshes with high faces. each of them has ~20-50 instances
What you might be looking for is “simplification”, which means to reduce faces of the mesh while keeping rendering result “similar” as before.
To start with, gltfpack tool from the meshoptimizer repo is a good choice, with a widely used and optimized simplification algorithm. Or you can call meshoptimizer api for lower-level control.
glTF-Transform has a js api, making it more friendly to js/ts devs, but it has not integrated latest features of meshoptimizer.
If you are looking for a solution fully in babylon.js, it has a “simplify” function, but the underlying algorithm might not be as optimized as meshoptimizer.
Or here is a quick demo of using meshoptimizer simplify in babylon.js, but it’s far from complete.