Archived

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

A little heightmap confusion...

This topic is 5013 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

Assume I''m using .raw format here. To make a 12x12 heightmap of quads, DirectX requires 169 vertices. A 12x12 image only yields 144 pixels. That means you''re missing 25 vertex''s information. Where does the value for those verticies height come from? I''m sort of new to heightmaps, so bare with me please, trying to figure it out.

Share this post


Link to post
Share on other sites
It is strange how it works out that way. The number of quads in each direction is generally 2n, so the number of vertices is then 2n+1. The reason is because if you split the grid or you join it together with other grids, the numbers work out better. For example, a 33x33 grid would split into 4 17x17 grids (because some vertices overlap). And joining 4 33x33 grids would make a single 65x65 grid (also because some vertices overlap).

Share this post


Link to post
Share on other sites