Search Unity

Official MegaCity Feedback & Discussion

Discussion in 'Entity Component System' started by smcclelland, Mar 19, 2019.

  1. smcclelland

    smcclelland

    Administrator

    Joined:
    Dec 19, 2016
    Posts:
    147
    Hello everyone,

    We are super excited to have the MegaCity project available for everyone to download. Please use this thread to post any feedback, issues, or any other relevant discussions around the MegaCity project.

    If you haven't seen or heard of MegaCity, you can head over to https://unity.com/megacity and read more as well as download the entire project.

    You can also watch our GDC 2019 Keynote presentation about MegaCity here:


    Have fun!
     
    Last edited: Mar 19, 2019
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Hiya,

    I'm wondering what the recommendation would be for a terrain, using these techniques? I have thousands of terrain features such as trees, buildings, walls, rocks, towns even, but mostly a hell of a lot of trees and rocks.

    (I decided to make grass it's own thing as it seems a waste of resources for something do fine grained as grass).

    Any advice is welcome regarding open world context! thank you.
     
  3. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    Opening Unity Megacity you need:
    1. 44 Gb of free space (better SSD, do not use HDD)
    2. Download file 7Gb,
    3. + 22Gb for the unzipped project version
    4. + other 20 GB 14Gb? if you what to make the build
    5. Unity 2019.1 and
    6. For Windows users, IL2CPP component instaled (this component can be added using the hub).
    This demo fit better for my needs. I'm using
    Windows 10 64bit | i7-2600K | GTX 1080 Ti | 14Gb ram | HDD | 4K TV as a monitor
    Takes 20 min or more to open. (HDD) and use 11Gb of ram
    8min to make the build. (I make the build in a second SSD)
    but in my case, the build gives me errors.

    When I hit play in the editor I get an error but use the WASD or arrows key and Enter to start the demo that runs at ~20fps(quality settings = medium). Not bad; in editor mode is usable. I feel I can work in it. Is super awesome.


    Hold on... it takes 1 or two minutes to compile if you move a nested prefab. Is there a workaround?
     
    Last edited: Mar 20, 2019
  4. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Is the code posted somewhere other than as part of a 7GB download?
     
    PlayCreatively likes this.
  5. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    I must admit that I was expecting a better performance out of this. On my 1080 TI I can get only 30fps, loosing most of a time on CPU. It also seems impossible to load all objects from a start - everything works as progressive load. (and this isn't a good thing for game or cutscene). First load should follow some hierarchical rules - for any real usage, big buildings should be loaded from a start without progressive load. Afterwards, details can be loaded progressively.
    -Once it does load, I get too many collisions between main car and other cars or objects.
    -I get a heavy noise from volumetric lights. But really nasty.
    -post processing effects are exagerated.
    -Alliasing is all over the place (but that is understandable with such detailed small objects)
     
    fablemaker and antey3094 like this.
  6. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    What cpu are you using?
     
  7. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    669
    Do you have burst enabled?
     
  8. Adam-Bailey

    Adam-Bailey

    Joined:
    Feb 17, 2015
    Posts:
    232
    I got the same thing and was wondering if I was doing something wrong in terms of workflow. Opened one of the buildings, moved a wall section, and it immediately paused for a few seconds to update the prefab.

    Performance in the editor wasn't that bad for the amount of things going on, but in a standalone build it felt very decent. Didn't check the framerate but felt smooth on a 970 at 1080p with medium settings except for LOD bias pushed up to 2.5.

    I initially thought the volumetrics were splotchier than they actually are, until I realised it was a noise texture on the density volumes. Got rid of that to just try and look at noise and the volumetric light effects on the spotlights are still very low quality, to the point that they would look much better with old fashioned faked light cones. The overall image quality seems hard to get right, none of the AA solutions really worked well with the environment as it is.

    The sheer amount of detail is impressive, especially after turning up the LOD bias. I assumed the cars were all just following pre-defined routes and was pleasantly surprised when I realised they actually reacted to me to avoid collisions!

    Load times for a built version of the project are impressive.
     
  9. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,685
    Uncheck autosave checkbox in prefab workflow
     
    Adam-Bailey and AlanMattano like this.
  10. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    This is because the demo defaults the antialiasing off in the player camera. I suspect they did this as current HDRP TAA doesn't work properly in MegaCity at all. Other AA options work however, you can use SMAA or FXAA just fine and it'll reduce the jaggies.

    If you open Assets/Prefabs/Scene/000_Scene.prefab, it has the PlayerCam object and you swap the AA option from it.
     
    AlanMattano likes this.
  11. IIporpammep

    IIporpammep

    Joined:
    Aug 16, 2015
    Posts:
    39
    Google Drive link doesn't work now. Does anyone have other links to download the MegaCity? Maybe just exe?
     
    Last edited: Mar 20, 2019
  12. theDiver

    theDiver

    Joined:
    Jul 4, 2018
    Posts:
    7
    I wonder why they did not put it on Github, like the last huge demo the made?

    There are already so many changes in the newest beta that there are compiler errors.

    If it would have been on Github, i am sure somebody would have fixed it already.
     
    TokyoWarfareProject likes this.
  13. cerkut

    cerkut

    Joined:
    Mar 6, 2017
    Posts:
    6
    Thanks so much. Runs ok here using
    - %71.6 CPU (i5 6100)
    - 5.6 GB of 16 GB RAM
    - %60 of GPU NVIDIA GeForge GTX 1080

    Took some time to figure out that SHIFT and not enter accelerates. Soon I'll dive into how audio works within ECS.
     
    harini and AlanMattano like this.
  14. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Final build is ~4.6 GB, I looked around it and noticed that it also has EntityCache folder which contains 189 files and it takes 1.5GB total in addition to 2.8GB sharedassets file which holds the meshes and textures. This brings up a question what does the EntityCache really contain? Are these for the subscenes, and if so, what kind of data is packed in them? 1.5GB is bit more than what I'd expect from scene descriptions.
     
  15. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    3. it's 17.6GB unpacked
    4. you get 8.3GB on library cache, 4.6GB on final build + 0.5GB on IL2CPP generated files
     
    Last edited: Mar 20, 2019
    AlanMattano likes this.
  16. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    It was enabled by default on the top menu bar: Jobs > Burst > Enable Compilation.
     
    Last edited: Mar 20, 2019
  17. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
     
    castana1962 and AlanMattano like this.
  18. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    Can't download. Google drive quota limit.
     
  19. Nyphur

    Nyphur

    Joined:
    Jan 29, 2016
    Posts:
    98
    Yep, you've reached your Google Drive quota on the Megacity demo download. Is there an alternative mirror?
     
  20. smcclelland

    smcclelland

    Administrator

    Joined:
    Dec 19, 2016
    Posts:
    147
    Hi everyone, we're working on addressing this. Will keep you posted once I've got an update.
     
  21. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    What was the specs of the hardware they demo this on? and also the heretics? Consumer level ain't my computer :p
     
  22. theDiver

    theDiver

    Joined:
    Jul 4, 2018
    Posts:
    7
    Why don't you put it on github?
     
  23. sethwklein

    sethwklein

    Joined:
    Oct 24, 2014
    Posts:
    8
  24. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    669
    FPS Sample gets around this with Git-LFS, so the actual binary blobs are elsewhere, and not on github.
     
  25. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    MegaCity audio package is still not supported by 2019.2. I just tested with 2019.2.0a9 which released today. The audio package works on 2019.1.0b7 which is one 2019.1 beta behind already. Will 2019.2 get the api update at some point?

    More specifically, 2019.1 ships with Unity.Experimental.Audio where 2019.2's audio module doesn't contain it.

     
    ZenUnity likes this.
  26. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    400
    Hi
    I am trying the Megacity demo and added the StearnVR plugin to see it in my own VR Heaset
    I added a CameraRig prefab from Steam VR plugin in my scene and I see succesfully the Megacity Menu but Black the Megacity game and I got the following warning
    Cannot set field of view on camera with name PlayerCam( PlayerCam is the MainCamera Project) while VR is enabled
    I disabled the PlayCam but I cannot fix this problem, for it, Is there any way to see the Megacity game in my VR Headset?
    Please let me know how fix it?
    Thanks
    Alejandro
    PS. I am very excited to learn ECS with Megacity demo !!!
     
    ZenUnity likes this.
  27. antey3094

    antey3094

    Joined:
    Mar 21, 2016
    Posts:
    15
    Flickering volume light is terrible. Even on high settings.
     
    Last edited: Mar 24, 2019
  28. Artaani

    Artaani

    Joined:
    Aug 5, 2012
    Posts:
    423
    Do you plan to release a tutorial about how to create such scene step by step? This demo seems completely nonsense without an explanation of what going on here.

    For example:
    1. Why there is a lot of "scene object" in the list of objects? Why you can't just use standard prefabs?
    2. Why I can't select any cars by clicking on it. How cars is flying? I can't see what code it have. Or cars it is like "particles"?
    3. Why I can't see any meshes if I enabled "wareframe mode" in scene view?
     
    castana1962 and Romenics like this.
  29. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    You are in ECS forum. If you worked with Unity ECS, you would have answers to most of these questions.
    These are not like typical OOP GameObjects, hence they don't work like you may expect. At least for now.

    Please watch megacity introduction, to get some idea, if haven't yet.
    Further to that, I suggest find and watch video, which is diving into Megacity technical aspects.

     
    joshcamas, Artaani, SugoiDev and 3 others like this.
  30. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,685
    1. Because scene streaming helps reduce initial load spike and load all smoothly. And it’s more convenient with latest changes in ECS conversion tools.
    2. Because they are rendered by new batched request API (instead of Graphic API, but in graphic API DrawMeshInstanced too only shows meshes without any GO, this is why in all ECS representations you can’t select (yet) some things)
    3. Because HDRP, Wirefrme mode in HDRP not supported yet afaik.

    And I suggest you learn DOTS basics before dig deeper in to Megacity :) It's not so easy switch from OOP to DOD, but it's worth it. Starts here: https://github.com/Unity-Technologies/EntityComponentSystemSamples
     
    Last edited: Mar 21, 2019
  31. theDiver

    theDiver

    Joined:
    Jul 4, 2018
    Posts:
    7
    The FPS sample is way bigger than 1 GB, due to it using Git-LFS so it is possible.
     
  32. Fabrice_Lete

    Fabrice_Lete

    Unity Technologies

    Joined:
    May 5, 2018
    Posts:
    55
    MegaCity is focused on streaming all the things (tm), so everything goes through SubScenes which can be loaded independently from each other (there's a hierarchical dependency though, each high res building section requires the corresponding low res section to be loaded first). In a typical game there are indeed things you'll want to have loaded all the time, but that's roughly what we have with the low res buildings and the car traffic lanes. They are still streamed, but they come first and never unload. If you need things the be completely done loading before you use them, you simply have to preload or wait, streaming offers you more control but nothing prevents using it like normal loading.

    One important thing with ECS though is that there is conceptually no code that executes at startup and can immediately process data, there is only code that can process data when the data is there. It takes time to get into the mindset of everything being asynchronous and it's definitely challenging, but it's a powerful concept.
     
  33. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    It is powerfull, but probably as you say, it requires time to understand possibilities. One question: how can we know when a scene has been fully loaded?

    Another question: I can see that image post effects are managed from Volume script and not from Post Processing Stack scripts. Does this mean that Unity moves away from Post Processing stack or is this only a demo specific change?
     
  34. harini

    harini

    Unity Technologies

    Joined:
    May 28, 2015
    Posts:
    45
    The Audio System in Megacity is built on top of DSPGraph (which is available in 2019.1 as an internal API and inside Unity.Experimental.Audio namespace). We are working at moving this into a package and hoping to make it available in preview to the users as part of 2019.2. In order to do this we had to remove it from Unity's code base in 2019.2.
     
    FROS7 and rz_0lento like this.
  35. harini

    harini

    Unity Technologies

    Joined:
    May 28, 2015
    Posts:
    45
    Great! Do let us know your feedback about the audio system!
    We are also working on a technical document which describes the audio system in Megacity and will be publishing it soon.
     
  36. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    400

    Attached Files:

  37. Fabrice_Lete

    Fabrice_Lete

    Unity Technologies

    Joined:
    May 5, 2018
    Posts:
    55
    SubScene sections are loaded asynchronously but are merged into the main world synchronously. In other words, they are completely there or not at all. So you can just have some sort of sentinel object in there and check for its presence.
     
  38. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    People should definitely try a standalone build and disable burst/jobs checks if they're getting unexpectedly low performance...

    I was able to get 60 in most cases on ageing haswell i7 from 2014 + nvidia 980 card (with a broken fan). Editor performance was typically half.

    Also flying the car is an absolute joy, can you pass on my regards to the person who coded it? I enjoy spinning it and it feels like a new starfox game waiting to happen. Very playable and fun.

    (using xbox pad)

    Sorry slightly offtopic!
     
    Alverik, AlanMattano, filod and 7 others like this.
  39. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    400
    Ok, so I will disable burst/jobs and will be of results of it and if anybody is interested in it, please let me know it....
     
  40. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I mean the debugging/safety checks of course :) but best is a standalone build.
     
    Alverik likes this.
  41. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Good to see you guys working on streaming. How efficient is it? Curious as we were just implementing our own streaming data from disk system using C# threads, reading in small chunks at a time using lower level file IO directly into native containers. All of the current Unity async api's are horrible for this use case, they all stall the main thread. Even the new AsyncReadManager does this which I don't get.
     
  42. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    The AsyncReadManager is very nicely integrated with C# jobs and works quite well in the megacity, it does not cause any stalls on the main thread. As a first step we are quite happy with the performance of the streaming code. We can stream 200k entities (in one building) in 30ms spent in the file read and less than 1-2 ms spent in main thread spike when moving the entities to main world.

    Given the amount of entities in a single megacity building this is a very big deal.
    The whole point of megacity is to prove that streaming of massive amounts of entities works well.
     
  43. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    I presume, we could treat megacity more like stress test / show case, rather than functional game design?
    Even tho, it works quite well, as it is now.
     
  44. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Very much so, MegaCity for us was a stress test of:
    * Workflow for building massive world using nested prefabs & subscene workflows
    * Streaming massive amount of entities
    * Ensuring simulation & rendering and soon integrated Unity.Physics hold up in a world with massive amount of entities

    4.5M renderer loaded in the editor is not something we recommend anyone actually does in a game, it's a stress that to ensure that what we do scales.
     
    TeagansDad, Alverik, Enzi and 4 others like this.
  45. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    Just my curiosity, regarding mobile version of megacity.

    I haven't tested myself, but does mobile version shown last year, is exactly same build, as per PC version?
    Or there was some specific for mobile optimization done beforehand?

    What mobile device specification / model was megacity presented on?

    Als, any idea how long such megacity would last on such mobile, in terms of battery?
     
  46. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,685
    IPhone X.
    Afaik it’s little bit different version.
     
    Antypodish likes this.
  47. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    Thx.
     
  48. Micz84

    Micz84

    Joined:
    Jul 21, 2012
    Posts:
    451
    Yes, it was a different version. During the presentation, it was said that "friends from Nodus" were working on a mobile version.
     
  49. Hyp-X

    Hyp-X

    Joined:
    Jun 24, 2015
    Posts:
    438
    Cool.
    I already started building my own audio system on top of DSPGraph, thanks to the Megacity release.
    Got 3d voices, basic music system working in 1 day from scratch.
    This is the revolution that Scriptable Render Pipeline was for graphics.

    It would be good if DSPGraph would have it's home in this forum. There's no Audio subforum under Betas & Experimental Features.
     
    cerkut, harini, FROS7 and 1 other person like this.
  50. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,620
    Is there also a (pre-built) Windows Player download?

    I've downloaded the entire project and it's unpacking since like forever already and after having read the requirements, I can just assume my PC is going to burst to flames eventually.
     
    Ale_alejandro likes this.