If I use a static directional light, the static objects render shadows perfectly as I’d expect.
If I render the exact same light, but as a stationary light, it renders like this. I’m aware of terrain static lighting resolution, but if I make that even 3, my build times take 10 minutes and use 2 gigs of space on my HD… (but it DOES help the shadow)
Funny enough, if I change it to a dynamic light, I get good lighting. Why does it not just use the same algorithm for static objects? Dynamic objects have their shadows perfectly rendered.
I’m also using a sky light. Is there any order of lighting precedence I need to worry about or something?
edit : Dynamic lighting seems fine on PC and mobile doesn’t support anything but static anyway so I’m working around this for now, but I’d love to hear a real solution.
The reason you’re seeing the rougher shadows for Stationary lighting is because this is sort of a hybrid between static lights and dynamic lighting. I’ll try to explain below how to properly get you setup with this to get you started with shadows and performance!
As you pictured above this is static lighting as it bakes and it has the soft edges looking more natural. In the images that follow I’ll give you some settings that will get you close to this with the stationary light.
Since Stationary is a hybrid between dynamic and static lighting there are two things going on here. It needs to build lighting so that it has a base shadow that is baked into a lightmap. This is a rough image that needs to be tweaked. You can adjust the landscapes lightmap resolution so that it has crisper shadows baked into it. To get the softer edges we’ll need to adjust the lightmass importance volume settings in the details panel. You can find the details panel and what needs to be adjusted in this image. Adjusting anywhere from 2-4 will give you much softer edges on your shadows.
The next thing you will want to do is adjust the settings in the directional light so that the dynamic lighting is being used. Currently it is not which is giving the rough looking shadows.
By going to the details panel and adjusting the “Dynamic Shadow Distance StationaryLight” setting from 0 to 20000 this now allows dynamic lighting within a specified distance. Using something like 2500 (which is what I used in the following image) you can see that the shadows are being generated dynamically. If you move the camera further away you’ll see that it transitions to the baked static shadows. Since these shadows are not meant to be seen up close depending on how far your shadow distance is set you’ll now have shadows at further distances that are not a performance hit.