Jump to content

Octrees


GameMonetize
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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 ;)

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...