x


Should Heightmap Resolution be one greater than Detail Resolution?

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 gravatar image

John 24
3 1 1 2

I think you mean powers of 2...

Jan 13 '11 at 05:10 AM Justin Warner
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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 gravatar image

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
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

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