Search Unity

Terrain.. best practices

Discussion in 'General Discussion' started by derkoi, Oct 21, 2014.

  1. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    So my game, like many peoples, needs a landscape. Currently I'm either using the built in terrain engine because the billboarding trees and grass seems to work quite well. Or for mobile I use a regular model.

    I read on here that Unity's terrain is broken etc etc, so what are the alternatives? My world needs lots of foliage and I plan on using Speedtree when Unity 5 is available but should I scrap the terrain engine completely?

    What's your thoughts/experiences? Why is the terrain broken and what can be done (if anything) to make it work?

    Thanks
     
  2. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    938
    It depends on your needs. The game I'm making needs a fully interactive, modifyable and destructable world. The builtin terrain isn't really a suitable choice for that, especially if you also want to include caves or other underground features.

    If you dont need all of that, are developing for desktop and your levels aren't too big (eg you don't need to be streaming an open world game), then I suppose you could go with the builtin terrain. Otherwise, standard meshes and a custom made system are probably your best bet.

    For me, I made my own voxel terrain engine that streams or generates new chunks of terrain when the player moves around. Changes that the player made get saved to disk and loaded when the player revisits the same area.
     
  3. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Thanks, my game is a fishing simulation, so I need lakes, rivers etc. Not all in the same scene. Vegetation is the key for me really.
     
  4. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    The terrain can be used really well to argive a nice landscape for a game. However you'll find yourself hitting the head to the desk when you want to do these things:

    - Paint textures seamless between two terrains
    - Paint terrain model seamless between two terrains
    - Create holes for caves
    - Combine billboard trees with realtime reflective water ( water gets by default rendered over the billboard trees, so trees in far distance are overlappen by water, fixable tho )
    - Combine trees with realtime water and occlusion culling ( they randomly disappear in your water reflection but not on terrain )
    - Stretched textures without any custom terrain shader

    These things are the biggest points I hit when dealing with the terrain. Ofcourse there are hunderds of features that would be nice, but to work with it as it is now, these can be a real pain.