Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Gimp and Terrain RAW heightmaps

Discussion in 'External Tools' started by llde_chris, Oct 6, 2009.

  1. llde_chris

    llde_chris

    Joined:
    Aug 13, 2009
    Posts:
    205
    Hi,

    When you export a heightmap from the terrain, it appears as a RAW file.

    We know how to import the file via Photoshop, however not everyone here has photoshop, and some of the programmers like Gimp. How do we import the RAW file using Gimp? We can't seem to find the correct settings. :cry:
     
  2. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,435
    I'm running Gimp 2.6.6 and it appears it should open and save a .raw file just fine. I don't have any files here to test it, but it should work. What problem are you having? Have you tried posting on the Gimp user's forum?

    Edit: Apparently Gimp uses the Ufraw plugin for this. It looks like the plugin comes with the standard Gimp package (at least it looks that way on my installation) so you shouldn't need to install anything. Here's the Ufraw website which might help:
    http://ufraw.sourceforge.net/
     
  3. pitibonom

    pitibonom

    Joined:
    Aug 17, 2010
    Posts:
    169
    nope. ufraw simply cant load unity terrain raw images :(
     
  4. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,038
    You just resurrected a post over 2 years old.
     
  5. jake-gr

    jake-gr

    Joined:
    Oct 27, 2011
    Posts:
    93
    <rant> Why is resurrecting an old post so shunned upon?...
    Its over 2 years old... the situation is still valid (i too cant load terrains in gimp)...
    Also it shows that someone actually used the SEARCH feature before posting a new thread. So later if someone searches they wont be seeing 50+ posts on the same topic. </rant>

    is there by chance an alternative to ufraw that can be used to load terrain maps in gimp? (it works to load .raw from my camera, just unity terrain it wont open)
     
  6. KR1982

    KR1982

    Joined:
    Sep 30, 2013
    Posts:
    1
  7. Bering

    Bering

    Joined:
    Oct 16, 2013
    Posts:
    1
    Thanks, I had found this same link and tried changing the file extension to .raw but the key really is to click on the "Select File Type" option at the very bottom indeed.
     
  8. pietersmobile

    pietersmobile

    Joined:
    Jan 26, 2014
    Posts:
    11
    Nice! Thanx
     
  9. nickfourtimes

    nickfourtimes

    Joined:
    Oct 13, 2010
    Posts:
    164
    Hey, I'm the author of the post KR1982 linked above. I've since taken down my website, but since this post was getting some traffic, I've recreated it on my own site, here.

    Cheers!
     
    Last edited: Apr 10, 2019
    CoughE likes this.
  10. TheSniperFan

    TheSniperFan

    Joined:
    Jul 18, 2013
    Posts:
    686
    Sorry to disappoint you, but Gimp is still unsuitable for heightmap work as it doesn't support high bit depth images.
     
  11. Petomai

    Petomai

    Joined:
    Jul 27, 2016
    Posts:
    1
    What is a person supposed to do then if they cannot afford photoshop?
     
  12. BerniceChua

    BerniceChua

    Joined:
    Nov 30, 2016
    Posts:
    32
    Hi everyone, if you cannot afford Photoshop like me, and use GIMP, I found this tutorial:


    Hope that helps!
     
  13. neighborlee

    neighborlee

    Joined:
    Jan 26, 2016
    Posts:
    39
    Nice one! I'll try that, as I'm in the #notphotoshop club ( income based decision)TY!
    I know its 2 yrs old almost, but with any luck its still relevant. The detail about using data then raw might have escaped me so ty for sharing.
     
    Last edited: Apr 3, 2019
  14. TheSniperFan

    TheSniperFan

    Joined:
    Jul 18, 2013
    Posts:
    686
    This thread is undead apparently, as it just got revived for the sixth time.
    I'll answer anyway, since it'll still show up when someone Google searches a solution for this problem.

    I have good news and bad news regarding the "but with any luck its still relevant" part.
    The bad news is that no, it's not relevant. (And it never was, since importing/exporting heightmaps in 8 bit is not a solution. It just destroys them.)
    The good news is that it doesn't matter anymore, because Gimp 2.10 was released in the decade since this question was first asked. And Gimp 2.10 supports high bit depth images.
     
  15. neighborlee

    neighborlee

    Joined:
    Jan 26, 2016
    Posts:
    39
    Actually, it doesn't. I have GImp 2.10.8 and it refuses to open exported 16bit raw terrain from Unity, just now, as it still gives the error about needing raw pentex pef & one of the choices below. I checked import settings and its not working as I gimp import dialogue isn't working as advertised--I choose import raw data, and there is no 'raw' file to choose , just folders--odd ?

    I guess I should have made a new thread, didn't realize till now , that that video no longer appiles as I can't get it gimp to see it as raw image data, with file named terrain.raw from Unity.

    So is there no other option than to use dark table or raw therappee as such ? Seems a sad commentary if these lengths are needed for PS alternative ;)(
     
    Last edited: Apr 10, 2019
  16. Genero

    Genero

    Joined:
    Nov 14, 2012
    Posts:
    8
    I am currently experiencing the same issue. I have been exporting the heightmap from my terrain file, into a raw file, but it is not recognized by any software listed in these posts (not even dark table), yielding a different error in each program. The only way I have managed to get a response from the file, is by loading it into the rawpixels.net converter - but the output is still wrong; the flat parts of the terrain turn out completely white, while the hillsides along the edges turn into spiky pits. This makes me uncertain as to where the error is, and with the terrain system recently being reworked, it may be a bug in the export feature.
    Mind that this is just guesswork on my behalf, but I would love it if someone on the terrain team took a closer look at this problem. Exporting heightmaps to blender is just plain impossible at the moment.

    Edit: Since the goal of our project was to generate a low-poly terrain by loading the height-map into Blender, my team-mate has actually managed to find an alternative solution. There is a script which can export the terrain into an .obj-file and a tutorial to go with it, which can be found here:



    I hope this helps anyone who has been trying to tackle similar problems, but I would still like someone to look into the issue, as it would be much nicer if we do not have to rely on third-party plugins to get a hold of terrain data.
     
    Last edited: Apr 10, 2019
    neighborlee likes this.
  17. neighborlee

    neighborlee

    Joined:
    Jan 26, 2016
    Posts:
    39
    Gent and scholar- ty so much for taking the time to give a shout out that others are unfortunately affected by these issues, and great for sharing a video that while not the outcome we should have, ( obj's are not treated the same as terrain which would be very problematic for large terrains like mine) is a workaround to get things going ;)(

    TY ;)
     
    Last edited: Apr 10, 2019
  18. adamgffrd

    adamgffrd

    Joined:
    Sep 26, 2018
    Posts:
    2
    I too am having the same issue with exporting 16-bit raw greyscale heightmap file and failing to import into Unity. Sad times for Gimp users I supposed and I will not be purchasing PS, lol, that is not the answer.
     
    junctionboss likes this.
  19. Doodlefox

    Doodlefox

    Joined:
    Sep 29, 2019
    Posts:
    1
    Hey! Sorry, I know this has been revived a couple of times, but I just found a little bit of a workaround for this - it's not good though.
    GIMP can export as an 8-bit RAW, and Unity can read an 8-bit RAW, and then you can export from a Unity terrain as a 16-bit RAW. It's not good - I assume I'm losing a lot of the depth when I export from GIMP and I don't imagine Unity adds any when it exports, but for example I need 16-bit to import into MapMagic and this works. I hope this helps!
     
  20. junctionboss

    junctionboss

    Joined:
    May 11, 2014
    Posts:
    202
    Not sure this will help as sadly ,capitalism strikes again, me too, PS NEVER- Krita might get you there,Sorry if not but I can load .r16 files into krita from ue4,but Krita doesn't like raw,or I've yet to find right settings.

    Krita has a beautiful UI , prefer it to Gimp myself.
     
    Last edited: Nov 3, 2019