- Home /
HDRP Indoor Shadow Problem / Light Goes Through Geometry
Greetings, dear hive-mind brothers and sisters...! Wait, wrong Unity.
I'll try to be brief and to the point. I've started using HDRP on an arch-like project yesterday. It's my first HDRP project, but I've followed official Unity "upgrading to HDRP" project guideline. This was not a HDRP template project from the start, only a blank one.
Added my geometry, made in 3DS Max, representing a flat (some walls, floors, ceilings, all unwrapped). Next, I've added a Directional Light for my sun. No light leaks there, everything seems to be fine, but the scene was super dark (no GI for real-time lights in HDRP from what I understand). So I've decided to fake the GI, by adding some extra lights indoors, illuminating each room. Well, that didn't work so well, I've got weird light leaks (not even leaks, it goes straight through wall geometry in weird ways) and crazy shadow issues. Can't really understand it, but it seems the "light" that goes through geometry becomes a weird shadow, and the part where there shouldn't be any (top / outside of the light cone) becomes light...? Crazy, I don't know how to explain it well, there's some pics at the end of this post.
Tried rectangular point lights, tried area lights, tried turning random shadow / light options on and off, googling like crazy for a whole day, but couldn't find a solution. Any help or a nudge in the right direction would be hugely appreciated! Thank you for your time!
Using Unity 2020.1.0a3 on Windows 7 x64, running on a GTX 1070.
alt text
Answer by Namey5 · Apr 01, 2020 at 11:00 AM
Area light shadows are essentially an approximation of an approximation - they use the same shadow matrix as a regular spotlight, but moved back and clipped by the plane. In this case, what you're seeing is light leaking outside of the range of the area light's shadow matrix. You can use a custom spot-shadow angle in the light settings to increase the FOV of shadows, but this will fairly dramatically lower the resolution of the shadows and increase leaking. On top of that, area light shadows use a different type of shadowmap technique called ESVM, which gives a much softer filter and can have worse light leaking. You can adjust the EVSM exponent to reduce this, but it can have other side effects too. Do you really need realtime GI for the building itself? You could simply bake the area lights/ambient lighting for the environment and use light probes for dynamic objects.
Your answer
Follow this Question
Related Questions
My lightning got broken after I changes the shadow strength. 0 Answers
Shadows problem with big and small objects 0 Answers
HDRP Turns Materials White 2 Answers
URP shadow problem 0 Answers