Download

Any way to limit Atmospheric / Exponential Height / Volumetric Fog to specific areas?

Is there any way (in a Post Processing material, for example) to limit or otherwise affect (change the colour etc.) of atmospheric effects (Atmospheric Fog, Exponential Height Fog, Volumetric Fog)?

So for example, if I wanted all pixels in a certain area to have a fog density of 0, while the fog in the rest of the scene is 0.5.

At what point in the rendering pipeline are these atmospheric effects added, and can they be masked out, altered etc.?

In an earlier project, I ended up writing all my own atmospheric effects in HLSL in the pixel shader, so I could control them there, but I would much rather be able to use UE4’s native atmospheric effects (especially Volumetric Fog, which I don’t think I could create in a pixel shader).

For Exponential / Height fog - nothing by default exists. These fog types are (I believe) global shaders that are applied to everything in the scene, so modifying them or adding exceptions/branches creates a lot of permutations and cost.

With Volumetric fog however (which is camera based), density can be controlled with special particle sprites. See here:
https://docs.unrealengine.com/en-us/…/VolumetricFog