Jump to content
  • Advertisement
Sign in to follow this  
LPVOID_CH

Balanced Quadtree

This topic is 4657 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 all i read an article and there was something about a balanced quadtree. i didn't found something about this subject. i already have implemented a quadtree for my engine. the size of the height maps are powers of two (256, 512, ...), so i can easily create quads by dividing by 2. but i read for a balanced quadtree the size is a value power of two + 1, eg. 257, 513,... i use a heightmap tool that saves me the heightmap like that. what is the adventage to use (power of two) + 1 heightmapsizes? thx

Share this post


Link to post
Share on other sites
Advertisement
I don't think it has to do with balanced quadtrees (someone correct me if I'm wrong).

When a value in the heightmap represents the height of a quad, then it is convenient to make the width and height of the heightmap a power of two. However, the value in a heightmap typically represents the height of a vertex. In that case, it is convenient to make the width and height of the heightmap a power of two plus 1, since the number of vertexes is one more than the number of quads. As you can see:

*---*---*
| | |
*---*---*
| | |
*---*---*

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.

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!