Hi! I am struggling with lighting in Unity 2020.3.19 using HDRP 10.6.0
To simplify matters I’ve moved the static scene model into a brand new scene. So now there’s just a Main Camera, the model, and six baked lights – a mix of point and area lights. Nothing else.
The model references six materials, all using the HDRP/Lit shader. The scene lighting mode is set to Baked Indirect.
I’ve cleared the GI Cache and Baked Lightmaps. So I should be seeing the lights rendered dynamically, but everything is solid black. Using Bakery RT Preview I can see the lights themselves are not the problem, since the room shows up properly lit. Unity’s scene view and game view both show the room as solid black.
When I render the baked lighting, valid lightmaps are created with proper lighting, yet the scene still appears solid black.
Clearing the GI cache and baked data has no effect – everything is still black.
Try adding a global volume with an Exposure override (maybe also Visual Environment). If you set Exposure to fixed you can find some suitable default value and later refactor into some kind of automatic exposure, if needed. At least that’s how I do it…
Thanks for your reply! Adding a Global Volume with Exposure override has made everything visible in the Game view. I kind of feel like adjusting the Exposure is a band-aid rather than a cure – is it normally expected in HDRP that an Exposure override is essential? Maybe that’s just the nature of high dynamic range lighting. The lighting has ended up more colored and contrasty than it was in preview, but I can work that out.
In the Scene View, however, everything is still pitch black, which is definitely going to be a problem.
I do not have the Post Processing package installed, but really good to know that it’s incompatible with HDRP! That’s yet another pitfall I probably would have fallen into, so thanks for that!
You should have a look at Project Settings → Graphics → HDRP Global Settings. There you can assign the Default Volume Profile, which is the default for all scenes (so no, you dont need an override in the scene, if you set something that works there). Also there’s a Look Dev Volume Profile, which is for Editor scene view and might fix your issue.
That property doesn’t exist and as far as I can tell, HDRP Global Settings hadn’t been invented yet – I’m on Unity 2020.3.19 with HDRP 10.6.0. Please tell me I don’t have to upgrade the project.
Yeah, Default Volume is for game view scenes, the other one should be for in Editor. It is called Look Dev Volume these days, don’t remember if it was called the same in that Version you are using…
I tried making a Scene-View-Only profile to put into Look Dev, so I could set wildly different values for the scene view if that’s what it takes. But it really is having no effect whatsoever on the scene view regardless of exposure settings.
I’ve been trying to light a very small room with a grand total of seven lights, and it’s proving impossible. Bizarre rendering errors pop up regularly – e.g., the ceiling gets blown out while the walls are pitch black. I’m running into bizarre inexplicable issues with Progressive (CPU) as well as Bakery. Progressive (GPU) just freezes up Unity. Any form of lighting preview fails to get anywhere near matching the end results.
I have lost so much time farting around with attempting to get baked lighting to function properly with HDRP I’m now thinking of abandoning baked lighting altogether so I can at least move forward with the project. So, I switched all my lights over to real-time. Now some of them don’t appear to function at all. The Scene view is totally unusable, at least as far as lighting is concerned.
My considered opinion is that HDRP is a complete fucking nightmare to work with. There’s a myriad of settings scattered everywhere, shuffled into different places for each different version of HDRP adding to the challenge of using tutorials or getting help from others. In all my years of working in Unity, this has been the worst user experience yet. I will sooner start over from scratch with Unreal than go through this nonsense again.
I get your frustrations, but I don’t share them… For me HDRP has been working fine throughout many versions, no strange behaviours, no bugs, performance was always decent too. What I would do in your case is delete your projects library folder, install a newer Unity Version, reimport with a newer HDRP. Then maybe rebake your lighting, just like it was setup, but that might not even be necessary…
That’s good to hear. I will consider moving to a newer version, though not sure about venturing beyond LTS. Can you recommend any particular version to use?
I personally use 2022.1 beta versions right now, wich has HDRP 13.1.7.currently, but to be safer you could also go for the 2021.2… And by the way, what I’d actually prefer to do, if I were you, instead of what I said before: Make a new Project, maybe starting with the HDRP template, copy in the scripts first from the old project, then data, then the scenes. If you also copy the meta files, usually object references are kept.
There’s no such thing as a “scene view only” profile (at least not out of the box, when not playing with custom Volume Layer Masks on the camera, or fudging with the debug settings in the Rendering Debugger). And the Lookdev profile is not for the scene view, it’s for the Lookdev tool itself.
If there is a total mismatch between both scene and game cameras, it could be because you have set an exposure override inside the scene view’s menu (drop down next to the Camera button in the Scene view toolbar). This can happen if you set it once to a certain value and forgot about it. Happens to me from time to time as well.
(though I’m not entirely sure this was already available in your HDRP/Unity version)
Of course, you could also be the victim of a bug, but without any project, hardware configuration and software/driver versions, it is going to be very difficult to help you.
Depending on your sky settings, the baked light intensity and other factors (like visual environment), your lighting might be extremely dim (you only capture indirect) and it may totally confuse the auto exposure, if you don’t set it properly. Also, without any screenshot of your scene nor project files, it’s going to be very tricky to understand your setup. Copying just a few assets from one project to another might not really be a good starting point if you’re not familiar with the workflows in HDRP.
My advice is that you should learn from the HDRP Template Scene (create it via the Hub). Recent Unity versions {21.2) even have an in-editor tutorial explaining all the main concepts in HDRP (sky, reflections, exposure, volume system, etc.), in about 20-30 minutes, depending on your pace and familiarity with real-time rendering. If you’re still confused afterwards, ping us here.