Download

Problem with some kind of shadow LOD

the spot light is stationary, but there’s a weird level of detail issue in the shadowing.
I’m using distant field shadows.

take a look:

k1yrBUZ.jpg

218645ef12bcfc877a3d69107b6ce13b5ba7b360.jpeg

MO81Uzt.jpg

Kh3en11.jpg

this is how it should look like:

7128f7d6d5407d81b1b3e20b9426a023cdeeef2d.jpeg

… and that’s just a lighting preview. any idea how to fix those shadows? setting the spotlight as movable works but that’s not the solution I’m looking for. I want baked GI from stationary light with dynamic shadows.

Hi jazvec,

I think you may be confusing some terms here. If you’re using distance field soft shadows these are dynamic and cannot be used with Stationary or Static lighting.

Lighting in UE4 doesn’t work in this manner and Stationary point/spot lights are not setup to work this way.

When using a Spot/Point light that is Stationary the objects in the scene will all use static lighting and only those that are movable/skeletal will get dynamic lighting applied to them. This is different than the way that a Stationary directional light works, because there is no way to adjust the Cascaded Shadow Maps to have dynamic lighting within a specified range.

For GI with dynamic lighting you’ll need to enable r.DistanceFieldGI=1 in the console variables. However, this method is still very experimental and not currently supported for Spot/Point lights: (https://forums.unrealengine.com/showthread.php?69307-The-state-of-Distance-Field-GI-in-4-8)

For baked GI you’ll need to use a stationary or static light. The mesh will need to be setup with no overlapping faces so that it can bake the lightmap correctly. Increase the lightmap resolution where needed to get better shadow quality.

If you decide to use Distance Field Soft Shadows, you’ll probably want to increase the Distance Field Resolution of the mesh to get better lighting results. Using the head model from the Content Examples for Sub Surface Skin demo and using the visualize mesh distance fields to see the quality of the mesh that is generated to produce the soft shadows I can see that the quality of the distance fields need to be increased. On the left is the original quality of 1. On the right, I’ve increased it to 50 (may not need to go that high, but I just ramped it up).

393dce491ff48f8783619b6cde8d54c142397c1f.png
DFQuality2.png

As you can see in the image on the left the quality is causing light to shine through on parts I wouldn’t necessarily want it to compared to the one on the right that has more accurate shadowing. If you go the Dynamic route you can also use other Dynamic GI solutions like LPV to provide some Dynamic Bounce Light to your model. (LPV Documentation)

For static lighting, you can use Stationary/Static and bake the shadow using the lightmap with a high enough resolution to get good results. Also make sure to build lighting on Production for the best results.

StationaryLight.png

I hope this helps and feel free to ask any questions if you have them.