Results 1 to 9 of 9

Thread: Minor breakthrough - map_heights.hgt partly deciphered

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Minor breakthrough - map_heights.hgt partly deciphered

    Ok, first off a screenshot:



    As you can see this is taken from the BI-exe so I'm talking no shit ;)
    Ok, I mostly discovered how the height-information is saved in map_heights.hgt, then I created a small tool that let me table-edit the numbers and so I was able to create the plateau you see on the screen.
    I think from this discovery it isn't too far to creating a converter that takes the tga file and creates a hgt out of it.

    If anybody feels like he can do it (I don't have any experience in reading image files and stuff), this is how the numbers are saved (programmer talk):
    You have to read in the first 8 bytes of the file and store them somewhere, they seem to be some kind of header.
    The rest of the file consists of single-precision IEEE Floats (32-bit); each float represents a certain height.
    If you want you can divide the file in 511*313 fields, which is exactly the size of the tga file it's based upon.
    What you have to find out to create a converter is how colors are mapped to heights, but I think you should be able to do this yourself ;)
    Oh, and I don't know exactly why there's a peak on my plateau, because all the height informations have the same value.

    I'll also try to create a converter, but it might take me a few days, so if anybody can do it faster, you're highly welcome :)
    Last edited by alpaca; 10-04-2005 at 15:27.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO