[HDRP] Lightmaps not showing up and/or "un-hooking" from objects.

I have an issue where lightmaps are not showing up after being baked in the scene. Ported across my scene to test HDRP and got most of it working, except the lightmapping.

Note: Subtle shadowing from ambient occlusion in lightmap on 2018.4 shows between objects.

2018.4.12f1

Lightmap View

Shaded View

2019.3.0b10

Lightmap View

Shaded View

Take note, the lightmap isn’t showing at all, even though the lightmap was just baked and shows up properly in the lightmap tab.

Now what’s weird, is that all objects in the scene have lightmaps assigned to them correctly. The lightmap view shows correctly. The lightmaps in the lighting window show up correctly. None of the lightmaps data change when saving, entering playmode, etc. There are literally no changes aside from the lightmaps not showing.

Now what’s even more weird, is that the lightmaps will completely unassociate themselves from the scene and the baked objects when the scene is reloaded or if Unity is closed and reopened.

Right after baking the scene, all views show the lightmaps fine, except shaded view. For example, the Albedo view and Directional view show data correctly.

2019.30b10 Albedo and Directional view

Albedo View

Directional View

And now this is how the scene looks directly after reloading the scene or closing and opening Unity.

2019.3.0b10 - Lightmap data gone, but still in lighting tab

Albedo View - Data is GONE


Lightmap View - Data still showing in lighting tab, but not in lightmap view, No objects have lightmaps attached to them after reload. LightingDataAsset is pointing to the correct scene.

Some more info. I am not positive if this is a Unity 2019.3 or HDRP exclusive problem, however all other Unity versions I’ve tested work fine, including HDRP builds. And this is the first time this is happening to me. So I decided to create a control project to make sure it wasn’t my scene. Created new project in 2019.3 HDRP, completely stock project. 7.1.1 (Since 7.1.2 doesn’t work) and created a plane with 4 boxes.

The same thing is happening with this test project, which shows me that this is not a problem due to my project, it is a Unity problem.

Has anyone had this problem as well? Create a new HDRP project in 2019.3b10 and bake lightmaps in a simple scene. Then close Unity and re-open Unity and then see if the same thing happens to you.

I just made a new HDRP project in 2019.2 and confirmed that this is indeed 2019.3 dependent.

Any help on what could possible be going on? Or misunderstood?

We don’t have anything logged for an issue like this yet. Could you please submit a bug report? Ideally with a minimal reproduction project.

I will try and submit a project. However seeing as it happens with a default newly created project, I’m not sure what good it would do :slight_smile:

I’ll also give beta 11 a try with the new 7.1.2 pipeline in case something may have fixed it.

If that demonstrates the issue, please submit it :).

It seems the newest HDRP made the lightmaps start working again. Although the lightmap view is still not showing anything. I don’t know how I would report an issue like this. Doesn’t seem to be reliably reproducible to be submitted.

I confirm that for Unity 2019.3, too. When I bake a lightmap, I use the GPU lightmapper, everything seems to be fine.
But if I restart the editor and change the scene view for example to “Baked Lightmap”, it just shows me the scene with a transparent checker board pattern despite the baked lightmap. Basically no lightmap scene view works, like Texel Validity.

How to inspect that if I do not want to rebake everything?

1 Like

Glad to hear that!

The other issue is a known bug: https://issuetracker.unity3d.com/product/unity/issues/guid/1115242/

Known since January and still not fixed?
I don’t get how the code has to look like in order to fail showing the lightmap after restarting the editor. I mean the lightmap is still recognized in Lighting window.

I have a Unity 2019.2.0 project which has this broken lightmap issue. Specifically I have an interior set which includes light fixtures with emissive textures. The results of the baked emissive can clearly be seen in the baked debug scene view. However the objects are black in game and when viewed in shaded mode. I initially thought it was a post processing exposure issue, but have since ruled this out. The best way I can describe it is the lightmaps just aren’t being applied to the scene objects.

I created a small example project. Load the scene titled “brokenEmissive” to see the issue.

Thanks,
Nathaniel

I’m getting this in 2020.2, baked lightmaps are black.

I have the issue Unity 2019.4.15f1 HDRP 7.3.1


The pink usually means there’s an issue with the shader. Unity did look at my issue and their answer was that the objects were metal. if I wanted to see the result of the baked lighting I’d need to dial back the metallic properties. Kinda makes sense, since metal is a specular component and GI is about diffuse lighting. However, I wanted the baked shadows to still impact the metal surfaces, which it wouldn’t do.