Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

DOTS versus Nanite?

Discussion in 'Entity Component System' started by MedoMelo, May 14, 2020.

Thread Status:
Not open for further replies.
  1. MedoMelo

    MedoMelo

    Joined:
    Jul 5, 2019
    Posts:
    42
    Just saw the last video of Unreal Engine about the new version of their engine and I can't lie to myself, I was blown away.

    Nanite, which is called a virtualized micropolygon geometry system, allows infinite tris object on scene without any impact on performance. According to the demo, it seems to work with static object, but as no communication as been made, we don't know if it's also working with dynamic objects.

    But still, this is shaking my foundations and my motivation getting into DOTS

    Just wanted to have your thoughts about it

     
    ovirta likes this.
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,648
    They are completely different things...
     
  3. wg-siggig

    wg-siggig

    Joined:
    Mar 17, 2020
    Posts:
    36
    Nanite and Lumens are part of the new renderer, has nothing to do with the programming model. No announcement yet from Epic if they are changing any of that, but I know they've been playing with ECS patterns for a while.
     
    OldMage and Nyanpas like this.
  4. MedoMelo

    MedoMelo

    Joined:
    Jul 5, 2019
    Posts:
    42
    ... sharing the same purpose: improve the performance.

    Why bothering learning a very complex way of coding to gain performance if there is no tris budget anymore?

    I'm voluntarily provocative
     
    Last edited: May 14, 2020
    NinjaMonkey06, HeyZoos and Vincenzo like this.
  5. Lhawika

    Lhawika

    Joined:
    May 27, 2015
    Posts:
    53
    I'd remind you that this is a demo (there might be other resources that I'm not aware of). We all saw the DOTS demos presented by Unity and every time this is wonderful, yet (nearly) none of us ever did something similar with surch results (I'm thinking megacity). So I'd say wait and see, because there's a gap between a jaw dropping demo and reality, mainly because they always make it look super sweet and easy.

    I learnt, at my expense, to wait for proper release before I get excited.
     
    MedoMelo likes this.
  6. Nyanpas

    Nyanpas

    Joined:
    Dec 29, 2016
    Posts:
    406
    If you want to provoke, then keep in mind that game logic is processed differently from visual logic. Currently there are architectural differences between GPUs and CPUs meaning that they are specialised for certain things, and as of now, what UE offers in terms of game logic is falling far behind even what Unity can offer as experimental features, and perhaps even a generation behind id Tech 7.

    Let's say you have 100 NPCs on screen. In UE5 that's perfectly fine until they start to do things that require AI. Meanwhile in Unity that number's probably now in the five-six digits using experimental features, but again, it all depends, and could be more or less. UE is not there yet with regards to thread handling as Unity.
     
  7. Filtiarn_

    Filtiarn_

    Joined:
    Jan 24, 2013
    Posts:
    173
    How do you know Epic has been playing around with ECS patterns?
     
    Nyanpas likes this.
  8. RoughSpaghetti3211

    RoughSpaghetti3211

    Joined:
    Aug 11, 2015
    Posts:
    1,695
    Epic is targeting film/vfx. They seem to be the front runners in graphic quality and caught on how much money studios spending on rendering. It a staggering amount. A few years ago I read a comment by John Riccitiello saying films are no longer producing big billion dollar blockbuster hit yet year after year we see record breaking billion dollar movies. So demo like this has that sector drooling. It also game me the impression it not a major focus for unity at the moment.

    Where Unity is a clear winner to me is DOTS. Burst job ECS is just amazing to work with.
    I do love pretty graphing though and was I was very impressed by Epic demo. I see so many unity users pancaking over this. This is just a new bar that I’m sure unity will target to pass.
     
    MedoMelo likes this.
  9. RoughSpaghetti3211

    RoughSpaghetti3211

    Joined:
    Aug 11, 2015
    Posts:
    1,695
    I for one appreciate the complexity reduction DOTS provides in writing multi threaded safe code.
     
  10. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    3,993
    To keep this topic somewhat relevant, the only black-box change the Hybrid Rendering team would need to make is to expose a fast-path for streaming individually unique proxy meshes without fragmenting ECS chunks. This other black-box piece is already in active development: https://forum.unity.com/threads/feedback-wanted-streaming-virtual-texturing.849133/

    The rest can be done with a custom SRP and more time and energy than I have. :p

    DOTS solves the problem of writing game code that runs fast enough to run alongside such a technology.
     
    Nyanpas, Flurgle and GilCat like this.
  11. Fribur

    Fribur

    Joined:
    Jan 5, 2019
    Posts:
    127
    Is anybody aware of a fundamental technical limitation why the RenderMesh has to be a SharedComponent affecting chunk fragmentation? I am scratching my head about that since DOTS was introduced. DynamicBuffers are not. Or other large struct I would attach as ComponentData. I think it is a perfectly normal use case that a given Mesh is unique in the Scene, and it should not affect how to iterate over the entity components?
     
  12. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    3,993
    It is a huge optimization for instanced rendering. Instanced rendering is a much more common use case when working at the scale DOTS allows for. You absolutely do not want to give up this instanced rendering optimization.

    But I do think the Hybrid Renderer team needs to support an alternative path for non-instanced rendering where the mesh does not belong to a shared component. This may be more important when a large mesh is being covered in hundreds of textures and you want to split that mesh up for better culling so you don't need to keep so many textures on the GPU. However, I'm not sure what kind of feedback mechanism Unity's virtual texturing solution uses. If it is post-clip-space, breaking large proxy meshes apart might not be necessary. Still would be nice for procedural meshes though.
     
    Nyanpas likes this.
  13. MedoMelo

    MedoMelo

    Joined:
    Jul 5, 2019
    Posts:
    42
    @exkise: I agree with you, without any information from this "Nanite", this is just show off.

    @Nyanpas: interesting, so the way we could benefit performance from these two different technologies will depend on the structure/ design of the game?
     
    Last edited: May 15, 2020
  14. elZach

    elZach

    Joined:
    Apr 23, 2017
    Posts:
    48
    Basically, when you are developing your game, you will be increasing the times it takes CPU to compute the scene and GPU to render it. Along the way of development you'll eventually drop frames because either of these times surpass 16ms (for 60fps).
    Most of the time you'll either have high CPU times (Physics, AI or just a very large number of gameobjects) or high GPU times (lots of individual meshes, large textures or really complex compute shaders) - there are several techniques and tricks to escape these bottlenecks.
    To improve GPU times you have to either tune down the fidelity of the scene or reduce the amount of interaction it has to do with the CPU (Instancing for example reduces the amount of exchange the CPU and GPU have to have by sending multiple objects on a single call).

    So in the demo for example, moving the first highpoly Zbrush statue to the GPU is a monumental task, however once it's on the VRAM rendering it a couple of hundred times more isn't the same as having a hundred more individual statues.

    Than there's the scene in the end, where the user character is moving a lot of distance at very high speed, which means moving a lot of data between CPU and GPU, which is very impressive and not possible without great CPU and GPU usage.

    Unitys ECS efforts and the general Data Oriented philosophy are huge contributors to bringing developers in the situation where they can benefit from those *tricks* - as they are often hard to implement in Objectoriented structures, but more easily achievable when your data is setup to be accessed easily to begin with.

    So in my opinion the UE team definitely showed some wizardry, but it should in no way discourage you from learning DOTS as it's probably the best way to work towards the results they've shown.
     
    Last edited: May 15, 2020
    nirvanajie, Kirsche, MedoMelo and 3 others like this.
  15. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,655
  16. MedoMelo

    MedoMelo

    Joined:
    Jul 5, 2019
    Posts:
    42
    Thank you this was very informative and very clear.
     
    elZach likes this.
Thread Status:
Not open for further replies.