Search Unity

Use Gimp for editing Terrain Heightmaps

Discussion in 'Formats & External Tools' started by jake-gr, Oct 30, 2012.

  1. jake-gr

    jake-gr

    Joined:
    Oct 27, 2011
    Posts:
    93
    Ive seen this issue around on the forums many times, and it has also effected me. I use Gimp for image editing, however, only the 8bit .raw hightmap from Unity can be opened/saved from Gimp. If you want the detail of 16bit, you can't use Gimp.

    Until now!
    I found this after Googling for some time, I do not take credit for this piece of software, but recommend it immensely!
    http://dubaron.com/terrainconvert/

    Usage:
    1) export the terrain heightmap from Unity at 8bit or 16bit, Byte order does not matter!
    2) drag-drop the exported terrain.raw onto the EXE from the download, it will automatically detect setting and convert the file.
    3) Open the converted terrain.raw.tga in Gimp, then do Image -> Transform -> Flip Vertically.
    4) Edit the image to your liking (its not greyscale, and only the Red channel is converted).
    5) Flip the image vertically again (Image -> Transform -> Flip Vertically)
    6) Save/Export the edited terrain.raw.tga
    7) Drag-drop the exported file onto the EXE again, and it will convert to terrain.raw.tga.raw
    8) Import the heightmap into Unity, and it will auto-detect the settings!

    (flipping vertically makes the image have the Z axis facing the top, so "North" is up)