Search Unity

Bug HDRP Lightmaps bake and then turn dark when they finish generating

Discussion in 'Global Illumination' started by dexstars, Aug 25, 2022.

  1. dexstars

    dexstars

    Joined:
    Jan 20, 2019
    Posts:
    7
    So I've been trying to bake a point light into a dark room with no other lights or environmental sources of light (except material emission on the tops of these mushrooms, which are also set to baked GI).Whenever I bake it, it shows a normal baked lightmap on it for a split second, then goes completely dark.

    Here's before baking: (What it should look like, relatively speaking) View attachment 1106880

    And here's after:
    View attachment 1106883

    Here's where my confusion kicks in. This is what that screenshot above looks like with the lightmap looks like with the baked lightmap viewer on:
    View attachment 1106892

    So the Lightmapping exists, it's just not showing up...? (or it's just really dim?)

    And here are my Lighting settings: View attachment 1106886

    I also don't have anything for the Environment tab, which I don't think matters but here anyways.

    View attachment 1106889

    Things to note:
    - Yes they are set to static, that includes everything in this scene.
    - The shader used on all of the materials are hdrp/lit (which I assume is just HDRP's standard shader)
    - I did not touch light layers, the objects fall right under the lights rendering layers.
    - As stated above, the mushrooms DO have emission on them, but it is baked, and they have static shadow caster on as well.
    - I have fog volumes and a Post Process volume, (or just "Volume" as it's called in the editor) But it only uses fog, bloom, and exposure.
    - As the lightmaps bakes, the lights can be seen baking onto the objects. But then after its done with said object, it goes right to dark.

    Things I have tried:
    - Upping the lights intensities
    - Messing with smoothness, metallics, or reflection probes to see if they were the culprits.
    - Using Light probes.
    - Using different GI's for the light.

    I appreciate all responses for help, as I can imagine this might sound like a very confusing issue. Thank you in advance. Hopefully there isn't something simple I'm just over looking and am just not seeing it.
     
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Hello! Which platform are you on? I've observed this issue on macOS, but it is tricky to reproduce. Also, upon the bake completion, does clicking on "Generate Lighting" button again solve the issue?
     
  3. dexstars

    dexstars

    Joined:
    Jan 20, 2019
    Posts:
    7
    Thank You for your quick response, I am running this on Windows. :)

    And no it does not. I know clicking it again refreshes the lightmaps after making lighting changes, but that is not the case for my issue unfortunately.
     
  4. dexstars

    dexstars

    Joined:
    Jan 20, 2019
    Posts:
    7
    I have also just tried switching from CPU to GPU lightmapping, and baking with Automatic UV generation both on and off for the models used. Nothing helpful came from it.
     
  5. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Could you please report a bug? We'll take a look as soon as it reaches our team.

    In the meanwhile, try clearing the GI cache in the Preferences > GI Cache window, and see if that helps...
     
  6. dexstars

    dexstars

    Joined:
    Jan 20, 2019
    Posts:
    7
    Okay, and yes I have just tried that and attempted a rebake, but nothing has changed unfortunately.
     
  7. FaberVi

    FaberVi

    Joined:
    Nov 11, 2014
    Posts:
    146
    Same problem, any news?
     
  8. ArchNGame

    ArchNGame

    Joined:
    May 17, 2020
    Posts:
    1
    I have the same issue, Clear GI cache fixed it for me in a first place but as soon as I go in game mode it's all black again :/

    Update : in my case, it was due to Post process : Screen Space Global Illumination. Removing that PP made my Lightmaps render correctly
     
    Last edited: Oct 1, 2023
  9. THINFINGER

    THINFINGER

    Joined:
    May 25, 2015
    Posts:
    1
    Delete your Post Process volume or check your exposure.