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

Question Adding lights to scene causes game objects to turn black

Discussion in 'Global Illumination' started by davidszy, Apr 5, 2023.

  1. davidszy

    davidszy

    Joined:
    Jan 12, 2023
    Posts:
    3
    Hi all!

    Beginner Unity developer here. I've been experiencing an issue with my scene when adding lights to it and, after of banging my head against the wall trying to find solutions on Google and YouTube, I figured I'd seek advice from the folks here who are probably much more knowledgeable than me. I am using URP and version 2021.3 of Unity.

    In image 1 below you can see that the room is normally lit. In the view of the screenshot are 5 separate wall objects, three separate floor objects, three separate ceiling objects, and an overhead light with two light sources (a spotlight and a point light).

    img9.png
    Image 1

    However, the issue arises when I add more lights to the room--take a look at image 2 below:

    img1.png
    Image 2

    With three lights (6 sources total--a point light and a spot light on each light), the center wall object turns completely black and the floor in front of it seems to be experiencing the same effect to a lesser degree.

    What may be the cause of this issue? I've attempted many solutions but none have worked for me.

    Here is some more info that may be useful:

    img2.png
    Image 3: Spotlight info

    img3.png
    Image 4: Point light info

    img4.png
    Image 5: Lighting tab info - scene

    Will post more screenshots in the comments
     
  2. davidszy

    davidszy

    Joined:
    Jan 12, 2023
    Posts:
    3
    img5.png
    Image 6: Lighting tab info - environment

    img6.png
    Image 7: inspector window for wall game object

    img7.png
    Image 8: inspector window for floor game object

    img8.png
    Image 9: project quality settings
     
  3. wwWwwwW1

    wwWwwwW1

    Joined:
    Oct 31, 2021
    Posts:
    761
    Hi, have you tried increasing the Additional Light Counts in the project's URP asset?

    This allows you to use at most 8 lights per object (mesh). If you'd like to have more, you can try switching to Deferred rendering path in the URP renderer asset. (or upgrade to 2022.2+ and try Forward+ path)
     
  4. davidszy

    davidszy

    Joined:
    Jan 12, 2023
    Posts:
    3
    Yes, I forgot to include a screenshot of that setting, but it is indeed set to 8.

    I'll try your other suggestions :)
     
    wwWwwwW1 likes this.