Search Unity

Seamless Terrain - UniLOD

Discussion in 'Editor & General Support' started by zzz7net, Oct 7, 2011.

  1. zzz7net

    zzz7net

    Joined:
    Oct 7, 2011
    Posts:
    5
    I'm using 9 terrains for one seamless terrain. My main heightmap resolution is power of 2 + 1. Heightmaps of the terrain blocks is power of 2 +1 too and in .RAW format. "SetNeighbors" script applied to all terrains.
    But I can see only horizontal LOD matching up on my neighboring terrains. Is it engine restriction to make only horizontal LOD matching or I'm doing something wrong ?

     
  2. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Those terrain edges don't even look close to being continuous. Is it possible your heightmaps are either rotated incorrectly, flipped or not in the right positions? Once you get that resolved, you can use Eric's "Stitchscape" ( http://www.starscenesoftware.com/Utilities.html ) to smooth the seams between the tiles.
     
  3. zzz7net

    zzz7net

    Joined:
    Oct 7, 2011
    Posts:
    5
    Horizontal chunks are connected to each other.
    And vertical don't even look close only because UniLOD doesn't work propely.
    Main heightmap divided into chunks in Adobe Photoshop and in 3ds Max looks fine (with Displace modifier).

    Damn UniLOD! Why it is so hard to make Unity Terrain LOD system work properly?
     
  4. zzz7net

    zzz7net

    Joined:
    Oct 7, 2011
    Posts:
    5
    All terrains are numerated in that way:
    from above downward and from left to right.

    0 | 1 | 2

    3 | 4 | 5

    6 | 7 | 8
     
    Last edited: Oct 7, 2011
  5. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I don't know, I've never tried UniLOD. Perhaps you should write the author directly for help. There have been other terrain LOD systems posted that seem to be working. I tested Precursor's "Terrain Manager" ( http://forum.unity3d.com/threads/96190-Terrain-Manager? ) and it worked quite nicely although it doesn't look like he's released it yet.
     
  6. zzz7net

    zzz7net

    Joined:
    Oct 7, 2011
    Posts:
    5
    Actually I didn't mean UniLOD plugin I've mean unity build-in terrain LOD. Unity Script Reference:


    Terrain.SetNeighbors

    function SetNeighbors (left : Terrain, top : Terrain, right : Terrain, bottom : Terrain) : void

    Description:
    Lets you setup the connection between neighboring Terrains.

    This ensures LOD matches up on neighboring terrains. Note that it is not enough to call this function on one Terrain, you need to set the neighbors of each terrain
     
  7. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    The lod will match up but that does not mean that it will just adapt the lane, that will not happen without you programming it or using something like Erics StitchScape
     
  8. zzz7net

    zzz7net

    Joined:
    Oct 7, 2011
    Posts:
    5
    Yes it's working! ...Wow it's perfect!.
    Dreamora and bigkahuna thanks for help. I appreciate it.
     
    Last edited: Oct 8, 2011
  9. sh0v0r

    sh0v0r

    Joined:
    Nov 29, 2010
    Posts:
    325
    Stitch scape is good but it creates 'belt' seams on terrain with very steep height values, I made a modification to it so that it will edge stitch single verts. This does require the height values to be very close together as the new point is interpolated between the to height values. The biggest problem with making terrains this size is lightmapping them. I have not yet found a method to be able to light all the tiles and have each one be influenced by light bounces from neighbouring terrains.

    See this thread: http://forum.unity3d.com/threads/105141-Light-mapping-a-HUGE-terrain-Details-inside...