Hello, I have light problems in my Unity 2022.3.21f1f URP project. I have Directional light (sun) in my scene, and few spotlights (realtime). Issues are
- If I bake directional light (not matter how intense I set it) it does not work (scene is completely black, there is some light coming from spotlights only, that realtime). If I set Sun to be realtime, then it’s work, but only after cleaning cache or after baking.
- If I keep Directional light to be realtime, in Playmode I have visual artifacts, some walls blinking from completely black to color (see video).
What I found, and what I tried, I tried
-
Baking with GPU and CPU and with third party plugin Bakery
-
Changing Max. Lightmap resolution from 1K to 4K
-
Changing Lightmap resolution for affected walls, keep it 1 right now.
-
Changing Pack Margin for those walls
-
Changing Intensity of Directional Light
-
Changing Color of Directional Light
-
Changing Environment Lighting from Skybox to Color
-
Changing Intensity Multiplier for Skybox in Environment Lighting, btw it does not do much, but I can see effect if I change intensity of Directional Light directly.
What I found
- If I switch if Directional Light, issue with blinking textures is gone, but then I don’t have a Sun in the scene…
- Rotating Directional Light does not do much, even if wall is well lited, it blink.