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

Bug URP - Lightmap disappearing

Discussion in '2021.2 Beta' started by RenOli, Jun 23, 2021.

  1. RenOli

    RenOli

    Joined:
    Jan 23, 2013
    Posts:
    102
    Hi all, not sure if it is a Unity bug that I am having or if it is exclusively to URP.

    I keep baking lightmap, using the Progressive CPU, Mixed Lightings with Shadowmask.

    The reflection probe keep losing the reference to the cubemapped texture (it gets gray), plus the baked lightmap is missing, even though it is set correctly to the scene in the Light Settings. It just ignores it.

    I realized that when I load the scene during playmode, the scene loses it forever. Even when I get back to that scene in Editor.

    I've used Progressive CPU lightbake since the first preview, never seen anything like this before, so I am assuming it is something with the new Unity version or URP.

    I am using 2021.2.0a20 with URP 12.0.0

    Thank you.
     
  2. AdamLacko

    AdamLacko

    Joined:
    Oct 10, 2017
    Posts:
    41
    Having the exact same problem ever since around 0a12.
     
  3. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    If anyone can get a reproducible project with the problem then send it as a bug, would be nice, hopefully get it looked at. Ideally using latest beta version for a better chance at getting it fixed.
     
  4. AdamLacko

    AdamLacko

    Joined:
    Oct 10, 2017
    Posts:
    41
    Actually, that's the problem - ever since 0a12, I can't find a way to reproduce it. I'm already using beta release, and yet it is still happening. Not consistently though.

    I wrote about it two months ago on Discord, just to see if there's anyone experiencing this as well.

     
  5. RenOli

    RenOli

    Joined:
    Jan 23, 2013
    Posts:
    102
    I was able to make the bug in a default assets project, with the new Beta.

    Still didn't get a pattern on how to cause the bug. But the exactly same thing happened. It had all the lightmaps set up, but cubemaps were gray and no lightmaps were seen in the scene.

    Do you have multiple scenes being loaded?
     
  6. gasppol

    gasppol

    Joined:
    Feb 16, 2020
    Posts:
    33
    I can confirm the same bug. All lightmaps baked (with the current version) are shown, but after several re-compile or re-start of the Editor, they aren't loaded neither in the Scene view, nor the Game view. My project didn't include any light probes. The Baker is GPU Progressive (which BTW it's now a lot faster than before).
    Also, I can confirm that the player build include the lightmap textures (they are present on the buidl), but they aren't shown in-game.

    EDIT: Also worth mentioning I'm using Shadowmask as Mixed Lighting
     
  7. VRCoaster

    VRCoaster

    Joined:
    Oct 9, 2017
    Posts:
    3
    Get the same bug with 2021.2.0b3.3078.7
    No render pipeline. Build target is Android.
    Im constantly switching between scenes and sometimes after loading the lightmap is gone.

    Edit:
    maybe a hint: Git is telling me the LightingData.asset file of the scene was changed. Can't tell exactly what changed since the file is binary. Whats also strange is, that I can't discard the changes...
     
    Last edited: Jul 10, 2021
  8. RenOli

    RenOli

    Joined:
    Jan 23, 2013
    Posts:
    102
    Mine seems to have been partially fixed. Might be a conflict with previous version. Did you guys update the engine in the middle of the project?

    I went to every single scene, Deleted all lightmaps. Also the folders. Rebaked everything.

    Lightmaps seems to be working, BUT, reflection probes still missing every other scene loading.

    Solution was to set it as custom reflection and plug in the reflection that goes away manually. :/
     
  9. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Hi everybody,

    The issues described in this thread sound like instances of this known bug: [GI] LIGHTMAP REFERENCE IS LOST WHEN STATIC OBJECT IS MOVED

    This will be fixed in b4.

    If you're still affected by similar behaviours in b4 or the reproduction condition described in the case doesn't apply to you, we'd appreciate bug reports for your individual cases.
     
  10. VRCoaster

    VRCoaster

    Joined:
    Oct 9, 2017
    Posts:
    3
    I'm quite new to this open beta game. Is there a roadmap showing when b4 is going to be released?
     
  11. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    448
    Generally, they do weekly releases but sometimes they skip a release or two when it's too unstable. Otherwise there's no fix dates.
     
    VRCoaster and LeonhardP like this.
  12. gasppol

    gasppol

    Joined:
    Feb 16, 2020
    Posts:
    33
    I can confirm that in b5, b6 and b7 the bug is solved.
     
    LeonhardP likes this.
  13. sandstedt

    sandstedt

    Joined:
    May 24, 2015
    Posts:
    67
    I'm using 2021.2.0b6, and I'm still having this problem. Only seen it when sharing Lightning Settings file between two scenes.
     
  14. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Hi @sandstedt,

    Could you please submit a bug report for this issue with a reproduction project?
     
    sandstedt likes this.
  15. sandstedt

    sandstedt

    Joined:
    May 24, 2015
    Posts:
    67
    @LeonhardP tried replicate this bug in a new project for 1h now. Sort of succeeded. But not sure if it's anything related. Have sent a bugreport with the same name as this thread.
     
    LeonhardP likes this.
  16. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    606
    Hi @LeonhardP

    I'm having the same issues with Unity 2021.1.28f1 and 2021.3.15f1

    In my instance, this happens with both Unity's progressive CPU light mapper and an asset store tool called Bakery.

    I submitted the project here: CASE IN-29136

    ezgif-5-1aef5dada3.gif