Search Unity

Black squares on lightmap

Discussion in 'Global Illumination' started by cado82, Apr 15, 2021.

  1. cado82

    cado82

    Joined:
    Jul 29, 2020
    Posts:
    25
    Here are my lightmap results and settings

    lightmap-problem-1.png

    Texel validity view
    lightmap-problem-2.png

    This section of the map is made up of modular assets from this pack https://fertile-soil-productions.itch.io/modular-racekart-track-hilly-terrain-theme. Can I get some help figuring out what's happening to cause these black squares and darkened trees?

    I have tried:
    • Increasing resolution to 20.
    • Increasing Direct/Indirect/Environment samples to the 30k region
    • Setting Backface Tolerance to 0. This removes the red from the Texel Validity view as expected but does not fix the underlying black problem.
    • Checking that all the assets have UVs automatically generated.
    • Toggling Directional/Non-Directional.
     
  2. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
  3. cado82

    cado82

    Joined:
    Jul 29, 2020
    Posts:
    25
    There a few but not to the extent that would cause such a big problem (I think?)

    lightmap-problem-3.png

    I fired up Unity this morning without making any changes to this scene and ran a bake again and this is what I'm working with now

    lightmap-problem-4.png

    This is what the lightmap looks like

    lightmap-problem-5.png
     
  4. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
  5. cado82

    cado82

    Joined:
    Jul 29, 2020
    Posts:
    25
    I read this one yesterday and this is what prompted me to put the Texel Validity screenshot in my original post and report that I tried the Backface Tolerance set to 0 to no avail. Can I do anything about the mesh normals facing outwards if unity is generating the lightmap uvs? I will try to set the materials on these meshes to render both faces and report back later.
     
  6. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Yes, the issue lies in poorly authored content for lightmapping. Make sure your meshes adhere to rules outlined in the forum post I linked to.