Ok - maybe this will help.
yellowperil - really there should be all layers but lets get a single at first.
vaskes - why have you decided that DATA BLOCK starts with 19th byte but not 18th - i assumed that it started with 00 00 because in your version maps with flat sea bottom should ends by 00 00 but they do not.
So it is 6 bytes structures (i think 3x16bit words).
Notice that all data in 00 00 starting strustures can be divided to 8
means 8 16 24 32 40 etc
my researches almost gave me the formula but it was based on experimental comparisions of random points from many maps and random lines.
Data in conv never changes if difference between neighbour points in heightmap is lower than 64 otherwise it changes +-8
As known hightmap is 16bit greyscale which means 0-65535 range of axis with step +-1
conv.dat (i took only first word of three e.g 00 00 C0 ED C0 ED 00 00 C0 ED C0 ED)
is 16bit scaled axis -unknown to + unknown with step +-8
every step more than on 64 in heghtmap asix gave step 8 in conv.dat
NOTICE. It is all related 00 00 starting structures. There is also 40 00 starting 64 words lenght blocks (probably that is another layers from heightmap)
so my formula was C=Z+8*(H%64)
where C - resulting coordinates for conv.dat
Z - thouse -unknown (lower limit of conv dat axis)
H - heightmap coordinate
% integer result of division.
vaskes - if have any ideas or wanna read all this in russian - PM me.
|