Search Unity

terrain questions

Discussion in 'Editor & General Support' started by TheRhinoDude, Apr 21, 2009.

  1. TheRhinoDude

    TheRhinoDude

    Joined:
    Apr 21, 2009
    Posts:
    11
    This probably comes up all the time, but several searches have revealed nothing. I'm wondering what the maximum terrain size is in heightfield pixels and what densities are available in meters?

    Are there ways to "stitch" together terrain blocks, current or planned? Any terrain paging / streaming feature, current or planned?

    Thanks in advance,
    Ryan
     
  2. TheRhinoDude

    TheRhinoDude

    Joined:
    Apr 21, 2009
    Posts:
    11
    OK I found the answer to one of my questions: the default terrain spacing unit is 1m, so that is the max heightfield was say 1024x1024, that would be a tad over 1km x 1km square.

    Could somebody please:

    1) confirm that you can set the units to whatever you want, say as high as 16m?

    2) what is the max heightfield size that is supported? Is it fixed, or based on available video card memory?

    3) is there currently, or planned (announced on an official roadmap someplace), terrain paging so you can have dynamically loaded terrains of arbitrary size?

    Thanks,
    Ryan
     
  3. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,603
    1) yes you can have less precision by just changing the terrain scale from 2000,600,2000 to something higher

    2) 2048 per terrain block I think.

    3) Possible since 2.1 already. You do this through multiple terrain blocks and loading them from AssetBundle / additional levels through LoadLevelAdditive as required. With the set neighbor function you define the adjacent terrain of each terrain to make the terrain normal match up (no light gaps)
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    2) More like 8193. 4097 definitely works.

    --Eric
     
  5. amherst

    amherst

    Joined:
    Dec 9, 2008
    Posts:
    30
    I am also looking for the answer to this question - "What is the maximum terrain size you can scalably use in Unity?" I'm trying to build a real world model of a forest system that is about 20km x 20km.

    Is the answer then that the maximum terrain size is 4097m x 4097m? i.e. a 4km x 4km area? Or by 4097 are you referring to just the Heightmap Resolution?

    Thanks!
     
  6. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    4097 is the heightmap resolution. Maximum terrain size is whatever the limits of single-precision floating point allows.

    --Eric
     
  7. amherst

    amherst

    Joined:
    Dec 9, 2008
    Posts:
    30
    thanks, eric.

    So just to make sure I'm understanding how it all relates....

    If 4097 is the max heightmap resolution, the largest terrain size with which you can have control of each square meter of splat map for painting textures would be about 4000m x 4000m. Is that correct? Basically a 4km x 4km terrain.

    Thanks!
     
  8. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    Yep, that's correct.

    --Eric
     
  9. SirFency

    SirFency

    Joined:
    Apr 2, 2010
    Posts:
    91
    I have tried to set the max hieghtmap resolution to 4096 and I get a warning that states heightmaps above 4096 x 4096 are not suported and it sets my resolution back down to 2049 I'm not sure why.
     
  10. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,039
    4097x4097 (16 bit) can crash Unity. I filed a bug report on that once.

    I personally use 1025 or 2049 if I need really high resolution. And I do a lot of stuff with terrain.

    Don't forget that that's just the resolution. You can easily have a 1025 terrain span 100 km if your game doesn't require fine details.
     
  11. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,039
    redundant, missed that the spammer bumped an old thread.