Low lyiing fog

okay sure im just being stupid here but im trying to figure out how to get a fog layer that stays near the ground (swamp like) and hopefully can be made to be affected by the player and or other characters moving through it, any suggestions or help highly appreciated.

did you ever figure anything out? If you did can you share some info with me

I think the easiest way would be to create something like a fog mesh + a fog material with this setup: ?v=XYPPd5oLoPM + in the character bp (character position) -> that’s the rough overview of how to create something like that :slight_smile:

Yep that helps thanks again

alright I watched the second video. The blueprint aspect of the second video makes me believe that is not relevant. I do need my fog to be dynamic, but not triggered. Am I missing something from within that video.

With the upper technique you can let the fog disappear, deform, change the texture, the opacity,… :slight_smile:

I’ve never played with it, but it looks like UE4 comes with an actor set up to do this exact thing here: Exponential Height Fog User Guide.

But you wont be abel to “manipulate” it by the player :slight_smile:

There is a fog actor included with the cave effects demo. It’s a blueprint, and has various adjustments you can use to create more opaque or less opaque fog. By positioning the plane close to the ground, you can easily achieve what you’re describing. At this point however, I don’t believe you can actually interact with the fog. You might be able to make a shader similar to the foliage bending shader here to move opacity based on player position: https://forums.unrealengine/showthread.php?1795-Foliage-collision-foliage-bend-on-collision-In-engine-feature

[QUOTE=;132656]
But you wont be abel to “manipulate” it by the player :slight_smile:

Well, you could if you wanted to modify the exponential height shader. The hard part would be deriving your own custom fog component and setting up your fog texture mask, but I’m not really that familiar with how the height fog is set up.

It might be simpler to create a custom post-processing material using scene depth and the custom depth buffer. I just mean it might be more efficient to do screen space fog manipulation rather than a per-pixel distance calculation. That would just let you have a lot of objects interacting with the fog with little additional cost.

If you did use the mesh-based distance masking, I would calculate it per-vertex using a custom UV. It should look fine–especially if you use a bit of a noisy texture to render it–and an appropriately tessellated mesh could save you a couple orders of magnitude of work for your GPU. That would let you squeeze in masking for multiple objects without too much of a performance penalty. Doing per-pixel distance calculations for multiple objects would quickly bog down your GPU.