Results 1 to 3 of 3

Thread: How to work with map_heights.hgt instead of map_heights.tga (and why you should want to)

  1. #1
    Muizer's Avatar member 3519
    Patrician Artifex

    Join Date
    Apr 2005
    Location
    Netherlands
    Posts
    11,110

    Default How to work with map_heights.hgt instead of map_heights.tga (and why you should want to)

    Required tools

    You need to dowload and install ImageJ.

    To Import an existing hgt

    1) from the menu, select: File > Import > Raw

    2) select map_heigths.hgt and click Open

    3) In the dialogue,
    • set image type to 32bit real
    • set width to the number of columns
    • set height to the number of rows
    • set all other fields to 0
    • check 'little endian byt order'
    • uncheck all other boxes


    4) press 'OK'

    The height image will open. You will notice it is flipped vertically.

    To export an edited or newly created height map

    1) back up/rename any existing map_heights.hgt

    2) make sure your image is in '32bit real' format and flipped vertically

    3) from the menu select Edit > Options > Input/Output

    • Check the option 'Save Tiff and Raw in Intel byte order'
    • Uncheck all other boxes (may not be necessary, haven't tested that)


    4) from the menu, select File > Save as > Raw Data

    5) save the file as map_heights.hgt

    Don't forget to delete map.rwm. IIRC map_heights.tga will be ignored if there's an existing .hgt, but if this works for you, you won't need it at all anymore and you can delete it.

    Why bother?
    I would not go as far as saying that working with the hgt yields significantly better results. It does contain 'actual' heights in a single band, which I have always found quite convenient to work with especially in the development stage.

    Why now? I've always used proprietary software that allowed me to specify custom import and export formats. Always have known imageJ could be used to import map_heights.hgt , but only recently discovered in the fine print how to change the output options to produce something that works.
    Last edited by Muizer; February 26, 2019 at 04:15 PM.
    "Lay these words to heart, Lucilius, that you may scorn the pleasure which comes from the applause of the majority. Many men praise you; but have you any reason for being pleased with yourself, if you are a person whom the many can understand?" - Lucius Annaeus Seneca -

  2. #2
    20ninescene's Avatar Artifex
    Join Date
    Mar 2014
    Location
    East-Flanders, Belgium
    Posts
    668

    Default Re: How to work with map_heights.hgt instead of map_heights.tga (and why you should want to)

    Thanks! very useful! REP+

  3. #3

    Default Re: How to work with map_heights.hgt instead of map_heights.tga (and why you should want to)

    Thank you so much!!

    ROME TOTAL REALISM ANABASIS FORUM: HERE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •