Fixed issues with stationary light from commit 530aa01

We are currently migrating from 5.2 to 5.4. Our issue is that our stationnary lights have stopped casting static shadows when r.AllowStaticLighting is disabled. We noticed that this is because of the change in the commit 530aa01. The description of the commit mentions “[Fixed] issues with stationary light when r.AllowStaticLighting is disabled.” We would like to know what does issues were so that we can see if we want to keep that change.

Steps to Reproduce

  1. Set project setting r.AllowStaticLighting to 0
  2. In an empty level place :
    1. a spotlight
    2. a floor (static mesh actor)
    3. a box (static mesh actor)
  3. Arrange them in this configuration
    1. [Image Removed]

In 5.2, the light does not leak through the floor, in 5.4 it does.

Hi,

I have tried to replicate this in different engine versions (5.3, 5.4 and 5.5), but have not been able to reproduce the issue reliably. In some cases the light did seem to leak through the floor, but when I made the floor a bit thicker, the light leakage disappeared. On other occasions the light leaking would initially be there when I moved the light under the floor, but would then gradually disappear in a few seconds.

It would be helpful for me if my scene setup was identical to the one in the screenshot (in terms of mesh dimensions and position). Would you be able to attach the repro scene itself?

Thanks,

Sam

Hi,

thanks a lot for the repro scene. I found that the “Cast Dynamic Shadows” setting was disabled on the stationary spotlight. This setting is enabled by default and enabling it fixes the shadow casting issue for me. I’m seeing the same behaviour in 5.2 with this scene (i.e. the stationary spotlight does not cast shadows when Cast Static Shadows is checked and Cast Dynamic Shadows is unchecked). For stationary lights, both “Cast Shadows” and “Cast Dynamic Shadows” must be enabled on the light, and the shadow casting mesh must have both “Cast Shadow” and “Dynamic Shadow” enabled to cast shadows from stationary lights.

Does this answer your question? Or am I missing something?

Best,

Sam

Hi,

I don’t have much further info about those specific issues besides what is mentioned in the description of the commit:

- Renderer will treat stationary lights as movable in projects with static lighting disabled.

- Don’t render “Preview” indicator in stationary lights shadows

- Stationary lights are added to TranslucencyLightingVolume

The “Preview” indicator in Unreal Engine’s viewport indicates that a Static or Stationary light’s shadows are not yet built and are shown as a preview. This preview allows you to see what the shadows will look like before they are baked into the environment. The “Preview” text is displayed within the shadow itself to distinguish it from pre-existing, built shadows. Having the renderer treat Stationary lights as Movable in projects with static lighting disabled prevents the “Preview” indicator from appearing, as Movable lights offer dynamic shadowing that doesn’t require pre-built lightmaps.

If you have more questions or require more info, please let me know and I can assign this case to a subject matter expert at Epic.

Thanks,

Sam

I have a repro in this level in vanilla UE 5.4.4

The actual question (which i badly formulated) was to find what issues were fixed by the commit linked.