Hello!
In UE4 4.14 there is a bug that prevents dynamic shadows from being drawn for stationary lights if the light is set to not cast static shadows. What I would have expected is that turning off static shadowing for a stationary light would still allow the light to produce dynamic shadows. This is also true if you turn off a project’s Rendering->Allow Static Lighting option.
It also appears that if you set a stationary light to not cast dynamic shadows in forward shading that the light no longer casts static shadows. Essentially you need both types of shadow casting on to get any shadows out of a stationary light while using forward shading.
To reproduce:
- Create a new, blank project with 4.14 and include the starter content. I also set the project to use Scalable 3D or 2D.
- Change the project to use Forward Shading and restart the editor
- Load up the Minimal_default map if it isn’t already
- I set the left chair to Movable while testing the difference between lightmaped and dynamic shadows
- Rebuild the lightmaps
- Play in editor
- Eject from the player and select the left (Movable) chair. Drag it around and notice dynamic shadows
- Stop PIE
- Select the Light Source light and uncheck its Cast Static Shadows. Make sure the light’s Cast Dynamic Shadows is still checked.
- Rebuild lightmaps (should no longer see static shadows from Light Source)
- Play in editor
- Notice that there are no dynamic shadows. Ejecting from player and moving the left chair produces no dynamic shadow.
- Exit PIE
- Select the Light Source light and check its Cast Static Shadows. Uncheck the light’s Cast Dynamic Shadows.
- Rebuild lightmaps (static shadows are missing!)
- Play in editor
- Notice that there are no static shadows now (and no dynamic shadows as expected)
- Exit PIE
- Change the Light Source light so that both Cast Static Shadows and Cast Dynamic Shadows are checked
- Rebuild lightmaps
- Play in editor
- Eject from Player
- Move left chair around. Notice that Static objects have static shadows and the Movable chair has a dynamic shadow.
As another test, uncheck the project’s Rendering->Allow Static Lighting and restart the editor. Make sure that the Light Source light still has its shadow casting turned on (could be both Static and Dynamic, or just Dynamic). Play in the editor and notice that there are no shadows at all. I would have expected dynamic shadows to be present for the stationary light while using forward shading.