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 Strange pink lines glitch after light baking that happens only in the editor

Discussion in 'Editor & General Support' started by GetComponent_Tony, Jun 19, 2023.

  1. GetComponent_Tony

    GetComponent_Tony

    Joined:
    Jul 12, 2022
    Posts:
    5
    This happens after baking the light and does not happen when entering play mode.
    I tried changing the mesh, the bake settings, I searched the forums but no one has seemed to encounter this issue. I updated my graphics driver too and changed to the newest LTS version of Unity.
    img.png
    img2.png img1.png
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    3,899
    Try the CPU Lightmapper to rule out any GPU Lightmapper issues (because it's preview as in "not production ready").

    Do you get any warnings in the console, such as "could not fit into lightmap" or something like that?

    It would help to know what settings you changed. Surely it wasn't all of them? I would start with disabling the three checkboxes and turn off lightmap compression. If that doesn't help, lower the sample counts. Just to see if any of these affect the issue in some way.
     
  3. GetComponent_Tony

    GetComponent_Tony

    Joined:
    Jul 12, 2022
    Posts:
    5
    I don't get any warnings. I only changed the realtime lighting settings. I changed to CPU Lightmapper and disabled the lightmap compression but it seems to still happen right at the start of the baking process
     
  4. GetComponent_Tony

    GetComponent_Tony

    Joined:
    Jul 12, 2022
    Posts:
    5
    So I changed the view mode to UV overlap and I got this Screenshot 2023-06-19 203059.png Screenshot 2023-06-19 203112.png

    Perhaps the UVs are causing this?
     
  5. GetComponent_Tony

    GetComponent_Tony

    Joined:
    Jul 12, 2022
    Posts:
    5
    So I tried some different view modes and I found something while selecting the Albedo one. The baked light is offset? I have no idea what is going on. Screenshot 2023-06-19 204730.png
     
  6. GetComponent_Tony

    GetComponent_Tony

    Joined:
    Jul 12, 2022
    Posts:
    5
    So I finally fixed this issue by moving the entire map by one meter upwards. This avoids the strange Z fighting.