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

Terrains shouldn't begin with 0 height

Discussion in 'World Building' started by Mecasapien, Oct 18, 2018.

  1. Mecasapien

    Mecasapien

    Joined:
    Oct 17, 2015
    Posts:
    6
    begin with a nice heigh for plains and allow negative brush to be painted without having to paint the whole terrain start with the foundation 100 or something like that
     
  2. ChrisTchou

    ChrisTchou

    Unity Technologies

    Joined:
    Apr 26, 2017
    Posts:
    74
    I think ideally it starts at zero height, but it can go negative (is not clamped to >= 0). It's on our list!
     
  3. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I found that rather tricky as well and forgot to mention it. It forced me to lower all the terrains by -400 units. We have a very specific ground height to work from (I suspect most people do, especially those with water to contend with or caves).

    One thing though: I tried to raise some cells of nearby terrains higher and lower than normal so that I could have quite a mountain going on without precision loss in some areas but not others. I'm thinking this is redundant and the precision is enough anyway even for a couple of thousand units? Or does the precision suffer? If it suffers it might be nice that the terrain cell blends borders if you move the individual terrain cell up or down, perhaps with a suitable feather value. It's a bit niche and weird, so just airing thoughts rather than asking for anything.
     
  4. ChrisTchou

    ChrisTchou

    Unity Technologies

    Joined:
    Apr 26, 2017
    Posts:
    74
    Yes. Each tile stores its heightmap as a 16-bit value, but clamps the value to half the range (for reasons unknown, its that way currently for backwards compatibility). So you have 32k height values, stretched over the max height of the Terrain; so, for example, a 500 meter terrain height gives you 500m / 32k = ~1.5 centimeter steps.

    Note that cross-tile sculpting won't work correctly if the min / max heights are mis-matched.
     
  5. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I had feared this. I think it should be addressed because you will have problems with trying to create a mountain next to lower down rolling hills/landscape - like ghost recon or GTA - the precision issue will mean it's hard to do this with current terrain tools.

    But do we need to care?

    Isn't this something that should be tooled away? If we sculpt higher and higher, and the tooling recognises this tile is entirely higher than a certain point does it make sense to internally adjust tile height so that the precision is always as good as it can be?

    Artist should just sculpt and the relative ranges adjusted internally so we always have a great precision?