Jump to content
  • Advertisement
Sign in to follow this  
JorenJoestar

Bounding volume hierarchies

This topic is 3661 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, need a hint...I'm developing my scene graph, and now I've developed bounding volume hierarchies: every node contains the volume of its children. I want to use some spatial partitioning algorithm, but reading about octrees has felt me like I've something useless...if I want to create an octree, I need to use only the LEAF nodes (those which contains the geometry) and not the other...so all the code to calculate the bounding volume is useless? I know that scene graph and spatial partitioning are different things, and I want to let them be separate, but I don't understand if I can use this hierarchies in some way... thanks guys!!!

Share this post


Link to post
Share on other sites
Advertisement
If I understand your question correctly, that's pretty much true for any BVH. The leaf nodes contain the actual data, the branches are used for culling only, although some BVH do contain some data at the branch level.

Share this post


Link to post
Share on other sites
Yes you understand correctly!
But...is it a good way to handle culling?
Or it is better to use different spatial partitioning structures to handle both
static and dynamic objects?

I've read that BHV is used mainly for collision detection...is it true?

Thanks!

Share this post


Link to post
Share on other sites
Quote:
Original post by JorenJoestar
But...is it a good way to handle culling?

If it's adequate for your needs then, yes, it is good.
BVH's are certainly common structure to use for 'culling' -> Hidden Surface Removal (HSR).

Quote:
Or it is better to use different spatial partitioning structures to handle both static and dynamic objects?

Some games require separate structures for both, other games don't.

Quote:
I've read that BHV is used mainly for collision detection...is it true?

I don't know about mainly used for collision detection but they definately can be used for this, and HSR, and indeed accelarate many other types of spatial locality checks.

Share this post


Link to post
Share on other sites
BVH are used a lot for collision detection with a static mesh. There are algorithms for partitioning dynamic objects, but it can get quite tricky (dynamic KD trees). One popular method is sweep and prune for dynamic objects.

Also, if your level is split into sections (portals), it's not uncommon to just use the portals to partition objects.

As for experience, I've used sweep and prune for dynamic objects, I've also seen a loose KD tree used to partition static objects, and the static tree been used for dynamic object culling, and for geometry, a compressed AABB tree.

Quake 3 is based on a BSP tree, and that is used for both static, dynamic, and geometry I believe.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!