Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Small artifacts with imported RAW map

Discussion in 'General Graphics' started by Dooflamingo, Mar 2, 2021.

  1. Dooflamingo

    Dooflamingo

    Joined:
    Feb 23, 2020
    Posts:
    2
    Hello, I'm trying to make a wide terrain using a 4k resolution image that I've created.

    The original image was made with Global Mapper in 8k, exported as .tif and cropped to 4k with Gimp, then converted it to .raw file.

    When I try the terrain on Unity it gives me small level artifacts(like if someone is using a cell noise), which aren't visible from far away but get really ugly when you look closely.

    This is an example:


    Artifacts.PNG

    The terrain needs to be a very wide area, as you can see from this picture I made in SD:

    8kmap.png




    You can't really see the artifacts from far away, but given that I need this terrain to be played on, it can't look like this. Now, I'm sure Gimp isn't the problem, as the artifacts show anyway even if I import directly the height map from Global Mapper.

    Could it be lack of resolution? Or .tif isn't the right format to save an height file? I chose .tif thinking it was more precise than PNG, but maybe I'm wrong? Also, there's no .exr export possibility on the software I'm using :(
     

    Attached Files:

    Last edited: Mar 2, 2021
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    TIFF and PNG can both store lossless 16 bit per channel data. Are you sure Global Mapper is exporting a 16 bit TIFF? And when you import into GIMP, are you sure it's not converting that to 8 bits (which I think is Gimp's default behavior when opening >8 bit per channel images)? There are also some topics on exporting height maps on Global Mapper's official forums. It seems like it requires some extra fiddling to get useful exports.
     
  3. Dooflamingo

    Dooflamingo

    Joined:
    Feb 23, 2020
    Posts:
    2
    Thanks for your reply.

    I mean, when you render your map on Global Mapper it only asks you the format that you want it to be(with some additional ticks, for example create world map or create 256 color palette). However there's no option for making sure it's 16 bit.

    What I can tell you is that I tried all the different formats available(.tif, .png, .bmp), but they all keep the artefacts with them.

    I tried checking for the bit-depth in file property and all keep an amount of 24-bit color, which I thought to be enough.
    When I import on Gimp yes, it sets it to 8 bit. However you can edit it to be 16 or 32 bit image.(now I understand I can't add details to an image that I previously compressed to 8 bit, but the artefacts show wheter or not I use Gimp to crop the desired area.

    I'm going crazy :0

    I will take a better look at global mapper's forum, thanks!
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    A 24 bit texture will not be enough, because that's really three 8 bit channels. A greyscale height map is the same 8 bit heightmap in all 3 channels. You get no extra precision, only 256 different height values normalized between "0.0" (0) and "1.0" (255). The BMP format isn't useful here because it doesn't support greater than 8 bits per channel. Only TIFF and PNG, assuming you can export a 16 bit TIFF or PNG.

    A quick search seems to point to you needing to use the special GeoTIFF exporter and not the default image exporter.

    https://www.globalmapperforum.com/discussion/8977/16-bit-elevation-dtm-to-photoshop
    https://www.bluemarblegeo.com/knowledgebase/global-mapper-19/Formats/GeoTIFF.htm