Mapping a height field to a staggered ISO map

Started by
3 comments, last by ApochPiQ 21 years, 9 months ago
I''ve got a fairly good 3D isometric engine running which started out as a diamond map and a height field. Everything looked good when running under the diamond map but I recently moved it over to a staggered map. Since then I''ve been having trouble getting the heightmap to properly align with the tile corners. I need to represent the tiles themselves in a rectangular array; that array can be texture IDs, structures, or whatever. The problem is, I need to tie a heightmap to that array, but tiles need to share heights, ie. the lower corner of one tile is the same height as the upper corner of the tile below it, etc. What''s the best way to map a rectangular height map onto my staggered ISO map??

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Advertisement
I''m sure there''s more than one way, but the one that comes to my mind immediately is to just shift the rows. So, tile corner heights would be specified like this for a 3x? map:
  00  01  02  0304  05  06  07  08  09  10  1112  13  14  15

etc.
Does that help you? (if not, I can explain further)

tweedledee
~phil
OK that makes sense I think... each number there is a tile corner, correct?

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

yup, more or less height values in the heightmap array You can do it differently, but that''s the possibility least coding amount I think.

tweedledee
~phil
Great, thanks! Seems to be working properly now.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

This topic is closed to new replies.

Advertisement