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.

Question Point light not casting light

Discussion in 'General Graphics' started by Birdao_Gwra, Aug 23, 2023.

  1. Birdao_Gwra

    Birdao_Gwra

    Joined:
    Oct 23, 2012
    Posts:
    29
    Hi,
    See the attached image. 1 and 2 is point light. After light bake, mixed, point light 1 is casting light and shadow but point light 2 is not casting light and shadow. There are other lights also and some of them are casting light and some of them are not. I could not understand why light is not working.
    https://pasteboard.co/2NpbFxGbMHVr.png
     
  2. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,904
    Have you checked if its set to realtime, mixed or baked?
    Have you checked how many pixel lights you have set as available in your graphic settings? Have you checked what light culling layers are set?
    Have you checked if the target baked objects are set as static?
     
  3. Birdao_Gwra

    Birdao_Gwra

    Joined:
    Oct 23, 2012
    Posts:
    29
    Light is set to mixed.
    Light culling layer is set to everything.
    All objects are set as static.
    Available pixel light is set to default setting.
    Still some of the point light does not cast light on anything.
     
  4. Paul-van-der-Laan

    Paul-van-der-Laan

    Joined:
    Oct 12, 2013
    Posts:
    56
    What is the light render mode? What happens if you set it to important if it isn't already?
     
  5. Birdao_Gwra

    Birdao_Gwra

    Joined:
    Oct 23, 2012
    Posts:
    29
    It was auto. I set it to important, all and baked the scene. Unfortunately nothing changed. No light no shadow. Same result.
     
  6. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,108
    I'm confused, in the image "2" is definitely casting light. What am I missing?

    Also, when you talk about shadows, do you mean realtime ones or baked ones?
     
  7. Birdao_Gwra

    Birdao_Gwra

    Joined:
    Oct 23, 2012
    Posts:
    29
    Last edited: Aug 24, 2023
  8. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,108
    Which render pipeline and Unity version are you using?
     
  9. Birdao_Gwra

    Birdao_Gwra

    Joined:
    Oct 23, 2012
    Posts:
    29
    Version is 2021.3.20f1. Render pipeline is built in.
     
  10. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,108
    Pixel light count in Quality settings?
     
  11. Birdao_Gwra

    Birdao_Gwra

    Joined:
    Oct 23, 2012
    Posts:
    29
    It is unity's default. Ultra - 4, Very High - 3, High - 2.
     
  12. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,108
    What is the active / default one in the editor and do stuff change if you increase the pixel light count for the default one?
     
  13. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,108
    Also what is the Lighting Mode for Mixed Lighting in the Lighting tab?
     
  14. Birdao_Gwra

    Birdao_Gwra

    Joined:
    Oct 23, 2012
    Posts:
    29
    For ultra the default one is 4. I once changed it to 45 and everything become dark.
    Lighting mode is shadowmask.
     
  15. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,108
    Shadowmask has a limitation of only 4 realtime lights overlapping at any time, you probably have more than 4.

    In the scene view change the draw mode to "Light Overlap" to see where the problems are.
     
  16. Birdao_Gwra

    Birdao_Gwra

    Joined:
    Oct 23, 2012
    Posts:
    29
  17. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,108
    Yeah, that won't work with shadowmask, all that red is the problem :)

    You could try changing all the lights to downward facing spotlights, with limited range that will reduce the amount of overlaps. Or don't use shadowmask and just use baked indirect instead?
     
  18. Birdao_Gwra

    Birdao_Gwra

    Joined:
    Oct 23, 2012
    Posts:
    29
    Now all lights are casting lights. Thanks for all your help.
     
    Last edited: Aug 24, 2023
    AcidArrow likes this.