Search Unity

What renderer to use ? URP vs Built-In + Some DOTS discussion

Discussion in 'General Discussion' started by Sergey_ksubox, Sep 11, 2019.

  1. Sergey_ksubox

    Sergey_ksubox

    Joined:
    Jul 29, 2015
    Posts:
    5
    Hello,

    I'm just starting Unity, but have 3D background with shaders/opengl and heavy C++.
    I need to create artistic style (I mean not exactly PBR) fully dynamic scenes with multiple volumetric lights and particle effects.
    And I need this to work on mobiles & desktops. Beta version is expecting within 3 month with production in 2020.
    From first sight I understood, that I have to go with URP(LWRP) and probably VFX graph, but this comparison shows for me, that URP is not yet completed and then I found a lot of complains in this forum about features/quality/bugs of URP. From another side Built-In pipeline lacks VFX, will be deprecated (no development, no small bug fixes, just critical) and less efficient for mobiles.
    Also documentation, blog posts and changelogs sometimes contradicts each other.
    So I completely messed with direction to go and need advice from persons who have experience with both pipelines: which one is better suited for my project?

    Thanks.
     
    Last edited: Sep 11, 2019
  2. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    5,830
    If you're just starting out, you'll likely find yourself relying on existing resources, the vast majority of which is going to be largely based on the built-in pipeline still. It's by no means a "bad" pipeline and it has been used on projects that match a similar scope to yours.

    Remember, you can always learn URP, HDRP, and the entire pipeline system later if you find one fits your needs better.
     
  3. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    1,563
    I agree with this. This is the main reason why I've not switched to any of the SRPs yet.

    For example, you mentioned that you want to use volumetric lights but neither the built-in rendered nor the URP have this feature included. For the built-in renderer, though, you'll be able to find multiple paid and free volumetric light implementations on the asset store, github, etc. I don't know about URP, on the other hand. It's so new that people haven't really developed many add-ons for it yet..
     
    Teila and Lars-Steenhoff like this.
  4. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,476
    My opinion which I will not discuss:

    Universal. Get stuck? ask forum. Why SRP?
    • faster
    • active feature development
    • supports DOTS
    • VFX graph
    • Shader graph
    Universal is also simpler, you likely don't need all the learning tutorials built-in required, and even allows you to visually do render passes and other stuff within the editor.

    Sure, built-in has a lot of old crap floating about but it's exactly that: old crap. It's also rapidly falling behind, and so are all the assets that support it. Those individuals and amateurs (and most of them are amateurs) won't be fixing your sky and water problems forever.

    Unity is solving those problems actively and ongoing with SRP.
     
  5. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    263
    I'd like to believe this, but honestly URP (formerly known as LWRP) still has show stopping bugs, and I'm not sure I would recommend new developers go down that route.

    Sure, on a brand new, simple project, everything likely works with the new pipelines. But, most projects are not simple. My current project is a cross-platform AR project and it's a struggle to use URP along with ARFoundation. Eight months ago this blog announcement touted LWRP support. Everything's even better when ARFoundation added image tracking, which my project required. Then (not sure when it happened), ARFoundation + LWRP no longer worked together. Last week, with ARFoundation 3.0.0, it finally sort of works again (excepting an IL2CPP Android build).

    Developing AR is not simple, the build/test iteration is painful and becomes more so when a project needs to be rebuilt time and again because of changes/updates to the plug-in and the renderer. Assuming this new user adds anything extra, like AR or an asset store product, they are likely going to run into frustrations.

    I do agree, and appreciate what Unity is doing with SRP. The only reason I was willing to suffer through the pain of AR + LWRP is that the performance and quality is noticeably better than the built-in renderer. My hope is that the past year was a transitional year though, and in 6 months everything will settle down and 'just work' again. My fear is that 'transitioning' becomes the new normal and with each project you have to do a ton of research to figure out the correct combination of packages to make a stable project.
     
    OCASM and luispedrofonseca like this.
  6. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,476
    I see, but your situation is specific to AR if I'm not mistaken. So if that's the case then anyone not on AR, who are beginning a new title should compare built-in to SRP and factor in if they need graphs/future proofing.

    The Universal renderer is *significantly* simpler and cleaner than the built-in renderer so it's not going to have that much of a long dev time.
     
  7. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    263
    Yes, my complicating factor is AR. The OP mentions the project will use VFX and I would assume Post Processing as well. Add in a potential need for camera stacking as the UI is built out and suddenly you have a complex set of interactions and compatibilities.

    The VFX graph is more performant and superior to built-in features, but we lose camera stacking (a standard practice for years). Maybe that's OK for the project, but for a new developer the standard built-in route is going to feel more stable and predictable in features.

    OTOH, if they go built-in and then decide they really need Post Processing, I cannot even recall how that works in the built-in pipeline or where to import it (Package Manager or Asset Store?).
     
    Last edited: Sep 11, 2019
  8. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    1,521
    Package Manager.
     
  9. Anaxis_Studio

    Anaxis_Studio

    Joined:
    Sep 7, 2019
    Posts:
    8
    I would personally recommend using the URP because you are just starting Unity and you could jump right into DOTS, rather than use the "classical" method.

    From personal tests I have done URP appears faster by default for a wide range of scene types and when you combine it with DOTS performance is uber quick. This might also be beneficial for a save/load system as decoupling the data makes it easier to manage, and has the benefit of being quicker when loading scenes.

    My vote is for URP if you want maximum performance on mobile. DOTS is just on another level. ECS + job system + burst compiler on URP will give you much better results in terms of performance.

    https://unity.com/dots
     
  10. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    12,028
    But DOTS is not a general purpose solution. It doesn't replace the "classical" method, it operates alongside it to provide improved support for specific types of use case.

    Plus, if you're just starting then learning the basics first rather than jumping right into specialised systems is probably a good idea. Walk before you run. :)

    That said, I think I agree that URP is probably a good idea for new projects. Hopefully I can provide an experience backed opinion on that in a few weeks. :) The transition period where URP is becoming the new standard will probably be a bit bumpy for new users, but why learn the old one if you know you'll have to change again later?
     
  11. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    1,889
    You make it sound like every project is a fit for DOTS, which ofcourse is not the case. It in no way replaces classical unity development, it is something that can be leveraged for some projects depending on viability
     
  12. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,322
    We would need to see a screenshot of what you are trying to do.

    In general, you should use built-in. Why? Because it's the most stable platform and almost every Unity mobile game was built using it and they perform just fine. There are no real performance concerns if you do basic optimisations. All store assets work, too.

    URP is them trying to recreate Built-in in a more modern way, but it's basically still LWRP right now.

    If you need VFX graph then you will need to use URP or HDRP. If you need volumetric lights then how are you doing that on mobile devices? You can get them in built-in with an asset, or you can fake volumetrics using various techniques (depending on what you are trying to do).
     
  13. Sergey_ksubox

    Sergey_ksubox

    Joined:
    Jul 29, 2015
    Posts:
    5
    Thank you very much for your advises.
    I got a look from different perspectives.
    And by the way I tested a little URP. Looks better from fps, manageability point of view. VFX somehow works. Post processing doesn't work for me. Probably not yet implemented. Shader graph is not so bad to work with. And custom node is a winner.
    So I will try to go with URP and write custom shaders if necessary. In worst case I will adjust design to URP (and my :) possibilities.
     
    Last edited: Sep 13, 2019
  14. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    14,414
    It is implemented but it's accessed differently than the built in renderer.
     
  15. Sergey_ksubox

    Sergey_ksubox

    Joined:
    Jul 29, 2015
    Posts:
    5
    Really ? Any clue where it's written how to use ? I didn't find any special package except Post Processing 2.1.7
     
  16. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    2,422
    You guys think upgrading to newer version is worthwhile for a basic desktop/console project that largely uses unlit, handpaint shaders?

    Perhaps the shader graph is bonus for non-coder, but what if we already got third party solution like amplify? Any other reasons to upgrade beyond improved realistic lighting?
     
  17. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    14,414
    I'm not aware of any documentation. I just created a blank project and in the sample scene was a "Post-process Volume" with the "Post Process Volume" component attached to it with Bloom, Color Grading, and Vignette by default. I was under the impression it was in an odd location like with HDRP but it appears I was off there.

    upload_2019-9-13_13-45-12.png
     
  18. Anaxis_Studio

    Anaxis_Studio

    Joined:
    Sep 7, 2019
    Posts:
    8
    It literally replaces the classical way of unity development... that's why the old way is being called "classic". This isn't an opinion - it's been clearly stated in DOTS documentation and videos about how its the "new" way to program fully intended to replace the old method of using gameobjects and monobehaviour. It's likely they will not remove the classic style but it's akin to walking vs driving. Driving is objectively quicker... Sure, you can walk 10 miles but if you drive it will be much quicker and less stressful.

    it might not be a full replacement yet because they're still working on it but it's been stated multiple times that DOTS is going to be the way forward.

    "We’re rebuilding the core foundation of Unity with the high-performance multithreaded Data-Oriented Technology Stack."

    They are rebuilding Unity's core foundation to work with DOTS. I'm not sure how you see this as not being a direct replacement to the classic way of programming.
     
  19. Anaxis_Studio

    Anaxis_Studio

    Joined:
    Sep 7, 2019
    Posts:
    8
    They changed how post-processing works but the documentation is a bit lacking. You basically add two components to the camera (PostProcessVolume and PostProcessLayer).

    on the camera in question add the PostProcessVolume and PostProcessLayer components. Set the post process layer to a custom layer "Post Processing Layer" for performance reasons. You also need to create a post processing behaviour profile and drop it in the slot in the post processing volume's profile slot.
     
  20. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    14,414
    Care to provide a link to this documentation? Because I haven't found anything resembling proper docs for DOTS.
     
  21. Anaxis_Studio

    Anaxis_Studio

    Joined:
    Sep 7, 2019
    Posts:
    8
    Well there isn't "official documentation" for DOTS yet. I picked the wrong wording but it's easier than "stated in a collection of videos released by Unity, the information available in devblogs, and other various videos or code snippets including github which act as documentation insofar as they provide examples of classic vs DOTS and related systems". But DOTS documentation could refer to anything (videos, articles, blogs) from Unity that talk about DOTS and ECS vs classic, of which there are quite a few.

    This is something I've noticed quite far back.

    https://blogs.unity3d.com/2019/03/08/on-dots-entity-component-system/


    Game Objects aren’t going anywhere. People have successfully shipped amazing games on it for over a decade. That foundation isn’t going anywhere.

    What will change is that you will over time see our energy to make improvements tilt from going exclusively into the game object world, towards the ECS world.

    https://github.com/Unity-Technologies/EntityComponentSystemSamples

    The Entity Component System offers a better approach to game design that allows you to concentrate on the actual problems you are solving: the data and behavior that make up your game. It leverages the C# Job System and Burst Compiler enabling you to take full advantage of today's multicore processors. Moving from object-oriented to data-oriented design makes it easier for you to reuse the code and easier for others to understand and work on it.

    To me this is a clear indication Unity is moving towards DOTS and away from the classic style of development whilst still maintaining support for those who don't want to move to DOTS.
     
  22. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,476
    As the topic has veered into DOTS land (and it should because SRP is the only real way to take advantage of DOTS for rendering) I might as well mention visual scripting is DOTS too. I mean what we're looking at is what Unity's been calling "Unity 2" in some internal circles. It's basically a complete rewrite from the DOTS up and built-in isn't a part of that. So yeah it's fine to use either but to make the most of it you'll want DOTS backbone.

    Really the question is if your game will look 10x better because you could put 10x more on screen vs if you want to rely on asset store.
     
  23. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    6,340
    With a beta delivery date within 3 months, I'd probably go with the legacy pipeline at this time.
     
    Metron likes this.
  24. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    2,372
    DOTS based rendering isn't anything to write home about right now. It's just missing too much, and unless they all the sudden decide to pick up the pace on it, it's going to be a long while before that changes. We have been using DOTS since simple jobs first came out, 99% of our own stuff is all in DOTS. And it's rendering is remarkable in that it's the only part of DOTS we don't use.
     
    Metron likes this.
  25. Anaxis_Studio

    Anaxis_Studio

    Joined:
    Sep 7, 2019
    Posts:
    8
    I disagree but it's a personal opinion. The Megacity demo is something that couldn't be done with the classic method. (and I don't call it classic to be mean-spirited, it's just the term I've heard used by people like Mike Geig in videos when talking about DOTS/ECS vs GameObjects/Mono

     
  26. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    14,414
    I don't agree that they couldn't have made Megacity without Unity DOTS. Unity loves to show off demos with extremely high numbers of entities moving around in them but as impressive as these demos are the reality is it wasn't the first time we saw that accomplished in Unity.

    We had entity component system frameworks before Unity DOTS.

    https://github.com/sschmid/Entitas-CSharp

    We had the ability to draw meshes with higher performance than using a GameObject.

    https://unity3d.com/unity/whats-new/unity-5.4.0
    https://docs.unity3d.com/ScriptReference/Graphics.DrawMeshInstanced.html

    We just didn't have the ease of use we have now with Unity DOTS, and would have had to use more smoke and mirrors too.
     
    Anaxis_Studio likes this.
  27. Anaxis_Studio

    Anaxis_Studio

    Joined:
    Sep 7, 2019
    Posts:
    8
    I guess it depends on the standard for implementation. I don't think you could implement it in the standard way and get the same performance. I know ECS and instancing has been available for a while but things like the burst compiler haven't (at least it's still preview)

    https://blogs.unity3d.com/2019/02/26/on-dots-c-c/

    "We’ve built a code generator/compiler called Burst. It’s been available since Unity 2018.1 as a preview package. We have a lot of work ahead, but we’re already happy with it today."

    "All users benefit as the parts of their frame time that are spent running engine code (usually 90%+) get faster. "

    and most importantly...

    "By writing Unity’s runtime code in HPC#, the engine and the game are written in the same language...... where nothing is stopping users from writing a better particle system, physics system or renderer than we write."

    That's personally some of the reasons I think it will be able to produce scenes that can't be done with the conventional method. Whether those things are useful to hobbyists or even non-professionals is questionable. Not sure I can see myself writing my own physics or particle systems any time soon if it's not 100% necessary.
     
  28. Sergey_ksubox

    Sergey_ksubox

    Joined:
    Jul 29, 2015
    Posts:
    5
    Thank you, it's really works!
     
  29. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    2,372
    It absolutely could have been done without DOTS. Excluding stuff that wasn't even released yet like the audio. This isn't a matter of opinion. This is stuff we have code and data for, and some of us have actually been using it and know exactly how well it performs and what it can and can't do.
     
  30. Anaxis_Studio

    Anaxis_Studio

    Joined:
    Sep 7, 2019
    Posts:
    8
    I'm not trying to say it would be absolutely impossible to get it running using the standard method but it's obviously faster and better performance using DOTS...You could get megacity to run on a potato but just with a poor framerate, stuttering, etc. That's what the whole Megacity was designed to showcase afaik. In the longer videos they talk about how they tried to push it to the maximum and how ECS and DOTS was the reason they were getting such a stable framerate with so many objects.

    I've looked before but haven't been able to find a video reproducing the Megacity using the standard vs dots method because i was curious about how they compare so if you have a link I would be curious to see the performance they get.
     
  31. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,476
    I've edited the original title of the thread to include some DOTS discussion as its actually quite relevant to picking a renderer.

    Some random extra thoughts:
    • You end up saving a TON of ram with the DOTS stuff. Streaming is cake, and takes very little time to load a world, or snapshot or stream meshes etc with DOTS.
    • Stuff is less dynamic without DOTS. You just fake it, sure, but it is faking it and you come up against some pretty hard limits to how dynamic or changing something can be. It also extends dev times as tricks do cost you in R&D. Throw it at the world, let it take care of it.
    • SRP. This is the biggie. You don't batch by material any more. You batch by shader. This is a huge deal. It means all your LODs and the hundred thousand objects remain interactive speeds. Can you do all this without SRP and without DOTS? Yes but forget anything being dynamic and you will take longer to make it.
    Full disclosure through I'm on HDRP. I'm not moving. I really like this engine. It's stupidly fast in the right hands. It's getting even faster. As soon as DOTS is mature enough (I mean proper editor conversion) then I'm migrating to it ASAP for a full DOTS main project.

    The performance gains are way too good from personal experience but I am of course wary of stability, of support and workflows. These things are what I, and everyone waits for.

    The SRP though, IMHO is very much ready if you're not doing AR and you can prepare your rendering for DOTS improvements without coding in ECS. Behind the scenes, the Unity engine is being optimised with SRP in mind. So for me there is no reason to contemplate builtin for any new projects and it's why I recommend SRP.

    The time a new project will be finished - any serious one - will be a year off from now. Thus, for any studio it's a decent safe bet if the SRP of today works for you.
     
    Lurking-Ninja, Voronoi and Ryiah like this.