Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

HD Render Pipeline: can't recommend to upgrade yet (feedback)

Discussion in 'Graphics Experimental Previews' started by EnriqueGato, Jan 21, 2019.

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

    EnriqueGato

    Joined:
    Sep 3, 2016
    Posts:
    81
    During 2018 I avoided upgrading my project to HDRP knowing it was still a beta in development. Seeing that Unity was announcing 2018.3 release as "the one" to use HDRP, last week I decided take the leap thinking it would be pretty polished and it would only take some time to update or redo shaders and lighting, but I found some important issues related to performance:
    • The global frame rate of the project dropped by 20% (10% after tweaking some parameters)
    • The startup time to play the game increased by 75% (from 9 to 16 seconds)
    • But the worst problem is Building the project. It takes about 10 times more (no kidding, I measured it) because of the 'Compiling Shader Variants' part of the process. It's so slow that I kept killing Unity process thinking it was frozen until I read this is a real issue of the new pipeline.
    So working with the project right now is a painfully slow experience that I don't know how to afford. Unless I'm missing something or did something wrong (any clue to improve performance will be appreciated), I honestly don't think Unity should encourage people to use the new HDRP, it's not production ready yet.

    And don't get me wrong. I really think HDRP is an important and necessary feature for Unity, but right now you can feel it's not there yet.

    [-----EDIT-----]
    Ok, so after a couple of days playing around with HDRP I think I have a better vision of what I think it's actually good or bad. I'll try to be as objective as I can.

    Upgrading the project
    • The upgrade process: it was more or less what I expected: some shaders where upgraded automatically and some of them (about 40%) manually. I think it's a quite high percentage, half of the screen remains pink, so this is the first scary moment you have.
    • Lighting and shaders: I had to tweak every single shader and light to get the right appearance back. No big deal with this, it's the same when you change for example from Mental Ray to Arnold in a 3D software. The good thing was I could take everything a step further in terms of image quality.
    • Choosing the right version: I couldn't find any reference to understand which of the 20+ preview versions of HDRP is the right one to install. Why are there so many of them and why are all exposed to install?
    Working with the project
    • Frame rate: Probably the first shocking surprise is checking that the project is suddenly slower in terms of frame rate. I guess the HDRP makes more effort to get a better image quality, but you feel lost trying to find out what you can activate or deactivate to increase it. It would be really important to have a complete visual guide to understand which of the dozens of parameters you actually need.
    • Render Layers: The old layers don't work with the new lights, and it was a bit painful to find out how to make them work again. I had to write a custom editor to make the Renderers point to the new Render Layers. Again, I felt lost trying to fix this and found almost no documentation (in some cases not even the basic Unity help, it's not written yet).
    • Shadows: I've been unable to find the way to enable shadows to more than one light. As soon as I activate shadows to a second light I get the warning "Cascade Shadow atlasing has failed, try reducing the shadow resolution of the directional light or increase the shadow atlas size". I increased every single atlas value I found with no luck. No matter what I type it never lets me have two lights with shadows.
    • Environment: It took me a lot of time finding out how to create a sky in the new system. It's very difficult to find any piece of information. Anyway, the new one is waaaay better than the old one.
    • Startup time: Here I honestly have no clue at all of what's going on. An 80% increase on startup time when you want to play the game is way too much, and I don't know if it's something you have to expect after upgrading or some kind of issue with this specific project.
    • Build time: Ok, this one isn't so dramatic as I thought, here's the thing. Yes, it takes forever to make the first build. Seriously guys, it doesn't make sense. 20 minutes to build a small project with less than 100 shaders with only 5 bitmaps makes you desperate. It's the 'Compiling Shader Variants' what makes it so long. But after this first build, the next ones work again in a normal amount of time. It took me some time to realize about this because I never let the first build finish. I killed the process thinking it was frozen and start the whole thing from scratch again and again. So I think it would be good to have some kind of advice telling you it's normal
    • Graphics broken: I've had to re-import my project into a new, clean one to restore the graphics. For some reason I couldn't find out first the graphics started to render like a bunch of random colored pixels, and the next day they wouldn't render at all even creating new HDRP Assets from scratch. I guess this is nothing special knowing it's still a WIP version and I probably touched too many parameters until I understood what they were for.
    So, to summarize, I guess that the main problem is feeling lost when you try to go through this upgrade process. To me, Unity's best feature it's not only the platform itself, but the fact that you have infinite documentation resources everywhere (official docs, forums, Youtube, friends...). So having to go through all this process with almost no documentation was an unpleasant experience. I understand the rest of the issues are normal in a WIP version.

    Anyway, I think it would be good to have a complete step by step guide to understand the new components and features deeply. Knowing that thousands of users have worked with Unity for years, it would be good to have some videotutorial showing how to make the old stuff the new way. I guess you already have that planned for the final release anyway.

    Despite all this, I have to thank the team for the effort of building the new render pipelines. It's perfectly understandable where are they going and the new shaders and lights are accurate and easy to use.
     
    Last edited: Jan 22, 2019
    Rodolfo-Rubens and hippocoder like this.
  2. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,664
    Huh? The HDRP is still in "Preview", meaning it's WIP and not yet production-ready (even though it became more stable, according to the 2018.3 Release blog post). You are free to give it a try. However, unless the "Preview" label is removed, expect quirks like those you've mentioned. This has always been communicated like that.

    As for your performance issues, have you used the Profiler?
     
  3. Nigey

    Nigey

    Joined:
    Sep 29, 2013
    Posts:
    1,129
  4. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Also, this belongs to General Graphics sub-forum.
     
  5. EnriqueGato

    EnriqueGato

    Joined:
    Sep 3, 2016
    Posts:
    81
    As soon as I installed I realized it's still a preview, but I probably got carried away by the strong marketing and demos showing the capabilities of HDRP and assumed it was in a more mature stage. That's why I'm posting this thread, to be sure that people don't make the same mistake I made.

    I didn't dig it down yet with the profiler. The thing is the same project that was soft and fluid before is now heavier and buggy. I'll test it more during the next days.
     
    Shorely likes this.
  6. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Thing is, with HDRP you're putting more feature support into your project.
    Even if you do not use specific ones, support in the pipeline still will be there.

    Sure, some cost are due to not all parts are being optimized, but the overhead should always be kept in mind.
    Note that on PC / Last - Next gen consoles nobody cares about that.

    A-AAA games released with HDRP will probably take 2-5 years to complete.
    At that point either it will be optimized and ready, or rewritten by the game devs on their own.

    Tip: Just read / research what's being dumped into the project before dumping anything.
    If not satisfied with the result - rollback. Even a loss is a result / experience.
     
  7. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,195
    Another thing worth mentioning, in case it's not clear: The default HDRP settings that you get are fairly high-end. If build times are very long for you, I'm guessing you haven't tried toning down the settings at all. (Disabling certain HDRP features results in faster builds due to fewer shader variants being compiled.)

    I mainly upgraded to HDRP so that I could use some of the new cool stuff (like Shader Graph), and some of the most high-end visuals aren't essential for me. So I'm turned off a few things I don't really need. This improved framerate and build times. So, if you haven't yet, consider whether you can turn some things off in the HDRP settings to achieve better performance. But remember that the whole thing about HDRP is a higher quality visual experience at the expense of worst performance. Consider whether your project might be as good or better using LWRP instead.
     
    Shorely and EnriqueGato like this.
  8. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Moved thread to experimental+edited slightly. Please be specific about the reasons holding you back from moving to HDRP, feel free to go into deep details.
     
  9. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,664
    "The target audience for LW RP is developers targeting a broad range of mobile platforms, VR and those that develop games with limited realtime lighting needs". (source)
    If HDRP is too consuming, but you still want all that fancy stuff, then just use Unity's built-in pipeline as before.
     
    EnriqueGato likes this.
  10. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,980
    Are you sure your build time didnt just go up because of the general changes to shader variant compilation? If you handle your variants fine it should be only marginally longer on HDRP
     
    EnriqueGato likes this.
  11. EnriqueGato

    EnriqueGato

    Joined:
    Sep 3, 2016
    Posts:
    81
    Thanks! I've edited my first post to give you an updated view of the whole process I've been through these days.
     
    Shorely and hippocoder like this.
  12. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    hi, Thanks for the detailed feedback.

    Various answers below.

    HDRP is still preview until 2019.3, expect another hard step to update with 2019.1 as we removed PPV2 and switch to PPV3 (without any migration support) + there is a lot of change.
    All new demo at Unity are done with LW or HDRP, but it doesn't mean you need to convert your project to them. Built-In Unity still totally fine for many purpose and there is nothing forcing you to move to SRP. The move should be motivated by what HDRP or LWRP bring, not because it is where Untiy effort are.
    There is a support documentation in the manual about the difference between pipeline and which one to used.
    https://docs.unity3d.com/Manual/BestPracticeLightingPipelines.html

    Note that we don't recommend to switch to HDRP if you are on a project in production on builtin. HDRP is for new project or project in pre-production.

    Also regarding documentation have you seen the wiki ? (Still a lot to do but at least there is information)
    https://github.com/Unity-Technologi...wiki/High-Definition-Render-Pipeline-overview

    An important note: We haven't written HDRP as an upgrade of Unity rendering, we have re-written the rendering of Unity to fix everything that was not working in Builtin (It was not HDR correct, not physically correct, wrong falloff etc...). And we take the opportunity to update various tools: HDRP come with plenty of debug mode, a Render Pipeline debug windows, with a new way of authoring scene settings via volume, drop the old sky settings etc...
    So we assume that we don't rely on previous Untiy experience, it is require to learn a new way of authoring content, lighting etc...

    >The upgrade process
    https://github.com/Unity-Technologies/ScriptableRenderPipeline/wiki/Upgrading-to-HDRP

    >Lighting and shaders:
    As explain above, we were not aiming at giving you the same result than in Builtin, so if you get the same result it mean that we have fail our job :), and that you don't need HDRP. The main issue with lighting upgrade is that you need to convert everything to physical light unit, as unit in HDRP are totally different.

    >Choosing the right version:
    Yes, we understand it can be confusing, sadly it is the curse of all Unity package...
    So simplify sum up (current state):
    - 3.X.X family is for 2018.2
    - 4.X.X family is for 2018.3
    - 5.X.X family is for 2019.1

    Always use the latest version available for your release. But higher major number version doesn't mean it is more recent. For example 5.2.3 is older and contain less features than 4.8.0.
    The important file here is CHANGELOG.md, it is the only files that really allow you to know what is inside the version you have.

    So the guidelines is to always used the latest version available for your binaries (which package manager is suppose to list).

    >Frame rate:
    Hard to give more information without a full description of your scene and what you aim for. HDRP have a way bigger entry cost than Builtin (or LW). But it scale very well. Try to put 2 lights, it may be way more costly than Buitlin. Try to add 200 lights and you will see where is the improvement :).
    Also you are free to disable all undesired features on the hdrp asset and frame settings:
    https://github.com/Unity-Technologies/ScriptableRenderPipeline/wiki/HDRP-Asset
    https://github.com/Unity-Technologies/ScriptableRenderPipeline/wiki/Frame-Settings
    (particularly refraction and distortion)

    >Render Layers:
    We don't use render layers for light linking, we have switch to Light Layers.
    (doc isn't written yet: https://github.com/Unity-Technologies/ScriptableRenderPipeline/wiki/Light-layers)
    Is it what you are looking for ? Light linking? Light layers are more simple to used and you can have more lights layers than in Legacy. On the renderer you need to match it with Render Layers.
    But maybe we talk about something else ?

    >Shadows: I've been unable to find the way to enable shadows to more than one light.
    Which version? On 4.8.0 all is fine. The exception is that you can only have one directional light with shadow. So I suppose this is what you have try ?

    >Startup time:
    Every slowdown at startup or when building player are cause by shader compilation.

    >Build time:
    It is awful and we are all agree and it is due to shader compilation. To reduce build time you need to remove every features that you don't use in HDRP asset. And in particular you should disable "debug display" and "LOD dithering" if you don't support them + if you use deferred rendering change litShaderMode to deferred, it will save you a LOT of time. Our main problem is that we can't decide what is enable by default in users projects, so we are conservative. Otherwise users will not understand why a feature isn't working. For example SSR is disabled by default, and we get users not understanding why SSR doesn't work when they add settings for it...

    >Graphics broken: I've had to re-import my project into a new, clean one to restore the graphics
    Hard to say. Can't comment on this as we don't convert project for our demo, we start from HDRP directly.
    However we may experience some problem when going from one version to another one and usually we recommend to erase Library folder. (But for out of preview it should work).

    hope this few information help.
     
    Last edited: Jan 23, 2019
  13. EnriqueGato

    EnriqueGato

    Joined:
    Sep 3, 2016
    Posts:
    81
    Thanks a lot for the answer. A lot of useful information there. Very interesting to have a wide look of the development phases and planning. I'll have a deep look to all of those documents.


    >Lighting and shaders:
    As explain above, we were not aiming at giving you the same result than in Builtin, so if you get the same result it mean that we have fail our job :)
    You can be absolutely relaxed about this. Despite all the problems the graphics quality is something you immediately feel as an important step forward :)

    >Frame rate:
    Hard to give more information without a full description of your scene and what you aim for. HDRP have a way bigger entry cost than Builtin (or LW). But it scale very well. Try to put 2 lights, it may be way more costly than Buitlin. Try to add 200 lights and you will see where is the improvement :).
    I guess this is my problem. It's a project with exterior lighting (only 5 lights to cover everything). I'm probably in the "extra cost" area.

    >Render Layers:
    We don't use render layers for light linking, we have switch to Light Layers.
    (doc isn't written yet: https://github.com/Unity-Technologies/ScriptableRenderPipeline/wiki/Light-layers)
    Is it what you are looking for ? Light linking?
    Sorry, I used the wrong word, I meant Light Layers.The thing is, I coundn't find any UI to setup them or do simple operations like selecting the objects pointing to a specific Light Layer, include/exclude operation, etc. So I had to write my own editor script for these basic operations.

    >Shadows: I've been unable to find the way to enable shadows to more than one light.
    Which version? On 4.8.0 all is fine. The exception is that you can only have one directional light with shadow. So I suppose this is what you have try ?​

    I'm on 4.8.0, but all my lights are direct (exterior scene). The restriction of only one direct light with shadows, is it temporary or permanent?
     
    Last edited: Jan 23, 2019
  14. laurent-h

    laurent-h

    Joined:
    Sep 29, 2016
    Posts:
    78
    Only one directional light with shadows is a permanent design decision. Having more would be too costly so we don't support it.
     
    EnriqueGato likes this.
  15. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Note that in HDRP you have box light (i.e Local directional light) that is maybe better fitting your need.

    > I'm probably in the "extra cost" area.
    HDRP is not an order of mangitude more expensive than builtin, for basic material with 5 lights it should be ruoghly comparable, but you need to disable all the other extra features that HDRP provides. And that's the point of HDRP. If you don't use the extra features, then builtin could be a better fit.

    >I coundn't find any UI to setup them
    You are right, there is no helper to setup it, and this is a good point. We will add that on our plan. Builtin was not having any tools either (provide by unity).
     
    EnriqueGato likes this.
  16. EnriqueGato

    EnriqueGato

    Joined:
    Sep 3, 2016
    Posts:
    81
    Great to hear that. The Builtin version had at least the basic layer tools where you could quickly select a group of objects and assign them to a layer. You could also of course rename, add, remove layers... That's basically what I'm missing the most, but I think it could be easy to add some more useful functions similar to 3D packages like Max or Maya. I throw some quick ideas for that UI:
    • List all the Light Layers
    • Basic Light Layer functions (rename, add, remove). I'm not sure if adding/removing Light Layers is possible
    • Add/remove selected objects to the light layer.
    • List/select all the lights affecting the light layer
    • Select all the objects included in a Light Layer. This is extremely useful to know if an object is affected by a wrong Light or if any object is missing
    • In the Light Explorer, it would be great to have a Light Layer column to quickly check what lights affect what Light Layers. By the way, the Light Explorer throws constant errors in unity 2018.3.2f1, HDRP 4.8.0. "EndLayoutGroup: BeginLayoutGroup must be called first."
    [EDIT]
    • I forgot a very important one. Since the introduction of Prefab Mode in this last version of Unity, you can't access the components of the prefabs unless you enter that Prefab Mode. So if I want to change the Light Layer of 100 art prefabs I have to go one by one entering Prefab Mode to access the Mesh Renderer. This took me all the evening yesterday. This is not only an issue for Light Layers, but for any global change you want to make to make to a group of objects sharing the same components.
     
    Last edited: Jan 23, 2019
    Shorely likes this.
  17. EnriqueGato

    EnriqueGato

    Joined:
    Sep 3, 2016
    Posts:
    81
    Well, that sounds like a tough decision. If that's the way it's meant to be, then I have a doubt I'm unable to solve. The reason why I have multiple direct lights is because I'm unable to make my gradient sky to light my scene objects, and I'm trying to emulate that with direct lights pointing everywhere with soft shadows enabled. If that's not possible anymore, how do I get my sky to light the scene objects?
     
  18. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Box Light can do the directional lighting, don't forget and you can have a lot of those. Sky should light (but not shadow)
     
  19. EnriqueGato

    EnriqueGato

    Joined:
    Sep 3, 2016
    Posts:
    81
    I can see a tiny minimal reaction of the objects to the sky color, but I can't find any kind of multiplier to control the intensity of the direct lighting.

    "Box Light"? I'm afraid I have no idea what is that, and I can't find it.
     
  20. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    I think it's the Spotlight but changing its shape to Box. If not then it's the Area Light but this requires baking to have shadows.
     
  21. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    There is HDRI support you just have to set it up. On the Scene Volume Setting, add the HDRI component and change the Visible sky to HDRI as well as the Baking Sky.

    I would advise taking some time to just go through the different things in HDRP, that's how I and most people here learned most of what we know. Earlier on there wasn't any documentation, now there is on some of the main things you'll come across. https://github.com/Unity-Technologi...nder-pipelines.high-definition/Documentation~
     
    laurent-h and teutonicus like this.
Thread Status:
Not open for further replies.