Fog of War Actors and Components in Unreal Engine

The cast of a top-down fog of war system in Unreal Engine: the Fog Manager actor, the unbound post-process volume, the M_Main_Fog_Volume material, beacon and occluder components, the Niagara system, and the shadow scene capture, and what each one is for.

This is step two of the Top-Down Fog of War in Unreal Engine guide. Before the build, here is the cast: every actor, component, and asset in the system, what it is for, and which step covers it in depth. The whole thing is one actor driving one material; everything else feeds that material.

The actor and its volume

  • AFogManager / BP_FogManager is the brain. The Blueprint is thin; the C++ parent creates the post-process volume, builds the dynamic material, and pushes world data into it every tick. It is the only actor you place in the level. Covered in step three.
  • The unbound UPostProcessComponent is how the material reaches the whole level. With bUnbound = true, one volume affects the entire world instead of only the space inside its bounds, so a single Fog Manager fogs the map.

The material

  • M_Main_Fog_Volume is the post-process material on that volume, and the heart of the effect. It darkens the whole scene and lerps the lit scene back wherever a combined black-and-white mask is white. Every other component in this list exists only to build one input to that mask. How it assembles and subtracts those inputs is step four.

The vision sources

  • The vision tracker component marks which pawn’s vision is being drawn (the locally controlled character) and holds the list of beacons that pawn owns. The manager reads it every tick to know whose position and beacons to push.
  • The FloorMap texture is a baked black-and-white mask of walkable ground. It keeps light off places the player cannot walk. Sampled by the material in step five.
  • UBeaconComponent is a stationary vision source, a watchtower or ward, carrying its own location, radius, and field of view. The manager packs every beacon into arrays for the GPU. Covered in step six.
  • UVisionOccluderComponent / BP_Vision_Occluder marks cliffs and walls as sight-blockers by setting a custom depth stencil and a VISION_OCCLUDER tag. The material reads that stencil to keep occluder faces unlit and to cast shadows behind them, both in step four.

The GPU helpers and render targets

  • NS_Beacon_Locations_To_RenderTarget is a Niagara Grid2D system with no renderer. It reads the beacon arrays and stamps every beacon’s spotlight into a render target the material samples. It is step seven.
  • The first-person shadow USceneCaptureComponent2D sits on the Fog Manager, snaps to the player each tick, and captures only the tagged occluders from the player’s vantage to build the cliff-shadow mask, also in step four.
  • The render targets are the in-between textures: a beacon render target the Niagara system fills, and a player-centered shadow render target (RT_Map) the scene capture fills. The material samples both as extra mask layers.

How they connect

Each tick the Fog Manager reads the local pawn, writes its position and beacon arrays into the material and the Niagara system, and moves the shadow capture onto the player. The material then samples the floor texture, the beacon render target, and the shadow render target, combines them into one mask, and lerps the scene from dark to lit. Next, see how the manager drives all of that every frame.

Frequently asked questions

What is M_Main_Fog_Volume?
It is the post-process material on the unbound volume. It darkens the whole scene and lerps the lit scene back wherever the combined mask is white. Every other component exists to feed that mask.
What does the Fog Manager actor do?
AFogManager creates the post-process volume, builds a dynamic instance of the material, and pushes live world data, the player's UV location, beacon arrays, and the shadow capture, into it every tick.
Do I need the occluder and beacon components?
No. They are conveniences. Beacons add stationary vision sources and occluders mark sight-blocking geometry; a game without either simply drops that branch of the mask.