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

Large cubic artifacts on light map

Discussion in 'Global Illumination' started by kuehn, Apr 7, 2020.

  1. kuehn

    kuehn

    Joined:
    Mar 24, 2020
    Posts:
    1
    Hello,

    we are currently developing a VR application and have big problems baking the lightmap.
    Here you can see some screenshots of the error. There you can see big dark squared artifacts:

    These errors increase with higher LOD. Never got these before. This happens on the same spot on every instance of the object.
    We allready followed the guidelines for propper lightmaps:
    - fbx Import with generated Lightmap Uvs
    - Increasing Lightmap padding
    - increasing lightmap resolution
    - deactivating lightmap compression...

    We really don't know what could cause these errors, but we suspect that it could be a faulty light calculation. Everything seems correct in the UVs.


    Is this error generally known or can this error be corrected? We use Unity in the version 2019.3.1f1

    We would be very grateful for help if someone had already experienced similiar issues and can help us out here.
     
  2. christopher_baumeister

    christopher_baumeister

    Joined:
    Apr 29, 2018
    Posts:
    12
    Bump!

    Could the scale factor cause these problems?
    In our scene the GameObject has an overall scale factor of 0.01 in its transform. I don't know the math, but are there problems with these small floating values?

    We really need an answer. Thnaks a lot!
     
  3. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,625
    Is that some sort of screen/panel? Is there a transparent polygon in front of the problematic area?

    Try one of these:

    1. Choose the transparent material and tick Double Sided Global illumination.
    2. Make the screen/transparents polygons a different mesh, and don't have that mesh be lightmap static.
    3. Last resort: Create new lightmap parameters in lighting settings and set backface tolerance to 0 (although both of the above are better solutions than this).
     
  4. christopher_baumeister

    christopher_baumeister

    Joined:
    Apr 29, 2018
    Posts:
    12
    Thank you for your reply.
    The object is just a simple surface without any transparent plane blocking it. Today I found out, that with lower samples the result gets better. I can't explain these things.

    Setting the push off value to 0.1 in the lightmap parameters helped as well.



    Does somebody have experience with these artefacts? It's the first time we really have such troubles.
     
  5. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    This looks like a texel validity problem. Please use the validity view mode to confirm https://docs.unity3d.com/Manual/GIVis.html

    The pattern is generated by dilation of valid results into the invalid areas. Texels are marked invalid because they mostly “see” backfaces. During lightmap baking, Unity emits rays from each texel. If a significant portion of a texel’s rays are hitting backface geometry, this texel is marked invalid. This is because the texel should not be able to see the backfaces in the first place. Unity handles this by replacing invalid texels with valid neighbors. You can adjust this behaviour using the Backface Tolerance parameter (LightmapParameters > General GI) or by using double sided GI materials for meshes that are not closed.
     
  6. christopher_baumeister

    christopher_baumeister

    Joined:
    Apr 29, 2018
    Posts:
    12
    Thank you very much,
    regardless of your answer, I have discovered the parameter myself today. That was the solution! Thanks for the support and your explanation!