Search Unity

Connecting different terrain heights?

Discussion in 'World Building' started by JDatUnity, Dec 2, 2018.

  1. JDatUnity

    JDatUnity

    Joined:
    May 15, 2017
    Posts:
    7
    I'm using the 2018.3 Beta to create a large slope made from multiple connected terrains. I'm having an issue where these terrains all have the same base height, meaning I can't have terrains next to eachother and use the smoothing tool to close any gaps

    upload_2018-12-2_14-4-47.png

    Here the terrain on the right has a y position of 200 and a height of 0, the terrain on the left has a position of 0 and a height of 200.

    Is there any way to get them to align properly?
     
  2. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    945
  3. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    My solution when I was working on this was unfortunately to just take the generation outside of Unity then check what each cell (terrain) lowest and highest point was and do it manually (to maximise resolution). Because if this isn't done, the terrain slowly loses precision on height. Would just try automating that if you can't find a workaround.

    If you can get away with a single higher resolution terrain it'll save tears in the long run.
     
  4. JDatUnity

    JDatUnity

    Joined:
    May 15, 2017
    Posts:
    7
  5. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    945
  6. JDatUnity

    JDatUnity

    Joined:
    May 15, 2017
    Posts:
    7
    Thanks for your help but I couldn't get it working the way I wanted. For now, all terrains are using the same max height which is working fine. This is ofcourse not ideal because as soon as new terrain parts are added that need to be higher than 2000 problems will occur.
     
  7. ChrisTchou

    ChrisTchou

    Unity Technologies

    Joined:
    Apr 26, 2017
    Posts:
    74
    Yeah, this is an issue. The terrain tools assume every terrain has the same Y range, so they can directly merge the height-maps from each tile.

    It's possible to make it (mostly) work by converting the tools to work in world space at higher precision. But it's definitely a lower priority task on our backlog, because it does make the code quite a bit more complex, and it is much harder to guarantee perfect seams between neighboring terrain tiles that have different Y ranges.
     
    jelle_unity461 likes this.
  8. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    What if one could just convert a heightmap-based terrain to a mesh-style terrain -- Then one could use a mesh+polybrush sculpting approach to particular terrains here.

    The only difference would be how the two render (to an extent), but it would make this extra-hacky programming a moot point. This hacky way of programming is what screwed Unity's editor in the past. :/