Search Unity

Large scale world in Unity: Is this a realistic goal?

Discussion in 'Getting Started' started by NOTS_63926, Apr 7, 2015.

  1. NOTS_63926

    NOTS_63926

    Joined:
    Aug 21, 2013
    Posts:
    2
    Hi all, thanks for taking the time to read this over! So, I'll try to keep this as brief as possible while covering as much pertinent detail regarding the project as I can. Essentially, our team is attempting a pretty large scale scene that will include a somewhat sci-fi like disc that a city will rest on. This city will include roughly 500 uniquely designed buildings with no roads or other city infrastructure. The outlying areas will have some terrain modeling to represent mountains, hills, ect. Now, we've done a great deal of research on Unity and its capabilities, well enough to know that the question of "poly count limits" cannot be definitively answered as so many factors play into what its limits are. However, with the number of assets we're trying to achieve, with fairly low res images for textures, (512 or so), what would be a realistic goal as far as poly budgeting per building? Would this be 1000 per building, or 100 per building, or 10? We simply have no idea where the scale for acceptable would start and completely unrealistic would begin. The user would be at a somewhat distanced perspective from the city, so this would not be a GTA style game as far as maneuverability. So I guess the main question is whether or not the scope of this beyond what Unity in its current state can do well? Any feedback is very much appreciated! Thanks!

    Edit: I've been advised LOD is a critical key in making this more doable, however our attempts at experimenting with Unity LOD hasn't given us optimal results. We seem to be getting a very distinct pop between models, as opposed to a gentle transition.
     
  2. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,536
    The answer to this is almost always "yes, as long as you are capable of doing it".

    So yeah, it can be done just fine, just take advantage of standard optimization techniques like static batching, LOD and occlusion culling. Start high on your polycounts, then reduce as needed... balance it with your optimization methods.

    Your poor LOD results are because of poor LOD models and/or distances. Maybe DX11 Tesselation is what you were expecting?
     
  3. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    Agree with @LaneFox. Unity is just an engine. Developing proper LoD models without pop is an advanced technique. And, modern hardware can support millions of verts - however, it's VERY dependent on your fill rate, the exact hardware, how many things are occuring on the CPU, overdraw, and hundreds of other factors that only you can know.

    And, if you can't make it work in Unity, try Unreal. These are the defactor standard engines across the industry covering both AAA and Indie.

    Gigi
     
    NOTS_63926 likes this.
  4. AndrewGrayGames

    AndrewGrayGames

    Joined:
    Nov 19, 2009
    Posts:
    3,821
    From what I understand - correct me if I'm wrong - the metric that is the biggest constraint on Unity is "draw calls". If you can do this city scene in such a way that it has relatively low impact on draw calls, you should be good. Ideally, this would mean that all of your buildings are sharing a small number of materials, regardless of the size of the texture that is being rendered. There are other factors like the DX11 tesselation, LOD modelling that @LaneFox mentioned...but, unfortunately, I don't know enough about those to give you a more solid answer as to what you need.
     
    Gigiwoo and NOTS_63926 like this.
  5. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,702
    Occlusion culling is probably more important than LOD, especially in a highly-occluded environment like a city.

    Also consider streaming. SECTR Stream does it well. No sense having the assets in the scene at all if they're not nearby. This way you can make the "scene" as big as you want.

    And listen to @Asvarduil about reducing draw calls by sharing textures and optimizing batching. For example, Manufactura K4's Top-Down Sci-Fi (on sale this week) uses one big texture for everything.
     
  6. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    The new graphical api's DirectX 12 and Vulkan should help you stomp all over that. But that would be brute force and would require that you only target high end compatible platforms.

    Otherwise you are going to need to do lots of tweaking and tricks to manage it, the most important things is to focus on the platforms you want your game on and their hardware limitations and the performance/speed you want from your game.

    You should check out the new City Building game made in Unity as they appear to have done a good job. -> http://www.citiesskylines.com/
     
    NOTS_63926 and Gigiwoo like this.
  7. GarBenjamin

    GarBenjamin

    Joined:
    Dec 26, 2013
    Posts:
    7,441
    Just do a test scene. Make a building with x (low or high whatever) polys clone it over and over and over to fill out your city size. Then you have something to work with and try some optimization strategies and see what performance is like. If slower than molasses in january then you know you need less. If faster than a speeding bullet you know you can have more. Testing is always the best way to go.
     
    Last edited: Apr 7, 2015
    AndrewGrayGames, Arowx and Gigiwoo like this.
  8. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    If you can't reach the hills and mountains in the distance, maybe Horizon[ON] would be better than terrain, which brings with it quite a heavy load.
     
  9. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Or you could use separate camera layers and scales, a close range radius of say 1-2km, a longer range >2+km which could be rendered to the skybox and only updated infrequently to maintain performance.
     
    Ryiah likes this.
  10. Deleted User

    Deleted User

    Guest

    No trick is to stream tiles in a specific distance pattern and use clever level design to mask the streamed areas so you take full advantage of occlusion culling. Secondly Cities Skylines is a completely different style of games design, thirdly DX12 might have a better threading model but you'll still get into trouble very quickly..

    @TonyLi very much agree with you, for PC and Consoles it's not even worth the time to LOD most stuff as it invariable has little to no impact whatsoever. You can shave millions of polys by just lowering the tile resolution, so shaving 500 polys off a house becomes a little redundant. If you didn't have millions of polys to play with anyway...

    Anywho, shadows (CSM) casters, draw calls, lighting (GI HAH!), frustrum, detail, shinies, AI / Navmesh are all massive challenges you need to figure out.

    The biggest challenge? Well just filling it full of stuff!