Search Unity

Lightmappers buggy shadows

Discussion in 'General Graphics' started by kslusarz, Nov 27, 2019.

  1. kslusarz

    kslusarz

    Joined:
    Mar 1, 2018
    Posts:
    7
    Hey guys. Progressive lightmapper seems to have some huge issues with baking shadows on open meshes with no backfaces. (enlighten works slightly better, but also has this issue)

    Here's closed box vs plane with no backfaces (mirroring that plane to make it act like 2-sided face didn't help much)


    Here's in normal game scenario:


    You can see the awful looking squarey thing under the shelf that disappear after closing the mesh
    I did try almost every option in renderer window but none of them had any effect on the way this shadow was baked (except texel res - which just created more small, wierd, boxy shadow bugs :p)
     
  2. Jesper-Mortensen

    Jesper-Mortensen

    Unity Technologies

    Joined:
    Mar 15, 2013
    Posts:
    232
    The areas that see a lot of backfaces will be marked as invalid and get extrapolated from valid areas. If you have open meshes you need to assign a material with Double Sided GI enabled.
     
    dgoodman-icf likes this.
  3. kslusarz

    kslusarz

    Joined:
    Mar 1, 2018
    Posts:
    7
    Ow, that works nicely! Thanks! I was trying all kind of things, like duplicating and mirroring meshes, setting 'cast shadows' to two sided and some othe weird stuff. :p
     
  4. dgoodman-icf

    dgoodman-icf

    Joined:
    Jan 7, 2019
    Posts:
    36
    Thanks for this! I've spend about 20 hours trying to fix shadows inside a room with windows. This room is the only one in the scene that had issues with lightmapping. I thought it was because of the Overlapping UVs warning so all of my troubleshooting was around that - including creating my own custom UVs (which didn't help). checking Doubled Sided GI fixed it beautifully. :)