Search Unity

Nanite mesh vs hybrid renderer for physics

Discussion in 'DOTS Physics' started by francois85, Jun 1, 2021.

  1. francois85

    francois85

    Joined:
    Aug 11, 2015
    Posts:
    1,632
    There has been some big buzz over nanite and this particular video was interesting to me. If nanite just boosted rendering should we expect better performance from DOTS physics with hybrid renderer than this demo? Is rendering physics the real bottleneck?

    I have not touched dots physics or nanite so I really don’t know what to expect for either of these technologies.

    https://m.youtube.com/watch?v=YlQOpAQ4Wno
     
  2. nsxdavid

    nsxdavid

    Joined:
    Apr 6, 2009
    Posts:
    473
    Nanite, as implemented by UE5, is a very different way to throwing geometry at the screen. Unreal uses a different way of storing mesh geometry and getting on the screen (think of encoding quantized mesh data into textures and processing in compute shaders for a very imprecise explanation). It has limitations, but it bypasses the traditional rendering pipeline and can do some amazing stuff.

    It has no relationship to the other things you mention in Unity. Unity has nothing like this currently. Sadly.
     
  3. francois85

    francois85

    Joined:
    Aug 11, 2015
    Posts:
    1,632
    Thank for the explanation, just a flow up question. For a scene like the one in the in the video, if this was done with Hybrid Rendered and Dots physics would you suspect It to be GPU bound ? Or if both hybrid renderer and nanite are not the bottleneck then I would guess dots physics would be more performant .. right ? I know it’s all very speculative but I’m legit curious why the UE example is so fast and if this is faster than what I can achieve with DOTS
     
  4. nsxdavid

    nsxdavid

    Joined:
    Apr 6, 2009
    Posts:
    473
    There are a lot of videos like that which all make one fundamental mistake: they have a ton of the same object on screen.

    This is not the best way to show off nanite as it represents the easiest thing to do. It challenges Nanite the least and demonstrates a less impressive delta from standard rendering techniques.

    to be clear: in a traditional rendering pipeline you’d do what they show there with GPU instancing. Which is easy to do in Unity.

    Nanite will do it better in specific cases, but the point is that games are seldom made from tons of the exact sane object on the screen and so such performance tests give the wrong impression.
     
    francois85 likes this.
  5. brunocoimbra

    brunocoimbra

    Joined:
    Sep 2, 2015
    Posts:
    607
    You are comparing apples with oranges here.

    As a very imprecise explanation, Nanite just allows you to import unoptimized meshes to be used as if they were previously optimized. It doesn't boost the rendering performance or the physics simulation performance.

    DOTS Physics is about multi-threaded physics with a promise of being deterministic and network-friendly in the future. Meanwhile, Hybrid Renderer exists just to provide systems to render ECS entities, in the end it uses the same rendering pipeline of the project that the MonoBehaviour world uses (what makes it more performant than the MeshRenderer and such is the data-oriented approach on it).

    So for the physics part: while DOTS Physics is multi-threaded, UE5 also has an experimental option now to update the physics asynchronous. I've not compared both to know which one is more performant, but if anyone is willing to try out I would be very interested in the results (but AFAIK the Chaos physics is very unoptimized right now).

    For the rendering: if you would import the same meshes that Epic used in their UE5 demo on Unity, Unity would probably explode as it would not be able to handle the unoptimized meshes. Now if you want to compare the rendering capabilities of both, just use usual game-ready meshes on both and see how much each one can handle.
     
    francois85 likes this.
  6. nsxdavid

    nsxdavid

    Joined:
    Apr 6, 2009
    Posts:
    473
    Nanite is far more than just importing and optimizing meshes. Part of Nanite is a highly compressed data representation of Meshes for a very specialized rendering technique, but there is no equivalent to that in Unity land.
     
    brunocoimbra likes this.
  7. brunocoimbra

    brunocoimbra

    Joined:
    Sep 2, 2015
    Posts:
    607
    Thanks for pointing that out, made me want to get to know better about Nanite and - gosh - this tech is amazing!

    So it does have performance boosts on the rendering side, but still have nothing to do with the physics side.

    EDIT: in case anyone else is curious about: https://docs.unrealengine.com/5.0/en-US/RenderingFeatures/Nanite/
     
  8. nsxdavid

    nsxdavid

    Joined:
    Apr 6, 2009
    Posts:
    473
    Yeah it is super cool.
     
    brunocoimbra likes this.
  9. francois85

    francois85

    Joined:
    Aug 11, 2015
    Posts:
    1,632
    This is insane.
     
    brunocoimbra likes this.
  10. bb8_1

    bb8_1

    Joined:
    Jan 20, 2019
    Posts:
    60
  11. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    27,994
    Unity is not working on similar tech. Consider that epic gave you 1 year's notice they were working on nanite. So even if Unity was, you would be waiting a very long time.

    In Unity land if they haven't got it on package manager, it's considered not coming.
     
    bb8_1 and brunocoimbra like this.
  12. bb8_1

    bb8_1

    Joined:
    Jan 20, 2019
    Posts:
    60
    huge part of this tech(must say that maybe i'm wrong here - my conclusion is formed just from watching some related pdfs like last 45 minutes lol) sounds to me as dots for gpu plus ofc a lot more - and Unity is working for a long period of time on dots for cpu - so i hope they will start working on this if they did not already - it is really about a time since this is becoming(very soon) a new standard( or a revolution so to say) for game engines - i really love Unity and hope community will push Unity devs in this direction
     
  13. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    27,994
    Don't think so, I've been here nearly longer than anyone. Unity's biggest problem right now is finishing up and polishing what they have. If they add yet another massive tech undertaking on top it'll finish them.

    This industry is ever-changing, and adding stuff because your competitors have it (and nanite is unproven right now btw - even though it looks very promising so far) is a horrible business move.

    The bigger picture is... what support around the tech is there? Example: Unity changed how their terrain rendered years ago but left all the tooling to stagnate around it. Not even got a vegetation solution yet. This is YEARS and years, not a few months.

    Without the tooling to go with a feature, you will find the biggest part is missing. It's easy to add new tech but the hard work is making it easy for customers to use and deploy.

    Unity's barely polished up their shader graph, which competing engines had working and finished *before Unity even existed*. That's the timescales we're looking at and priority. We're talking as far back as 2003 or before.

    These are hard truths but hiding the truth helped no-one ever, to make good decisions.
     
    bb8_1 likes this.
  14. francois85

    francois85

    Joined:
    Aug 11, 2015
    Posts:
    1,632
    It a little disheartening to read this. I tried the U5 demo and it really rubbed salt in unity GI and SRP wounds.
     
    bb8_1 likes this.
unityunity