Download

Stationary lights and volumetric light maps: why can't they work together?

After a confusing bit of searching and talk on Unreal Discord, I’ve finally come to grasp that volumetric lightmaps don’t work together with stationary lights. But it begs the question: why not? The only other posts I’ve found on the forum are others being confused about it: 1, 2

In the docs, the sample screenshot for volumetric lightmaps shows the desired effect: https://docs.unrealengine.com/en-us/Engine/Rendering/LightingAndShadows/VolumetricLightmaps

This works fine for static lights. However, for stationary lights, only the baked GI is affected by the VLM, which means that the feature is basically useless for stationary lights. To me, it does not seem unreasonable that the VLM could and should also affect the direct light of stationary lights. Otherwise, what is the point of even having the volumetric samples for them? Stationary lights already effortlessly blend baked and dynamic shadows, so it does not seem like a stretch that they could sample the VLM to shadow the direct lighting.

On Ios these seems to work flawlessly.

This is on PC, in 4.22. Take the following test scene with a green directional light:

This is what it looks like with a stationary light, with dynamic shadows turned off:

And this is the same scene, but the light is set to static instead:

The VLM is clearly only being sampled in the static set up.

A stationary light will only cast shadows on dynamic geometry if dynamic shadows is enabled, because stationary lights only bake their bounced lighting into lightmaps and VLMs, the direct lighting is always calculated in real-time (which is why stationary lightmaps produce specular reflections while static ones do not), with static direct shadows only for static geometry (it’s stored as a mask in the lightmap).
The VLM stores, for each sample point, a small “sphere” containing the lighting values affecting each sample from all directions. It cannot hold the information dynamic objects need to determine if a point is shadowed by a specific stationary light or not.

Did you try Single Sample Shadow from Stationary Lights? Its a setting in static and skeletal meshes. It does sample shadow from VLM.

Ah, this is golden! Thanks.