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 Lightmap artefacts on small gaps

Discussion in 'Global Illumination' started by RafaelGomes00, Dec 12, 2022.

  1. RafaelGomes00

    RafaelGomes00

    Joined:
    Aug 13, 2020
    Posts:
    73
    Some time ago, i had to bake a lightmap for a scene in my project, it went pretty smoothly and all, but now I had to add more assets to the scene, consequently, having to bake another LightMap, but as soon as I baked the new lightmap, I started to notice some "Extreme light dense" on the gaps of the floor.

    This is the previous lightmap, no errors at all.

    previous.png

    And this is the new light map generated.
    Here we can view some lighter spots that are inside the gaps of the floor. (those gaps are 3D modelled with the floor itself).

    New.png

    upload_2022-12-12_14-24-50.png
     
  2. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    248
    How does each lightmap look? In particular, is the atlassing noticeable different? You can check using this button upload_2022-12-13_11-43-50.png
     
  3. RafaelGomes00

    RafaelGomes00

    Joined:
    Aug 13, 2020
    Posts:
    73
    This is the previous lightmap (the one that works)

    upload_2022-12-13_10-51-12.png


    This is the new lightmap (the one that doesn't)
    upload_2022-12-13_10-51-52.png
     
  4. RafaelGomes00

    RafaelGomes00

    Joined:
    Aug 13, 2020
    Posts:
    73
    I noticed that when i place the new lightmap to a edition tool, such as gimp, the parts that have the artefacts was transparent.

    upload_2022-12-13_10-54-57.png
     
  5. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    248
    Looks like the texel density is much lower for the problematic object after your changes. You might be able to work around it by upping the Scale In Lightmap of the object (Screenshot 1). Also, could you take a screenshot of the scene before and after the issue using the Texel Validity and UV Overlap scene view modes (Screenshot 2)?

    upload_2022-12-13_17-30-24.png upload_2022-12-13_17-31-24.png
     
  6. RafaelGomes00

    RafaelGomes00

    Joined:
    Aug 13, 2020
    Posts:
    73
    Both Texel Validity and UV Overlap in either, before and after the issue are getting me the same results.

    upload_2022-12-13_14-35-19.png
     
  7. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,120
    Try disabling stich seams, this might bring other issues, but you can check to see if it's the cause of your current issue.
    For me unity's stich seams caused light leaking for some meshes, but disabling it creates other issues.
     
    Pema-Malling and RafaelGomes00 like this.
  8. RafaelGomes00

    RafaelGomes00

    Joined:
    Aug 13, 2020
    Posts:
    73
    Unfortunately changing the scale on lightmap didn't had any changes.
     
  9. RafaelGomes00

    RafaelGomes00

    Joined:
    Aug 13, 2020
    Posts:
    73
    Thanks for this, it wasn't perfect as you said, but removed the big light focus, I will use this as an alternative solution for now, and try to study more to improve the scene.
     
    Pema-Malling likes this.