Baked lighting strangely affecting volumetric fog

Hey! I’m seeing an issue where volumetric fog behaves in a way that doesn’t seem to make any sense.

Firstly, here is an image with baked lighting disabled:

Compare that with an image where lighting has been baked (by CPU lightmass), with volumetric lightmap visualized:

As you can see, the volumetric fog strangely cuts off as it gets close to the floor. Across the scene there’s also other ways it breaks down and almost randomly occludes parts of the volumetric fog from actually being lit up:

At first I though this was caused by volumetric lightmaps somehow occluding the fog erroneously, but neither changing volumetric lightmap resolution nor turning volumetric lightmap off (by switching to sparse volume lighting samples method instead) made any difference.

I have tried toggling settings such as:

  • shadow mapping method
  • ray-traced shadows (with console setting to shade volumetric fog)
  • VTs for lightmaps

Scene setup is pretty simple:

  • stationary directional light
  • static skylight
  • a bunch of static meshes (nanite or non-nanite, makes no difference to this issue)
1 Like

I have now found out that I can increase the quality here by decreasing the “static lighting level scale”. It appears that there is a hidden setting which controls the resolution of some sort of voluemtric fog lightmap that CPU lightmass is, aparently, producing.

Figured it out. It’s the baked shadowmap of the directional light that’s determining the shape of the light shafts. Since I’m using VSMs it means I don’t actually see the baked shadows, but they affect the volumetric fog anyway.

So I fixed this by increasing the shadow resolution scale on the directional light. This seems to only affect the baked shadows and not VSMs.