Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Weird bright squares after bake

Discussion in 'Global Illumination' started by Spacelag, Aug 8, 2021.

  1. Spacelag

    Spacelag

    Joined:
    Nov 26, 2020
    Posts:
    11
    I've been struggling with a really weird issue that looks like this:


    super random & super bright spots in my lighting. Weirdly enough they are not present in the lightmap:



    I haven't found a way to get rid of them consistently. The Sketchup models I use have nothing anywhere near those squares, but it sometimes helped to remove unnecessary lines and export them again, even if that doesn't change the mesh at all. They are very annoying and haven't changed with different lighting settings.
    These are my settings:



    Seeing as the baked lightmaps themselves look totally fine, I'm hoping to be able to resolve this issue without having to rebake the entire scene, which would take around 5h.

    Thank you very much in advance for any help or insight :)
     
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Those are directionality NaNs. They tend to manifest themselves when using area lights.

    Either switch to Non-Directional mode in the Lighting window, or use CPU lightmapper.
     
  3. Spacelag

    Spacelag

    Joined:
    Nov 26, 2020
    Posts:
    11
    Oh wow! Didn't expect such an easy answer so quick :) Tyvm

    Perhaps you could also tell me what these weird lines are?

     
  4. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    That looks like messed up lightmap UVs to me. Check if these artifacts are present when using Baked Lightmap scene debug view. If they are present, then you will need to create lightmap UVs yourself, or have Unity generate them for you in the mesh import settings.
     
    Spacelag likes this.
  5. Spacelag

    Spacelag

    Joined:
    Nov 26, 2020
    Posts:
    11
    Thank you, I don't know what I did exactly but I added some useless lines in SketchUp to cut faces and at least in a small res bake that seemed to have worked. Let's hope it won't be there again after I bake for 5h
     
  6. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Can you please file a bug report with our project? I would like to investigate those lines and ideally prevent the artifacts instead of you having to add a workaround. Thanks
     
    Spacelag likes this.