jdurrant Posted March 16, 2015 Share Posted March 16, 2015 I'd like to use octrees to optimize my test application. I read the helpful tutorial here: https://github.com/BabylonJS/Babylon.js/wiki/Optimizing-performances-with-octrees I just have a few follow-up questions.According to my understanding of octrees, it should only be necessary to calculate them once on a given set of points. But the function name that BABYLON.JS uses to create octrees is "createOrUpdateSelectionOctree,” making me wonder if I need to update the octree periodically (perhaps in the render loop) for some reason. Am I right in thinking that I can just run “scene.createOrUpdateSelectionOctree(capacity, maxDepth)” once after my scene is created, as long as I don't add/remove/translate/rotate any objects after that? Does moving the camera require that I update my octree?Am I right in thinking that scene.createOrUpdateSelectionOctree creates an octree of the object position vectors (not the vertices of the all individual meshes)? A scene octree is used only for determining draw order during rendering, then, not collisions and picking? Is it used for level-of-detail updates?On the mesh level, is using mesh.createOrUpdateSubmeshesOctree the same as using mesh.useOctreeForCollisions + mesh.useOctreeForPicking + mesh.useOctreeForRenderingSelection?Am I right in thinking that createOrUpdateSubmeshesOctree must be called separately on instances, since instances have different vertex locations? Thanks for all your help with this! Quote Link to comment Share on other sites More sharing options...
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.