Download

Combining a movable skylight and directional light causing unpleasant shadow bleeding

I’m trying to combine a movable skylight and directional light for my day/night system, baking either light isn’t really an option since the entire world is generated procedurally. Both the skylight and directional light look fine on their own, but when I activate both at once I get a very unpleasant-looking shadow bleed that gets more pronounced on interiors:

ShadowError.png

I can get rid of the stuff on the walls by turning off the skylight’s shadows (which presents its own problem, since that makes interior spaces completely shadow-free), but even that doesn’t get rid of the weird shininess on the floor. I suspect that all of this is cased by DFAO, since visualizing DFAO in the editor shows highlights that exactly match the floor and wall weirdness:

DFAO.png

As far as I know DFAO can’t be completely disabled if you’re using a movable skylight, since it’s key to how the skylight generates shadows, but if that isn’t an option what should I be changing? Is it flat-out not possible to combine a movable directional and sky light?

So this must be something weird I did to my project settings, and then forgot. To make sure it wasn’t some weird UV/normals thing with my assets, I tried lego-ing a room together out of simple cubes and saw the same kind of artifacting:

NewSkylight.png

However, creating a brand-new project and migrating my main project’s geometry into it gets rid of the artifacting entirely, even when mixing movable directional lights and skylights. Turning off all PP and deleting the PP volume doesn’t effect the shadows, and I’ve been trawling through the Renderer project settings, but everything looks right to me.

Using a Moveable Directional Light and a Moveable Sky Light should work just fine. Did you end up turning off DFAO? The Skylight has a few parameters to tweak it, but for higher quality occlusion you need to go to each individual mesh and increase Distance Field Resolution and regenerate the occlusion(not as effective on flat surfaces though.) It also doesn’t handle non-uniform scaling very well, were your walls smaller and scaled up in one direction?

Is it even possible to disable DFAO and keep the shadows? It was my impression that DFAO was the only way to implement dynamic shadows with the skylight. All my meshes are uniformly scaled, the artifacts seem to be caused chiefly by small amounts of light; they’re most concentrated around areas like cracks in the wall and slightly ajar doors, where a small amount of light streams in. Open doors and large holes both shadow fine.