Search Unity

"Large Scale" terrain - best practices?

Discussion in 'Scripting' started by fetish, Feb 22, 2019.

  1. fetish

    fetish

    Joined:
    Aug 25, 2015
    Posts:
    73
    Hello - I was wondering how to properly scale terrain for a "world map" sized landscapes.

    I'd like scale it in world units (ie, 1 = 1m), so I can do in-game things on it without having to convert units all the time. What's the best way to do this without sacrificing performance? Are there ways to "downrez" the terrain so it's the amount of triangles and nodes?

    Thanks!
     
  2. mbaske

    mbaske

    Joined:
    Dec 31, 2017
    Posts:
    473
  3. fetish

    fetish

    Joined:
    Aug 25, 2015
    Posts:
    73
    Sorry - I meant, what is the technical practice?

    If I want to scale my terrain to the size of britain (600,000 world units), how do I keep the resolution of the terrain low enough to actually be rendered? I'm talking terrain settings in the editor, rather than a data construct.

    Or am I better off using a different spatial reference (ie, treat 1 world unit as 1,000 world units, etc)
     
  4. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,638
    Typically for a large game like Skyrim, the big game world would be divided into lots of smaller terrains and you would load them and remove them as needed so that only the immediate area around the player exists at any one time. Skyrim, I believe, actually uses different terrains at different-levels-of-detail depending on how close or far you are.

    That works too. How detailed does the terrain need to be? Are you walking around, or in a jet?
     
  5. mbaske

    mbaske

    Joined:
    Dec 31, 2017
    Posts:
    473
    There's a good tutorial series on procedural terrain generation from Sebastian Lague.
    This part here deals with switching resolutions for different levels of detail
     
  6. fetish

    fetish

    Joined:
    Aug 25, 2015
    Posts:
    73
    My apologies for being unclear:

    I want a 3d map of a continent that you might see in a game like Civilization or Total War - I don't mean large in traversable space, I mean large in game units (as long as we're using the same scale). If my map needs to be 600000 game units tall (with a camera suitably far away), what is the best practice for creating that terrain while keeping performance in mind?
     
  7. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,638
    Sure, but how would that be any different than mbaske and I already went over?
     
  8. fetish

    fetish

    Joined:
    Aug 25, 2015
    Posts:
    73
    I'm not trying to implement an open world, so I don't need varying levels of detail at different scales. Literally I just want to scale up a regular terrain object to continental scale for use as a "world map" in a way that's not hell on performance.
     
  9. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,638
    Ah, I see what you mean, but I don't think there are any rules of thumb for this. you'd probably still want to use terrain tiles- but as for how big they are, and the polygon density- that's going to depend on a lot of things, like how far you can pull the camera back, and how fast you can travel over the map. Might require some trial and error.

    My strategy to handle this, so far, has been to divide the map into logical "locations" but my game is an adventure game, rather than a strategy game, so that sort of strategy may not work in your case.
     
  10. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,183
    Use a mesh. Unity's terrain system has a high impact on performance but a normal mesh won't.
     
    xVergilx likes this.
  11. goksel_mert

    goksel_mert

    Joined:
    Sep 4, 2019
    Posts:
    1
    Hi!

    I was wondering if you have been able to solve this issue? I am having the same question, any tips?

    Thank you!