Ericky14 Posted January 9, 2018 Share Posted January 9, 2018 Hello, What is the best way to optimize mesh selection? Going by the babylonjs inspector, it always takes around ~5ms with ~1200 meshes and over 10ms with ~2000 meshes. Is there any way to disable it and don't use it at all? I'm fine with always rendering every mesh as it doesn't impact the performance as much. Also, using `alwaysSelectAsActiveMesh` on every mesh does not boot performance of mesh selection significantly. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted January 9, 2018 Share Posted January 9, 2018 Using an octree can be Quote Link to comment Share on other sites More sharing options...
Ericky14 Posted January 9, 2018 Author Share Posted January 9, 2018 Octree didn't seem to boost the performance by a lot either... is the default octree settings good enough? I don't know much about octrees and how it helps rendering. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 10, 2018 Share Posted January 10, 2018 Hello, marking all meshes as active will remove the need to do frustum clipping but it is not the only task done by the mesh selection You may want to also freeze your meshes with mesh.freezeWorldMatrix() which will remove the world matrix computation from the mesh selection task Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.