# Should Heightmap Resolution be one greater than Detail Resolution?

 0 In the Terrain examples I've found, the Heightmap/Detail Resolutions are usually 513/512 or 1025/1024. Is there some reason they're not both regular multiples of eight, and is there any relationship between these two values that I should think about for performance or memory concerns? more ▼ asked Jan 13 '11 at 05:06 AM John 24 3 ● 1 ● 1 ● 2 SisterKy 2.5k ● 33 ● 42 ● 60 I think you mean powers of 2... Jan 13 '11 at 05:10 AM Justin Warner add new comment (comments are locked) 10|3000 characters needed characters left ▼ Viewable by all users

 0 Terrain heightmaps need to be power of two plus one, because they construct a mesh, which is made out of quads (two triangles), and the heights are the values at the vertices. For example, a 3x3 heightmap: ``````+----+----+ | | | | | | +----+----+ | | | | | | +----+----+ `````` No resolution has any relationship to any other resolution, other than if you use a really high heightmap res and a really low detail res, it will probably look bad. The larger the values, the more memory is used. more ▼ answered Jan 13 '11 at 05:27 AM Eric5h5 81.5k ● 42 ● 133 ● 529 Thank you for the detailed explanation! Jan 14 '11 at 04:21 AM John 24 Hi Eric. I was wondering if you could elaborate on why a heightmap's resolution MUST be a power of 2 plus 1. Is it because the resolution of the mesh that is constructed from the heightmap is defined in terms of the number of "squares" (ie, 4 squares as pictured in your post above), and if so, that resolution must be a power of 2? Dec 02 '12 at 03:02 AM yohosuff add new comment (comments are locked) 10|3000 characters needed characters left ▼ Viewable by all users

By Email:

Topics:

x1521
x394
x88
x57

asked: Jan 13 '11 at 05:06 AM

Seen: 2442 times

Last Updated: Dec 02 '12 at 03:02 AM