Search Unity

Question Lightmapping, Some lights not contributing

Discussion in 'Global Illumination' started by whidzee, Mar 3, 2022.

  1. whidzee

    whidzee

    Joined:
    Nov 20, 2012
    Posts:
    166
    I am working on a level that has a bunch of different lights in different rooms, mostly downfacing spot lights. They are all set to be mixed, so they will cast shadows on my character but be baked for everything else. When I do a bake, some lights do not get baked. This isn't consistent either. sometimes they all seem to bake and other times some are getting skipped, and it's not always the same ones getting skipped either.

    It was working fairly consistently, but now it seems about half my lights are not casting light onto the lightmaps.

    I'm fairly new to lightmapping, Is there anything I am missing? a maximum number of lights perhaps?
    I am using Unity 2018, and default, built in render pipeline
     
  2. whidzee

    whidzee

    Joined:
    Nov 20, 2012
    Posts:
    166
    ok, so it was completely my fault. Unity was working fine. I made my light models static and they stopped the lights that were inside them from casting light. so I moved the spot light sources down about 1cm and now they are on the outside of my downlights and they are casting shadows again. Everything is back to normal. Sorry for wasting you time
     
    KEngelstoft likes this.