GameMonetize Posted June 1, 2014 Share Posted June 1, 2014 Hey team! I've just published a massive rework of octrees alongside a new documentation:https://github.com/BabylonJS/Babylon.js/wiki/Optimizing-performances-with-octrees The latest demos is not yet published (still working on it) Moon 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 2, 2014 Share Posted June 2, 2014 Hi, It seems that this link is not accessible in your tutorial. Otherwise it is interesting. I discover what it is. http://www.babylonjs.com/?INSTANCES Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 3, 2014 Author Share Posted June 3, 2014 The latest demos is not yet published (still working on it) Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 3, 2014 Share Posted June 3, 2014 Ok Quote Link to comment Share on other sites More sharing options...
reddozen Posted June 4, 2014 Share Posted June 4, 2014 Found a pretty cool demo...http://pawlowski.it/octtree/ Is there any way to visualize the octrees in Babylon? I think it would be pretty useful to be able to see what you're trees are doing to better understand how detailed you need to be with them. If I call for an octree on my scene, do I still need to iterate over all my meshes with mesh.useOctreeForCollisions, or does the global scene.createOrUpdateSelectionOctree() already take into account all the meshes in the scene that have collision's active? Also, is there a way to adjust the tree depth dynamically like on that demo? I didn't see anything in the documentation that tells me I really can? I assume I could just call scene.createOrUpdateSelectionOctree() again with a new number in it, but we seem to base it more on number of meshes instead of tree depth. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 4, 2014 Author Share Posted June 4, 2014 mesh.useOctreeForCollisions, is separated from scene.createOrUpdateSelectionOctree() so ou have to iterave over your meshes: BUT only those which needs a octree (meaning those with a lot of submeshes) We do not have octree visualization but it could be a good idea to implement Octree depth will be in the next release Quote Link to comment Share on other sites More sharing options...
reddozen Posted June 4, 2014 Share Posted June 4, 2014 Ok, so i should turn off collisions for the mesh normally if they're big, subdivide them and then activate the collisions through the octree? If I have a really huge world, wouldn't it be better to put every mesh into the octree collision group to limit the number of items that I'm looking for collisions with, or would having octrees on already build in those limitations? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 4, 2014 Author Share Posted June 4, 2014 Two options for collisions: Multiple mesh and the create a scene octree (scene.createOrUpdateSelectionOctree)One big mesh, subdivide(100) and mesh.createOrUpdateSubMeshesOctree You should do some experiments to test what is simpler and more efficient in your specific case Quote Link to comment Share on other sites More sharing options...
reddozen Posted June 4, 2014 Share Posted June 4, 2014 My clone / scene loader files are generated automatically by our conversion / export tool, so it doesn't matter either way for me... lol I'll mess around with some different things. I'm just trying to get my limitations down so I can better try and use this. Are these new octree functions etc in the current 1.12 build? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 4, 2014 Author Share Posted June 4, 2014 yes Quote Link to comment Share on other sites More sharing options...
Kilombo Posted June 5, 2014 Share Posted June 5, 2014 Hello guys. I don't use the Y axis, so I don't need a octree, a quadtree would be suficient, and would reduce calculation complexity. Is there any, or I have to use the octree anyway. BTW, is there any demo/tutorial so that we can check it out? Quote Link to comment Share on other sites More sharing options...
reddozen Posted June 5, 2014 Share Posted June 5, 2014 Thought of something else this morning... This would work for 1st person, but what about 3rd person? Since this is more of a physics engine test, would I then need to make a function to manually look through the objects in the player characters current octree? Also, would I need to loop through every octree to find the one that the player character is in, or is there something that's kept on the mesh that keeps a reference to the octree it's in? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 5, 2014 Author Share Posted June 5, 2014 Here is a doc about octrees:https://github.com/BabylonJS/Babylon.js/wiki/Optimizing-performances-with-octrees I added a section about how to use octree directly 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.