Jump to content
  • Advertisement


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


octree Culling

This topic is 5962 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, I am trying to add octrees to my height map terrain render. I have the heightmap working correctly but i cant figure out how to break up the the terrain into an octree. Im using DirectX and c++. The Way that the terrain is stored right now if just 1 large Vertex buffer. I have no textures yet, cause i want to have the octree culling working first. I cant find any tutorials on the subject, If anyone can point me to some information on the subject that would be great. Thanks Blackdragon

Share this post

Link to post
Share on other sites
Don''t use 1 big VB... Use smaller chunks. Like 8 by 8 squares. Then paste them together.

Then its easier. You make a bounding box around the 8 by 8 square of the map, then do a visibility check on it... If its in the frustrum, draw it... If its not, discard it.

The actual tree portion is you go recursively. Check the 8 by 8 section of the map, if its visible, instead of draw it, you go down the tree, now check inside that 8x8 section and check to see if this 4x4 section is visible, if so, go down the tree again and look up the 2x2 section.

If the landscape is big (and bland, not alot of detail) its actually faster to eliminate the tree, and just do checks on the 8 by 8 and thats it.

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
There is enough information on the net about octrees.
My prefered are :
- www.GameTutorials.com
- www.Flipcode.com
- www.Gamasutra.com -> You must sign up (free)

The basic structure is simple. First of all you need to construct a bounding volume (an axis aligned box ) that contains all your geometry, and then subdivide it into 8 octants
(eight smaller cubes). Continue the subdivision of each octant recursively until certain heuristics are met (ex: a minimal polygon count inside a child cube is reached, a maximum number of nodes are created,...)

The explanation of the structure are well explained in the sites above.
If you don''t find the solution you wanted you always have books like Game Programming Gems or Realtime Rendering.

Hope I was of any help 9:-|

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!