Local Fog (in Volume?)

Is it possible to make fog in local space (for example in volume)? Currently when I place fog on level it affects all level. I want to make fog in specific area.


Hi Patrick,

This is currently not implemented into the engine. There is a feature request in for it though. Unfortunately, there is no timeline for when this will be fully implemented in the engine.

Thank you!


As a workaround, you could create a custom post process effect for the fog and then limit this one to a specific area.
Here’s a short tutorial about settings up such local post process effects:

Edit: This is only required when you want the fog to be seen even when the camera is not inside of that specific area. Otherwise you can just use a regular post process volume with a fog material.

As another workaround, have a look at the Effects Cave demo, when you are at the top where it is snowing, there are a bunch of plane meshes called “fog sheets” that have a transparent animated fog material applied to them. In game you can’t really tell the difference between a real fog effect and the fog sheets, so it may be of use to you to try these out, using multiple sheets to create a layering effect. Maybe even combine the sheets with the post process effect shown above to make it more realistic.

Could you post a link regarding creating the fog material you mentioned? I haven’t had any luck searching for it. Much appreciated!

There are various ways of doing this, it really depends on what you are looking for exactly.
The material below is probably the most simple version. If you want something more advanced, like re-creating the exponential height fog, that would be possible as well.

I tried to replicate that and somehow I’m missing something:

The scene texture node returns a float4 value, whilst your fog color node is only float3. You can either use a constant4vector for the color like I did, or use a component mask (RGB) for the post PostProcessInput0.

D’oh! I totally spaced on the float4. Thanks! :slight_smile: Working now.

A really cool trick you can use is a to use a cube-mapped sprite, which gives awesome depth to particle sprites. Fill an area with them and you get what looks like localized fog, without any camera-facing artefacts, and it’s more flexible in terms of movement etc.

You can then use the “Location” modules in cascade to define where the fog actually is too, and add subtle movement etc.

I am intriqued by your answer TheJamsh. Do you have any links to how you make a cube-mapped sprite? Or if you can explain in more detail, that would be cool. I am not totally sure I understand what it is?

it’s a good trick with postprocess,but when use it to simulate the fog,it lacks the blend process of the fog effect;in other words ,when you enter the volume,the effect will be changed in one frame(also no use to change the Blend Radius and Blend Weight);

Hell of a bump.

The way to do this now is using Volumetric Fog with particle sprites, included in 4.16.

Any hints how, i made this but what next?