Height fog making my lights visible through meshes?

For some reason the Exponential Height Fog seems to be causing lights to be visible through one sided building meshes. The lights are blocked normally with the mesh set to Shadow Two Sided until the fog is applied. I’m just trying to get foggy godrays from the windows in a night scene. Any help is appreciated!

same problem with me

In my explorations on this issue, I’m noticing a definitively strange outcome when using LocalHeightFog & ExponentialHeightFog in the same scene. It would seem that the LocalHeightFog is deriving its inscattering and lighting calculations based off of the current lighting in the scene, specifically the DirectionalLight which uses “Direct Normal Illuminance or Lux” - During this calculation, the LocalHeightFog is not necessarily making a consideration for the shadow data from the scene’s models.

When you drop a PointLight in to the LocalHeightFog you would expect there to be inscattering of the local PointLight in to the LocalHeightFog, but this is not the case. I believe this is because the material used to generate the appearance of fog for LocalHeightFog is set to only take calculation from the scene’s DirectionalLight … which makes sense for how you consider physicalized fog to work.


In this gif here, you can see that I have both ExponentialHeightFog and LocalHeightFog in the scene, as well as a DirectionalLight and a LocalLight (thats the purple light) set to Movable. Your expectations of how you would think the LocalLight inscattering would behave would be to have inscattering in the LocalHeightFog, but this is not the case. Furthermore, the LocalHeightFog takes on the lighting inscattering we covered before from the DirectionalLight. To me, its strikingly odd that the LocalHeightFog doesn’t make a consideration for the mesh shadows nor mesh distance field (and therefore blocking the directional light). So something definitely seems bugged here.

As for the localized purple PointLight, it would seem that no matter the settings you apply to the light you will not get PointlLights to inscatter in your LocalHeightFog. Even if that PointLight has most of the flags set to true. I believe this is because PointLights do not physicalize the same way that Directional Lights are physicalized looping back to “Direct Normal Illuminance or Lux” - Or simply put, PointLights do not use Lux.

With those considerations above, I decided to drop the LocalHeightFog and you can see that with standard ExponentialHeightFog (and the settings cranked very intense), the purple PointLight starts to inscatter in the ExponentialHeightFog as you would assume as well as the Static meshes (or maybe its the Distance Fields) starting to block the ExponentialHeightFog as expected.


Hope this helps! I know I certainly learned a lot! I think for the effect OP was going for they should be using a VFX to fake it as opposed to trying to lean on the fog system in a highly physicalized workflow.