Search Unity

Question about big terrains

Discussion in 'World Building' started by bobthebuilder111, Oct 19, 2018.

  1. bobthebuilder111

    bobthebuilder111

    Joined:
    Aug 30, 2018
    Posts:
    8
    I am wanting to create a big terrain around 24k x 24k and wanted to know about the best way to do something like this. I know that I would need to slice the terrain into tiles/chunks and then load only the tiles/chunks closest to the player. My question is, how do I go about actually building the terrain (mountains, oceans, rivers, etc).

    Do I use to the unity built in terrain system or do I use a separate program then export / import the map into Unity.

    One problem I am having with building the terrain inside of Unity is the baking and clustering after every terrain edit. (this takes hours on a 24k sized terrain) . I know I can disable the auto baking and re-enable it when my terrain is finished? Is this method okay? Any advice would be appreciated.
     
  2. My first advice is: don't do it. It's too big. I don't know how many people will work on your game, but having this giant terrain is a lot of work if you're doing a land-based game.
    If you're doing a flight-game, you are better off to create impostor terrain (and making only the portions where you can get close to it). Also you can check out the Horiz[on] asset on the asset store, it creates impostor terrain and pretty cool. Although it's only good from a distance, obviously.

    Second advice: check out MapMagic asset in the asset store. I'm recommending it because it can generate your terrain on rules rather than building the entire terrain by hand. Also it can do the tiling for you.
    Third: if you create a giant terrain by hand, you will need two things:
    - tiling
    - floating origin
    Both of them are in the World Streaming asset (also Asset Store), and it's reasonably easy to handle it.

    Otherwise you will have to think and develop a lot of things yourself, it's not easy to realize this big terrain in any engine and it's even harder in Unity at this point (although in the close future Unity already is addressing some of the problems).
     
  3. bobthebuilder111

    bobthebuilder111

    Joined:
    Aug 30, 2018
    Posts:
    8
    Can you explain floating origin more to me? I've been seeing that pop up a lot with my searches. How do I go about fixing that issues and what exactly is the issue?
     
  4. So, floating origin is a necessity because we're using floating point numbers. They become imprecise when they get bigger. Which means your physics and calculations will be jittery and well, imprecise.
    To mitigate this, you can use the floating origin method, which basically moves your player and everything(!) with it to the origin (vector3 0,0,0) from time to time.
    Usually (!) Unity can handle 0-10000 units well, above that it can get imprecise. Above 15k-20k, it's usually really jittery. Unless you're making big changes at once, then it does not matter. It matters when you want precise movement like a human size character on the ground or falling and/or colliding objects.
     
  5. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Even if you have a good reason for a huge map. You don't have a good reason to be using one that big during the bulk of your development. There are little to no features or gameplay you can't test on far smaller maps.
     
  6. BoogieD

    BoogieD

    Joined:
    Jun 8, 2016
    Posts:
    236