Search Unity

Question Visible Square artefacts Light Baking

Discussion in 'Global Illumination' started by Sonkiam, May 14, 2022.

  1. Sonkiam

    Sonkiam

    Joined:
    Apr 6, 2022
    Posts:
    3
    Hello :)

    I've recently started to learn how to use unity for a school project and I am encountering issues with lightbaking. When I bake some wanted objects one the scene, certain ones come out perfectly while others appear with visible squares on them. After researching I tried :
    - increasing the size of the objects in lightmap
    - enabling "Generate Lightmap UV"
    - increasing the padding
    - checking if I don't have Overlapping UVs
    - Increasing the number of polys for the problematic objects
    - Disabling the Lightmap compression
    - Switching to non directional mode
    - Putting "Cast Shadows" to "Two Sided"
    Unfortunately nothing has worked so far except increasing the number of polys has made the size of the arefacts a bit smaller.

    Does anybody have a solution for this ?
    Thank you
    Screenshot 2022-05-04 080710.png Screenshot 2022-05-04 080810.png Screenshot 2022-05-14 140303.png
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,754
    You have visible back faces.

    Either hide them with more geometry, or make the materials use double sided GI, or make backface tolerance 0 in light map parameters.
     
  3. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,754
    Unity devs: a documentation page about this where we can direct people to would be useful. Make it about common artifacts the Lightmapper produces and their reasons for happening (and include stuff like the smudges the filtering produces, the noise due to lack of samples, black corners if you have double sided GI, lighting discontinuities between different meshes).

    I feel like these cover like 60% of the questions asked here.
     
  4. Sonkiam

    Sonkiam

    Joined:
    Apr 6, 2022
    Posts:
    3
    Alright ! I'll try this out :)
    Thank you so much for the quick reply !!
     
  5. Sonkiam

    Sonkiam

    Joined:
    Apr 6, 2022
    Posts:
    3
    Making Backface tolerance 0 worked perfectly, thanks again !