Search Unity

What is a reasonable size, count and resolution of terrains for a human scale game?

Discussion in 'World Building' started by AnsisMalins, Apr 14, 2020.

  1. AnsisMalins

    AnsisMalins

    Joined:
    Mar 16, 2014
    Posts:
    30
    Let's say I want to cover a ~2x2 km area with terrains for a human scale game. I mean a 1st or 3rd person game where characters are roughly human sized, with surroundings to match. So not an RTS, not a cartoony game, etc. Think Skyrim, but on a comparatively tiny map.

    Terrain resolution of 1 to 2 per meter sounds reasonable (is it?). So that's a single terrain of 2049x2049 or 4097x0497, or four terrains quarter that size, or sixteen terrains 1/16th the size, etc. There's a sweet spot somewhere, and I don't how how to even begin looking for it. Help? Any rules of thumb? Any factors that make a big difference?
     
    sirleto likes this.
  2. AnsisMalins

    AnsisMalins

    Joined:
    Mar 16, 2014
    Posts:
    30
    After doing some more research and talking to people, my guess is, you want your terrains as big as possible, and the limiting factor is probably gonna be the splatmap resolution. E.g. on Unity 2018.4, it's 2048 on the side max, and from playing around with it, I find that you need at least 4 pixels of splatmap per meter for good looking results, so the largest terrain you can have is 512 meters on the side, so that's 16 terrains to cover a 2x2 km area. 2019.3 can do 4096 sized splatmaps, so that would be just 4 terrains.
     
    SametJR and sirleto like this.
  3. AnsisMalins

    AnsisMalins

    Joined:
    Mar 16, 2014
    Posts:
    30
    In Unity 2018.4, the terrain heightmap size is further limited to 1025, because Enlighten can't bake realtime GI for larger terrains. It will fail immediately. This is regardless of how much RAM you have and is easy to reproduce: empty scene, add a terrain, set heightmap to 2049 and try baking realtime GI.
     
    Lahcene, SametJR and sirleto like this.
  4. sirleto

    sirleto

    Joined:
    Sep 9, 2019
    Posts:
    146
    Thanks for these valuable responses!

    Wish more people would comment on this now in 2022 :)
     
  5. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,758
    To be honest, you should be using 2019 LTS build, 2018 is so out of date....
     
  6. sirleto

    sirleto

    Joined:
    Sep 9, 2019
    Posts:
    146
    Surely you mean 2021 LTS by now? The thread is old, but the questions still valid (and ignored/unanswered by others).

    Do you have anything to add? Perhaps why 2019 is reasonable to use in regard to terrain?
     
  7. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,758
    For the newer releases 2021 LTS would be the newest one i would ever use, as after that its a dumpster fire. I personally use 2019 LTS, due to my project/asset compatability. Not all assets and other things are supported by newer versions of Unity, and can cause problems, or hours of conversion.

    There is no way 2018, compared to 2019 is better. 2019 LTS is one of the most solid versions available to date. Also to note is many have reported that newer versions tend to be slower, and i can confirm this. I personally have deved 2 games with 2019 LTS (fps survival, 3d, with very dense foliage/objects), and have had no problems at all, in fact performance has been reported as stellar. 2021 LTS?, no thanks, at least not right now, lol.

    I dont know your project, but ive had no prob with GI, lighting or anything else, regardless of size of terrain/etc.
     
    sirleto likes this.
  8. sirleto

    sirleto

    Joined:
    Sep 9, 2019
    Posts:
    146
    Sadly I also have ported prototypes + full games from 2019 to newer 2020/2021 and have less good results in performance (built in pipeline).

    Still, my own feeling was, I'm not using/configuring things properly. E.g. lots of foliage, forward rendered, light prices not disabled even though I don't need them, etc

    So not sure if it's unity fault, or mine ;-)
     
  9. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,758
    Your not at fault. It just takes some time to know how to set up the base settings of a terrain, thats all (depending on version and game). But newer versions of Unity are slower. I too use BuiltIn renderer, and refuse to use anything other than 2019 LTS, for lots of reasons.

    If you have a specific project your working on, id be glad to help.
     
  10. sirleto

    sirleto

    Joined:
    Sep 9, 2019
    Posts:
    146
    thanks for that very nice offer.
    let me tell you my personal status:

    i am currently experimenting with "how large" PLUS "how high res" can it be, at once.
    my basis is a i7-9700k with RTX 2070, so maybe a "mid range desktop" for 2023/2024, so that i can then have "highest quality" settings with a "high end cpu+gpu" in 2025.

    i want a gameplay that features both "3rd person on foot" forests (dense foliage, max speed 20kmh) and vehicles (60kmh) and flying (180kmh)

    i am investigating about the basis factors of unity terrain, for authoring i am using MicroVerse using https://assetstore.unity.com/packages/tools/terrain/microverse-core-collection-232976 which is incredibly useful. for terrain texturing quality i am using MicroSplat https://assetstore.unity.com/packages/tools/terrain/microsplat-96478.

    things i want and am in the process of experimenting (in regard to find sweetspots of quality/performance and in regard how fast can it be "dynamically configureable")

    goal is to cover 8000x8000m (basic unity unit).

    ( beyond that i want to cheat with auto generating map magic https://assetstore.unity.com/packages/tools/terrain/mapmagic-2-165180 or just static meshes rendered "outside" of visual range of camera. )

    1. how many terrains is best for this size, ideally covering 1x1m per height value. is it better to have 8x8 or 4x4 or 16x16 (performance for unity to manage terrain objects is okay, not terribly bad, but also not that good). currently i have aprox. 5ms for 16 terrain objects.

    2. what res of height map is best for those terrains 1024² or 2048² or 512² ?

    3. what res of splatmap is best?

    4. what can be done for terrains far away from player? disable trees and use impostor system? only draw with basemap distance = 0? set pixel error level to 200?

    5. or rather convert these far away terrains into low-res mesh objects and switch to rendering those.

    6. how to draw multi distance foliage close to camera? right now the unity terrain detail system has only 1 distance (while trees nicely can have multiple distances due to LodGroup being usaeble)

    so, this is my agenda of tests for the near future (days and weeks) :)
     
  11. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,758
    One thing your going to want to do is Chunk Stream Terrain. I use SECTR, and theres others out there. Check out the asset to understand it, but chunk streaming your terrain only allows certain chunks/areas of your terrain to be rendered by the camera (depending on your setting/chunk size). This greatly improves performance (about a 30-40 fps buffer).

    I use chunk streaming, as i deal with large terrains or open world senarios. 8K size (as you mentioned), isnt bad, but optimization of terrain, foliage, and all objects is going to be very important, as well as what the camera is actually rendering. Both my previous title and current title, everyone says runs awesome, with great performance (even on some low end rigs), thats due to me being such a optimization freak, lol.

    Some of the questions you posted are what i call "trial and error", as you have to try out different resolutions, and settings to see how they effect performance. There really isnt a shortcut, as every game is different...
     
    chipb likes this.
  12. chbran

    chbran

    Joined:
    Dec 9, 2018
    Posts:
    23
    there is a nature manufactury humble bundle right now. its a steal when you new to unity and dont have any of that assets.
    it contains world streamer 2.
     
    sirleto likes this.
  13. sirleto

    sirleto

    Joined:
    Sep 9, 2019
    Posts:
    146
    i will have a look, thanks a lot. i have read review of nearly all streaming related asset store products and world streamer 2 has had the most people complaining ... for such an expensive product a bit sad?
     
    warthos3399 likes this.
  14. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,758
    @sirleto your correct, thats why i mentioned SECTR to you, its easy to set up, and great functionality. Theres only 1 drawback, doesnt support mesh terrain (which i never use). Ive used it for 3 years, once you get used to it, you wont look at other assets.
     
    Lahcene and sirleto like this.
  15. sirleto

    sirleto

    Joined:
    Sep 9, 2019
    Posts:
    146
    great to hear, i had the impression, from reading revies that a lot of people are happy with SECTR, will review and compare them again ONCE i need streaming.

    rightnow i have a huge landscape, huge amount of objects and no streaming needed.

    BUT i do a lot of things with many terrains, switching their render quality on the fly, intentionally using different tree renderers for foliage and stuff to get the benefits of all systems mixed together (performance, far draw distance, high detail level, etc.)

    my general goal is to make open world without the usual nasty "lots of fog in the distance" that plages nearly all ps4 generation open worlds. i am not there yet, though :-D
     
  16. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,758

    Youll love it, and once you get used to it, you wont look back. Its like that asset that you now include with every project, and know you can save big fps/ms.

    "rightnow i have a huge landscape, huge amount of objects and no streaming needed." - Now i think im begining to understand your game. How big is the terrain?. How many objects?. Do you use static batching/dynamic batching/mesh combining?. Is it low poly?.

    Good goal, optimization is my "strong suit" as they say. I use Gaia as my terrain generator (custom textures and stamps), then i uninstall/delete Gaia from the project, and use terrain tools for any changes.

    Some of us are looking for a nice steamy/foggy/misty tropical environment, lol. But your point is valid...
     
  17. sirleto

    sirleto

    Joined:
    Sep 9, 2019
    Posts:
    146
    As I wrote, still testing and benchmarking, so I have a long list of variables and no decision yet:
    https://forum.unity.com/threads/wha...s-for-a-human-scale-game.867439/#post-8536034

    But my objects are simple, still. I mean they are just meshrendereres, some static batching for things built from many subprefabs, colliders. I'm not building a medieval village from thousands of object's .

    But what I'm doing right now is having trees + foliage move between static batched objects, unity default terrain trees, details...

    I'm especially these days looking for forests in the whole terrain. This means billboards are a must. So far best solution has been unity classic tree creator billboarding system. The old one that was not optimized for high poly trees, can't do instancing, but can render 100.000s of billboards in half ms!

    Right now I'm looking into the shader sources for them, to get them to be deferred+ normal mapped. I have read many very old threads about them, but still don't fully understand why people hated them, so much that unity phased them out... But still half-heartedly has them documented in 2021.

    Curiously enough more detailed documentation can be found in unity <5 docs :-D
     
    warthos3399 likes this.