Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Lightmapping not visible issue

Discussion in 'Global Illumination' started by Discmage, Sep 12, 2023.

  1. Discmage

    Discmage

    Joined:
    Aug 11, 2014
    Posts:
    57
    I have created a space as per usual and haven't come across this issue before until 2022.3.6 (which I have to use for reasons).

    I have baked my assets, and the assets have been baked correctly (as you can see in the lightmap) but this is not visible in the scene apart from the kitchen furniture. Thing is all other assets were set up the same. Images linked to post.

    Things I have checked :
    - Assets have static checked
    - Assets have 'Generate Lightmap UVs' checked
    - Scale seems correct (usually apply transforms before export and all scale such as on asset and in lightmap settings are at 1)

    Any help or ideas would be appreciated!
     

    Attached Files:

  2. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    248
    Which shader are you using for the scene geometry? Standard shader?
     
  3. Discmage

    Discmage

    Joined:
    Aug 11, 2014
    Posts:
    57
    Yup, standard shader. Using a Palette texturing technique for all assets. All assets use the same material actually, if that means anything. Have added some more images of the model and the scene if that helps.

    The selected asset in the lightmap is the room, but as you can see it's not visible in the scene for some reason.
     
    Last edited: Sep 12, 2023
  4. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    248
  5. Discmage

    Discmage

    Joined:
    Aug 11, 2014
    Posts:
    57
    Have added two screenshots to the original post. It does seem to look fine in there. What do you mean key word issue? I haven't keyworded anything to my knowledge?
     
  6. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    248
    Keyword as in shader keyword https://docs.unity3d.com/Manual/shader-keywords.html - they affect which shader variant is used for rendering. When using lightmaps, iirc there are some specific keywords that need to be set. The editor should set the automatically.

    Your screenshots of the baked lightmap view look good to me - the lightmaps are actually being applied. So there is probably an issue with the viewport rendering. I'd suggest filing a bug report :)
     
  7. Discmage

    Discmage

    Joined:
    Aug 11, 2014
    Posts:
    57
    So I have gone through the bug report process, and was told they couldn't replicate the issue and I should change the material to the standard diffuse shader...but as it was already on this I'm honestly not sure what I'm expected to do.
    As a test I did change to the Standard (Specular setup) shader and this displays the lightmaps correctly...

    So from what I can tell, something is wrong with the standard shader with lightmapping (in my case), but as my issue has been confirmed I don't know what to do moving forward to resolve this. Unfortunately, as this space is used to onboard new users to our eco system, I would like to use the Standard shader.

    I can't roll back to previous or future versions of Unity as our eco system is using 2022.3.6 as well. So I'm stuck. Any ideas would be appreciated.
     
  8. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    248
    What is the case ID for your bug report?
     
  9. Discmage

    Discmage

    Joined:
    Aug 11, 2014
    Posts:
    57
    I've been told by support that follow up questions in the support thread on this issue is not ideal...so here I am :)

    That said, it does seem that the issue has something to do with the Metallic/smoothness map. If I remove that the lightmap is visible again, but kind of need that. So we have the specific issue now. But not sure why it breaks it. I made the map in Photoshop manually.

    IN-54830: Baked Lights are not shown when using baked Lightmaps is the support?? I think...but it's closed. Is that whats needed?

    Appreciate your time on this one btw :)
     
    Last edited: Sep 22, 2023