Octree World Partitioning

Started by
4 comments, last by kauna 11 years, 4 months ago
Hi,
When partitioning the world using an octree, we split leaf into 8 children.But one triangle can be in more than one leaf.
One method is to have dynamic index buffer by leaf and check each frame.Using this method, it's not static and need to be checked each frame who is not efficient.The check can store a boolean to say this face is already set in a leaf.We need to reset state each frame.

Is it possible to have a generation of octree who is static ?
Thanks
Advertisement
Store the triangle on the parent nodes instead of the leaves?

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

My journals: dustArtemis ECS framework and Making a Terrain Generator

Cut up the triangle or put the triangle into multiple leaves?
Why are you cutting meshes in the first place? That may be highly inefficient.

You could store whole objects and use the tree for coarse culling. The logic could be "find a smallest leaf which bound is bigger than the meshes bound box, using the meshes center point", recalculate the leafs loose bound box used for culling.

Cheers!
What you explain is "loose octree" who is nice for dynamic object.I have all my static geometry in one mesh file, it will never change.Dynamic object is added after.
The static geometry can be 250 000 triangles, all triangles don't need to be render. it's why octree comes here.
It's why the best way i have found is to have Octree for static geometry and Loose Octree for dynamic.
With Loose Octree object will be in one lead of the octree but in octree one triangle can be in 2 or more.
Puting triangle in multiple leafs can cause probleme for alpha blended material.
Is the best way to store the triangle in the parent ?
Well the octree I described can be used with triangles also.

Also, I made the definition pretty clear that the object or a triangle resides only in one leaf node. The loose part stands for the leaf loose bound which contains all the objects/triangles inside the node (and it's children) and it is at least as big as the leaf node bound.

Cheers!

This topic is closed to new replies.

Advertisement