Upgraded to Unity 6, no other changes, rebaking lights made everything super bright

Nothing changed except merely upgrading the project from Unity 2023 to Unity 6. I saw a lot of debug text appear when I entered this room that wasn’t there before. This came up every frame:
“Reduced additional punctual light shadows resolution by 4 to make 7 shadow maps fit in the 512x512 shadow atlas. To avoid this, increase shadow atlas size, decrease big shadow resolutions, or reduce the number of shadow maps active in the same frame”

For a first step I just tried rebaking the lighting in this scene. No other changes. It went from this in 2023:

…to this in Unity 6:

What fundamental lighting changes occurred that I need to go account for? Am I overlooking something simple?

Thanks!

Are you using purely baked lighting, or are some of these realtime lights?

There’s one directional light that’s set to mixed, three area lights that are baked-only, two spotlights at the top that are realtime, and then two realtime lights on the orb on the left (it moves, teleports in/out, etc.).

Also the square tiles are static emissives set to bake
image

Hmm. I don’t see anything suspicious. Are you using URP?

Yeah, using URP. Here’s the relevant lighting section of the URP asset:

Just loading the scene in editor I get this in the console:
Reduced additional punctual light shadows resolution by 4 to make 14 shadow maps fit in the 512x512 shadow atlas. To avoid this, increase shadow atlas size, decrease big shadow resolutions, or reduce the number of shadow maps active in the same frame
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Doesn’t occur when I load my branch–same data–that’s still on 2023. Don’t know if that’s a useful hint or not.

Thanks!

There was a bug I reported where lights weren’t marked as baked and instead remained realtime. But that occurred when using the dropdown menu to bake APV. But it caused the same issue.

How are you baking the scene? Clicking the bake button or something else?

I’m clicking the generate lighting button as usual in the lighting tab.

I remember the core of the issue is the lighting data not being created, not exactly the flags. Maybe try remaking the lighting data file, and clearing baked data?

Unfortunately I still get the same result.

I’ve deprioritized this for now, but plan to pick up upgrading to Unity 6 again in October.

I’m having the same problem. The interesting part is that it happened only in the project that I ported from 2019 (URP), making it hard to reproduce by creating an empty project. But the same thing happened to me: my scene looked overexposed after baking. And the lightmaps look correct, and baking executed without any problem.

I export my scene to a new empty project in Unity 6, and everything was looking correct, the baking works without any problem. The issue happens specific in the main project ported from 2022.

I did a Frame Debug, and I checked that the objects were rendering using e black lightmap (unity_Lightmap of 4x4 UnityBlack)

I can’t share an image, due to is a production project.

PD: Still happen with Unity 6 LTS.

Consider making a new project file, and then transferring the assets to that.

Thats what I did and what I recommend people do, since the configuration settings in unity 6 are so different.

Tried all of this above, nothing really helped, scene is still mega bright.
Upgraded from 2022.3.42f1 to 6000.0.27f1.
Any further ideas?

I’m not sure what could be causing this. It would be very helpful if somebody could post a bug report about this issue containing a (ideally simplified stripped-down) project which shows this behaviour. This would allow to take a closer look.

@dariakus I don’t think the warning about shadow maps is the issue here but I cannot rule it out completely. Have you tried doing what the warning recommends, e.g. increasing the shadow atlas size?

I can do it. What is needed exactly - one “before” project on 2022.x with one asset imported, the scene there is dark. Then new project on 6000.x with same asset freshly imported, the scene there is bright. Would this help? Or both the 2022 and the 6000 projects?
Or scene export from 2022, imported in 6000 - again mega bright.

We need only a 2022.x project (the simpler/smaller the better) which when opened in Unity 6 shows that lighting has changed (compared to when opening it in 2022). Hope that makes it clear. Thank you so much for this, it will speed up the bugfix process for sure. Please post here when you have submitted a bug.

Possibly before investing time, let me clarify what was done and with what outcome, then we can see if it would be of help to send a project.

There is a 2022 project, I needed to consume some Unity 6 capabilities (Multiplayer Play Mode), but also wanted to “start clean” in Unity 6, so I tried this:

  1. Created new Unity 6 project from template (VR+Multiplayer) and copied over my assets + scripts + scenes from the 2022 project. Result: all scenes were extremely bright. No means found in inet helped to reduce the brightness (will post what I tried at the bottom of the post). Fail, deleted the project.

  2. Created new Unity 6 project from template (VR+Multiplayer), exported one of the scenes from 2022 and imported in the new project. Result: the scene was extremely bright. Fail, deleted the project.

  3. Given up on a fresh new project and just opened the 2022 project with Unity 6. Result: the scenes are ok, so this is how I continue for now.

What I tried to reduce the scene brightness - found in multiple forums posts (none of this helped):

  • Go to the Lighting menu at Window > Lighting and configure the Lightmaps to Auto
  • Direct3D11 has this type of bug on some machines (Edit > Project Settings > Player > Player Settings > Other Settings > Rendering)
  • Remove the skybox on both the camera and the environment lighting data
  • Edit > Project Settings > Player and open Player Settings. Go to Other Settings > Rendering and change the Color Space to Linear or Gamma
  • Window > Rendering > Lightning > Environment > Environment Lightning > Intensity Multiplier > Set to 0
    1. Delete the lights in the current scene then create new lights. For some reason, there seems to be light issues carrying it’s settings to the new Unity version and creating new lights usually fixes it.
    2. Go to Windows → Lighting → Settings then go to the Scene tab. Scroll down and disable Auto Generate checkbox then click the Generate Lightning button.
    3. Go to Assets → Reimport All.
    4. If everything above did not work, go your Project’s Library folder then delete it. Restart Unity.

Thank you for all the extra information. I’m sorry you have to go all this annoying stuff.

Opening a 2022 project in Unity 6 is expected to not change light brightness and it sounds like that is what you are observing. But by copying over scenes files from a 2022 project to a Unity 6 project manually, you do not let Unity do its usual “version upgrade” because in this context, it doesn’t know that the copied over files are from another specific version of Unity. So at this point I am not able to tell whether this is expected or unexpected behavior (and by extension whether this is something we want to necessarily change/fix). To answer that we have to dig deeper and for that we need some kind of a repro, i.e. a way to reproduce the issue on our side.

If you want us to take a deeper look we’d be happy to, but for that we need a bug report that tells us how to reproduce this issue on our side. Such a bug report can either contain a test project or simply just a list of steps describing what to do to reproduce the issue.

What’s interesting is if I create a brand new project from scratch in 2023 (the editor version I was originally working in), then upgrade that to the latest Unity 6, everything is fine.

It’s my existing much larger project where the issue shows up.

I’m not sure I can reasonably pare that down to a basic sample but I will try my best.

I’ve created a bug with a stripped down version of my project attached ( IN-90282)

Please let me know if there’s any more info you need.

Thanks!

@dariakus Thank you for the bug report + project. I took a look and it turns out that this brightness change is happening because of another bugfix which landed in Unity 6 but not in earlier versions. Prior to Unity 6, lightmap textures generated via Unity’s baking system would not take the Preset Manager into account. In Unity 6, it does.

(Whether or not this change is actually a bugfix or a behavioral change is debatable. You can find more details here).

Let me explain what causes this. Your project has a preset which is configured to apply to all textures (see Project Settings → Preset Manager). This preset says that newly added textures must have its type set to "Default ". There is no filter specified for that preset so that means that Unity will apply this to all textures and starting from Unity 6, this includes rebaked lightmap textures. Therefore, newly generated lightmap textures will have their Type set to “Default” in their Texture Importer and this causes problems because this is different from what the renderer expects (it expects lightmaps to have type Lightmap).

So with this information at hand, there are various ways you can easily fix this problem:

  1. Modify your texture importer preset so that it does not include lightmaps. For example you can do this by using the filter glob:"Textures/*" in Project Settings → Preset Manager → TextureImporter. I tried this real quick in your project and it worked as expected.
  2. Remove the texture importer preset. If you do this, the preset will of course not be applied to any new texture you add to your project so perhaps this is not what you want.

You can find more information about presets here: Unity - Manual: Preset Manager.

I hope that makes sense. Let me know if you have questions and/or disagree with what I said.

Ultimately, this is expected behaviour in Unity 6 and therefore I will close the bug accordingly.