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.