Skip to main content
gamedev.net
🔒 Locked

Balanced Quadtree

Started by LPVOID_CH 0 replies 1k views
Original Post
LPVOID_CH
LPVOID_CH
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
------------------------<< deltasoft games >>Homepage: http://www.deltasoftgames.ch
JohnBolton
JohnBolton
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:
    *---*---*    |   |   |    *---*---*    |   |   |    *---*---* 
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.