Download

[Stationary light]Bad shadow quality ,how to improve it?


I used a custom component to generate and render a big movable squad (showed above),using one directional light. When the light switched to stationary mode, I got bad shadow result in the picture .It seems the shadow quality is associated with the squad’s bounds size(the blue box showed in picture).
Is there any solution to improve shadow quality under stationary light mode?
Many thanks in advanced

Typically, the shadow quality of static lights is related to the object on which the shadow is resting. Here, the floor, which I assume is scaled massively? That’s also stretched the lightmap.

You can increase the lightmap resolution on the floor.

Thanks.
Something maybe misunderstood, the squad with shadow problem is movable ,not static, the lightmap is not used in this situation.
I just tested using the UInstancedStaticMeshComponent, some problem.


I’m wondering,what’s difference with statinary light and movable light, when they render a movable object’s shadow.

If the meshes are movable, there’s no point in using a static light. Time for a moveable directional light.

Statinary light can lit movable object in normal lightmode and lit using lightmap to static object.

Yes, it can. But why bother, because everything in this scene is moveable?

Haha,I wish just as you told. But it’s mobile project, many objects are static for performance reason.

1 Like

Use cascaded shadow maps instead of inset shadows.

Inset shadows are per-object, so if you have a really large object then the resolution will be extremely bad.

Thanks,Arkiras. It dose not work, for I’m using instancing to render meshes in a squad, just like UInstancedStaticMeshComponent.
Finally ,I found a solution that I can adjust “Dynamic Shadow Distance Stationary Light” in [ Cascaded Shadow Maps] value to force dynamic shadow to work.