Search Unity

Question A Surprisingly Miniscule Problem

Discussion in 'Global Illumination' started by agudmund, Dec 28, 2022.

  1. agudmund

    agudmund

    Joined:
    May 6, 2013
    Posts:
    13
    Hi
    I have a very peculiar issue in the latest Unity editor, there are various baked light solutions and workarounds of course, but Im scratching my head over the actual logical issue that is happening in my scene. Fully replicable with any type of light and tested across various different scenes with all kinds of different settings.

    The issue is as simple as, on the 5th light I add to a scene the entire scene gets flooded with ambient light. There are screenshots attached that show this in an empty scene with only 1 box and 5 lights being created, the fifth extends way beyond it's defined range.

    What am I doing wrong here?

    1. Create light
    2. Position light
    3. Light behaviour does not follow basic physics....
     

    Attached Files:

    • 1.png
      1.png
      File size:
      99.7 KB
      Views:
      93
    • 2.png
      2.png
      File size:
      106.5 KB
      Views:
      93
    • 3.png
      3.png
      File size:
      124.7 KB
      Views:
      92
    • 4.png
      4.png
      File size:
      134.1 KB
      Views:
      91
    • 5.png
      5.png
      File size:
      162.3 KB
      Views:
      91
  2. joshuacwilde

    joshuacwilde

    Joined:
    Feb 4, 2018
    Posts:
    731
    Per pixel lights are limited to 4 by default in forward lighting. You can change in the settings I think if you are on URP, not sure if you can change it in Built in though.
     
  3. wwWwwwW1

    wwWwwwW1

    Joined:
    Oct 31, 2021
    Posts:
    769
    The fifth light (in the screenshots) is forced to be a vertex light, so the lighting on wall looks to be wrong.

    For URP, you can increase the maximum additional lights allowed to at most 8 in URP assets.

    For Built-in RP, you can increase the maximum additional lights allowed in default (Forward) rendering path, but may lose lots of performance.

    If you need more real-time lights, you can try switching to:
     
    agudmund likes this.
  4. agudmund

    agudmund

    Joined:
    May 6, 2013
    Posts:
    13
    Yeah, that makes perfect sense, thanks. Just didn't realize the limit was set as low as 4. Much Appreciated.
     
    wwWwwwW1 likes this.