Why am I getting light leaks in Basic Realtime, and how can I avoid them in future?

Hey folks, doing some procedural generation with 3D tiles, so can’t bake lights. Basically left using Basic Realtime Lighting:


However, I’m having a little trouble as I’m finding point and spot lights shining ‘through’ seams of my test modules… (see the little white bar of light at the back of the first four modules)

(The rightmost module has no backfaces - I clearly need to include those backfaces in order to occlude the majority of inappropriate light).

Can anybody advise me if there’s a way to 100% exclude light leaks like these, or if I just need to be super careful about where I place the light objects?

I’d love to get some kind of authoritative verdict on this! Many thanks in advance!

Unity’s default shadows aren’t great. You could use the HD render pipeline but it is still in development.

Assets like NGSS can improve things greatly on the default pipeline though - Next-Gen Soft-Shadows | VFX Shaders | Unity Asset Store

This is a bit of a shot in the dark (if you’ll excuse the pun), but try playing around with the settings in the Light Inspector, specifically the values under “Realtime Shadows.” Changing the normal bias might be what you need.

You could also try changing “Cast Shadows” to “Two Sided” in your Mesh Renderers.

Hope this helps! Check out the Shadows page in the documentation for more information.