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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Black shadow/errors with progressive lightmapper

Discussion in 'Editor & General Support' started by artician, May 13, 2017.

  1. artician

    artician

    Joined:
    Nov 27, 2009
    Posts:
    343
    I'm experiencing some issues with lightmapping in v5.6.0f3. I'm baking a very simple scene with a single light, and a basic lit material. The result is that some objects will have opaque/black shadows in some areas, and not others. (There should be no black/opaque shadows anywhere).

    Attached is a composition of what's occurring, with some notes and explanation of the issue.

    unityBakeError.jpg


    Some additional notes/strangeness:
    - Enlighten takes ~2 hours for baked lighting in a simple scene (it used to take only several minutes with the same settings)
    - Progressive lightmapper bakes the equivalent in ~5 minutes the first time, but future bakes are inconsistent.
    - After the initial Progressive bake of ~1-4 minutes, following bakes for the same, unchanged scene report estimates back and forth between ~3+ hours to 20 minutes. (No changes to scene or lightmap settings).
    - Regardless of time, after several progressive iterations, artifacts begin to appear in the lightmaps (the reason/examples for this post).
    - There seems to be no way to clear lightmap data completely. (If the actual maps are deleted, along with the LightingData and ReflectionProbe data, future bakes are still instantaneous, displaying the same erroneous lightmaps are immediately as though the lightmap data is cached somewhere else).
     
  2. artician

    artician

    Joined:
    Nov 27, 2009
    Posts:
    343
    Tweaking settings to no avail.

    Please help.
     
  3. artician

    artician

    Joined:
    Nov 27, 2009
    Posts:
    343
  4. artician

    artician

    Joined:
    Nov 27, 2009
    Posts:
    343
    Bumpity bump. Interesting repeatable usage here.
    Shaders are custom, SM2.0 Basic Lit materials with added Fresnel.
    All objects are unwrapped correctly.
    I see black splotches more often than not when using the Progressive lightmapper.
    Enlighten process is working correctly, but it can take hours to deliver the same results. Currently using this as a workaround, but would like to solve the original issue.

    Thank you again!
     
  5. mgrugl

    mgrugl

    Joined:
    Mar 1, 2017
    Posts:
    22
    Can only say that I have the same problem. Anyone can help?
     
  6. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    We experienced the same issue in Unity 5.6.3 using the progressive light mapper. It has something to do with open geometry and rays hitting no backface.

    prl_issue.jpg

    Had a small talk to a Unity dev, you can weaken these artefacts by either creating a custom parameter assets with a Backface Tolerance near to zero or by enabling
    Double Sided Global Illumination on the material. Of course, it would be great if Unity could automatically constrain the void bleeding to the object bounding box.
     
    Last edited: Aug 19, 2017
    Danimate likes this.