Volumetric fog light extinction not following Beer-Lambert Law??

Dear all,

When simulating ground-level ambient smoke in a fire, incorporating the exponential volumetric fog component provided by Unreal Engine is quite handy.

However, it seems it has limitations, particularly when attempting to simulate light attenuation in an atmosphere dominated by soot particles (BC), which absorb much of the intensity. Indeed, it looks like applying a scattering to absorption ratio equal to zero (in UE ‘fog albedo’=0,0,0) to the volumetric fog results in light extinction following a sigmoidal curve, rather than the expected exponential Bouguer-Beer-Lambert pattern.

Conversely, for isotropic light scattering in air dominated by water droplets (in UE ‘fog albedo’=255,255,255), everything seems to return to normal. In intermediate situations, the sigmoidal curve smooths out but still deviates from the expected behavior.

This limitation complicates the accurate numerical simulation of the optical effect of aerosols presence (particularly, the soot volume fraction) in the air in Unreal Engine, although the visual results are still quite convincing.

  • Can you please confirm that this is correct?
  • Do you know the maths/Physics behind light attenuation when fog albedo=black?
  • Can you please suggest an alternative workflow to obtain realistic results (i.e., given an aerosol particles concentration, provide the parameterization of volumetric fog to mimic the real effect of light attenuation)?

The experiment for measuring this features targets with alternating black and white regions. The targets are spaced 10 meters apart along the depth axis (Y). The camera is positioned 10 meters in front of the first target. Two types of materials are applied to the white part: a set with reflective material, and other set with self-emissive (unlit) material. Each target is sampled in grayscale (0-255) in the resulting image, and the values for the white and black parts are compared to derive the contrast. As we move away from the camera, the resulting color increasingly resembles the fog ‘scattering color’, decreasing light intensity and contrast.

Sampling of the white part of the targets indicates a sigmoidal behavior of light extinction in an environment dominated by soot (‘fog albedo’ = 0,0,0). The measurements have been repeated for increasing values of smoke density. The reference value of light intensity (Io) is sampled for white targets in the situation where the smoke density is 0. This behavior notably deviates from the curve drawn by the Bouguer-Beer-Lambert law (exponential curve in light blue in the graph).

Here you have an example of applying exponential volumetric fog in Unreal Engine for the visual simulation of ground-level ambient smoke in the VR experience I developed for the WUICOM-BCN project dealing with forest fires in WUI microscale (2023).

Any help on this matter will be more than welcome.
Many thanks
David - Gnomusy

I get the gist of what you are saying. My take is the default fogging doesn’t follow Beer’s law but I am pretty sure the raymarching in the volumetric-clouds does.

Also, there is a Beer’s law node in the materials/shader interface. You could try a custom fogging/smoke material and incorporate it that way?

1 Like

Yeah, what you say is true, volumetric clouds work perfectly and parameterisation follows real world physics. And that is the frustrating part: why the same physics and parameterisation is not applied to volumetric fog? Strange, indeed. Maybe I’m missing something?

I’ll study your suggestion, but I’m not sure it will work on volumetric fog. Thanks anyway.

Regards
David-Gnomusy

IIRC volumetric-fog is depth-based fall-off out of the box, likely for performance reasons, generally a game only needs something that fully-occludes after distance X, and linearly out until there.

But nothing is topping you from making your own! :smiley:

try this: https://www.youtube.com/watch?v=xNc1pJ9-L4o

1 Like

Cool! Thanks! I’ll explore all this in detail.
Cheers
David - Gnomusy

From the grayscale measurements obtained in the simulations with volumetric fog, the resulting pattern follows a smoother sigmoidal polynomial curve at closer distances and becomes more pronounced as it moves away from the camera. This pattern, as you rightly point out, resembles more of a distance-based falloff than a Beer-Lambert attenuation (light green line in the graph), which is, on the contrary, more pronounced at the beginning and more asymptotic towards the end.

Your suggestion to create my own fog raises doubts for me, as it would require working in post-processing and likely lose the volumetric character. However, I will try other alternatives, such as creating fog densities with volumetric textures that are proportional to real-world occurrences. Nonetheless, the visual results, as they are now, are reasonably convincing.

Cheers
David

The Curve for Beer looks pretty much like a square-falloff curve:

this:

vs this:

it’s what the VTA-guy uses in the depth fog but you still have this if you want to hook it into saturation, depth or the like:

You could also try playing with the volumetric-clouds. They offer an option for fog inside the clouds, and clouds don’t have to be clouds, you can use them at ground-level.

1 Like

Great! Thanks!