Search Unity

Resolved Light Not Rendering on Surface when changing Skybox and DirectionalLight [URP]

Discussion in 'Universal Render Pipeline' started by Samuele_Angeletti, Jan 11, 2023.

  1. Samuele_Angeletti

    Samuele_Angeletti

    Joined:
    Jan 23, 2021
    Posts:
    4
    Hi everyone,
    I have a project where I can change the Day/Night light by a UI Button. To do this I switch between 2 different directional light and 2 different SkyBox materials.
    Said that i don't understand why some light stop working when it becomes "night". I have a car moving on the scene and its lights work perfectly during the "Day" but not in the "Night".

    I Attached some images that show how the asphalt is rendering during the different daytime. In the "night" the light is rendering only on the LineRenderer (the asphalt white segment) but not on the real asphalt.

    Any idea on why this is happening?

    View attachment 1179366 View attachment 1179366 View attachment 1179369 View attachment 1179372 View attachment 1179375 View attachment 1179378
     

    Attached Files:

  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    I suspect you might be running into pixel light limit. I wrote a chapter on this in the Lightmapping Troubleshooting Guide.
     
  3. Samuele_Angeletti

    Samuele_Angeletti

    Joined:
    Jan 23, 2021
    Posts:
    4
    That actually worked, the problem where too many lights and the "Auto" setting.
    I've changed some lights into emissive textures and now everything works properly without even flickering.
    Thank you!