Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


quick and easy octree question

This topic is 5291 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

Hello all... I''m still working out how to get octrees working in my gameworld, and since I want to get it right the first time (or at least, functional without major bad designs), I figured questions are the best way to go. This time, the question is easy (I think...) What goes in the parent nodes of the octree? And the root for that matter. I know the root originally holds the entire game world, but it then gets split up to other nodes...so is the root them change to hold the min/max bounds of each of its children? The tutorials I''ve read say that the root/parents hold the polygons, but then you push the polygons down to the children nodes on different occasions...so what then goes in the parent? I think holding all the polys in that node would be a bit too redundant, since it''s all in the children already... So the other thing I could think of was to hold the boundaries for what lies beneath in its children nodes... That way, during frustum culling, is the frustum contains the parent node, it could them go down and see if the children are... And if the frustum doesn''t contain the parent, it wouldn''t have to check the children at all. Am I heading in the right direction? Any other ideas/implementations out there? Thanks!

Share this post

Link to post
Share on other sites
your last idea is bang on.

all nodes that arn''t leaf nodes (ie, they have children) should contain no objects/triangles/whatever. They should, however, keep track of the bounds of the child nodes, as to help fustrum checking and things like collision detection querys.

| - My project website - | - email me - |

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!