Imported Heightmap not importing properly

Discussion in 'World Editor' started by SwiftBlizzard13, Oct 9, 2025.

  1. SwiftBlizzard13

    SwiftBlizzard13
    Expand Collapse

    Joined:
    Jul 4, 2022
    Messages:
    8
    I am having an issue with importing a PNG heightmap compiled from ArcGIS from LIDAR data. When I bring it to the World Editor, the terrain doesn't import correctly and shows up as a block with no collision.

    upload_2025-10-8_19-38-8.png

    This is the heightmap I am importing, (~3kmx7km, 1pixel=1meter). Vertical Rise is ~1123m. Is there something wrong with the image, settings or is the game just being problematic?

    WhatfaceTerraini.png
     
  2. MegaKnight

    MegaKnight
    Expand Collapse

    Joined:
    Sep 12, 2024
    Messages:
    255
    I think it needs to be a square image with a resolution to the power of two. For example, a 2048 x 2048 pixel png. Or 1024 x 1024 and so on. So, you would have to cut parts of the image off or add some blank space or something.

    Also, I'd remove the already existing terrainblock from the level. That might cause some issues as well. You should only have one per level and as far as I know additional ones don't have collision.
     
    • Agree Agree x 2
  3. el_ferrito

    el_ferrito
    Expand Collapse

    Joined:
    Sep 30, 2020
    Messages:
    516
    Exactly as above. You can just add a black section to square it all off. But it's got to be a multiple of 512.

    1024x1024, etc. all the way to max 8kx8k (unless they've changed it to allow more).

    Also, it will need to be the right format and compression to work well.

    Have a look at my map in an evening post, I think I explain which compression there.
    --- Post updated ---
    Taken from that post, useful if you get stepping. Often the case with heightmaps:

    Ok, to smooth the map, you need to load the HM into GIMP, then change the mode to 16 bit (floating) grayscale

    Then run a gaussian blur (I do 2.5)

    Then export as a 16bit Gray with no compression. - this gets you the smooth terrain as above - without losing too much of the detail that makes it interesting.
    --- Post updated ---
    Just remember all your textures will need updating to match whatever resolution you chose.
     
    • Agree Agree x 1
  4. kbed

    kbed
    Expand Collapse

    Joined:
    Oct 13, 2025
    Messages:
    5
    When I try do to this I'm getting lua script erros related to missing data, so is there any "best practices" regarding removing the default terrain and adding a new one from the heightmap?
     
  5. MegaKnight

    MegaKnight
    Expand Collapse

    Joined:
    Sep 12, 2024
    Messages:
    255
    I don't know. I've had some issues with that lately as well, though not lua-related.
    When deleting a terrain and importing a new one directly after, my game crashes for some reason. So I delete the terrain, safe the level and restart the game. Then I'm able to import the new terrain without issues.

    Maybe the error you get is specific to one certain level? The terrain object could be referenced somewhere by lua so it throws an error when it's deleted. You could try removing the terrain of a different level to see if it happens there as well.
     
  6. el_ferrito

    el_ferrito
    Expand Collapse

    Joined:
    Sep 30, 2020
    Messages:
    516
    Go to terrain import tool, select the existing one. That should overwrite it.
     
    • Like Like x 1
    • Agree Agree x 1
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice