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

Problems with RAW import of heighmap

Discussion in 'World Building' started by sytsew, May 15, 2018.

  1. sytsew

    sytsew

    Joined:
    Jul 6, 2017
    Posts:
    4
    Hi,

    I'm having weird issues with the import of a .raw file for a terrain. Since I'm fairly new at this I duly watched most online instructions I could find, including copying settings etc. but still I can't figure out what goes wrong and why. I seem to have 2 symptoms:
    1. some data factor issue that generates repeats of the terrain, mostly 2x2 ("tiling"), instead of just 1. Halving the import width & height doesn't 'cut' to 1 correct representation, but rather shows a crop of some kind - though not repeated. At other import sizes more bizarre data confabulations happen. Though repeated or cut up, the terrain itself does resemble the original (hand painted) height map, so I think it's not in the original file or it's export, rather in the data import settings that something goes wrong.
    2. To test, import of a simple generated-cloud height map appears to work fine. But if I try to import a square with a perfect black-to-white gradient, the above "tiling" or "cutting" happens as well, plus the perfect gradient tones are translated in much more coarse textures. I attach 2 fairly artistic examples.
    Terrain width and length are kept at the standard 500 most of the time - if I change that, I'm even more at a loss what is affecting what.

    Thanks for any help!
    fsd_terrain_4tiled.jpg fsd_terrain_4tiled.jpg artistic4-1.jpg artistic4-2.jpg
     
  2. sytsew

    sytsew

    Joined:
    Jul 6, 2017
    Posts:
    4
    Hi again,

    I found a solution, posting for whomever has similar issues:
    - When exporting, make sure the raw file is in greyscale. I had it in RGB apparently (though it was in greytones) which created the 4 joined repetitions (one per channel)
    - The grainy texture effect (visible in the gradient examples) appears to come from a high resolution setting. I reduced the greyscale to 8 bit (from 16), and reduced the square size from 2048 to 512. That made it smooth again.