Search Unity

How to stitch terrain

Discussion in 'Editor & General Support' started by ocelot, Jul 29, 2009.

  1. ocelot

    ocelot

    Joined:
    Jul 7, 2009
    Posts:
    75
    I have read, in several forums, that you can stitch terrains together in Unity. I cannot, however, find information on how this is done.

    I have a terrain that is 3000, 600, 2000 with a heightmap resolution of 513. For my next game area, I want an even larger area. I increased the size and all the terrain tools are way off the cursor. Even if I raise the heightmap resolution to 1026, it's off just as much. I also changed everything back to what I had, exited and restarted Unity, and the terrain tools are still off the cursor.

    What is the ideal terrain size/heightmap resolution? I am fine with the default, if I can figure out how to stitch terrain "tiles" together. I've read that Fusion Fall does this.
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    if you want to stitch it together, all the tiles must have the same heightmap size I think.

    stitching itself is done through the SetNeighbors function on terrains. Remind that you need to do it both ways.

    stritching will not correct incorrect heightmap data on the border, it will only ensure that things like normals etc are right.

    Fusion Fall uses something alike yepp, but they used the sources so its hard to say how close it is to the actual unity implementation.
     
  3. ocelot

    ocelot

    Joined:
    Jul 7, 2009
    Posts:
    75
    Thanks for the reply. I am an artist on my team, and this looks like coding. It's too bad it doesn't somehow average/merge the edge vertices of the terrain "tiles" together in addition to the normals and the LOD.
     
  4. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    Use L3DT or some terrain tool that creates mosaic seamless terrains, then create one massive terrain then export it out in segments, its in the export tool, then use the SetNeighbors for each piece of the mosaic terrain. It works.