Skip to content
TECHNICALLYARTIST
FAB

The Fog Manager

The Fog Manager (BP_FogManager, a Blueprint subclass of AFogManager) is the brain of the effect. Place one per level. It owns an unbound post-process component, builds a dynamic instance of the fog material at BeginPlay, and ticks at roughly 60 Hz to feed that material the local player’s position and view direction plus every active beacon’s position and radius.

Because it is set to be relevant only to its owner, each client gets its own Fog Manager view, so every player sees fog from their own perspective.

Drag BP_FogManager from Plugins/FogOfWar/Content/Fog into the scene to begin:

Dragging BP_FogManager into the level

PropertyDefaultWhat it does
Is Map CenteredtrueTick if the playable area is centered on the world origin. This shifts beacon coordinates by half the map size so they map correctly. Must match the Map Baker.
Map Size3000Size of the playable area in world units. Used to convert world positions into the material’s map (UV) space. Must match the Map Baker.
Character Visibility Radius400How far the local player sees, in world units. This is the radius of the lit circle around the player.
Fog MaterialM_Main_Fog_VolumeThe post-process material the fog renders through. The default is wired up for you; only change it if you are using a custom fog material.
Floor Map TexturenoneThe baked floor map from the Map Baker. When set, the fog samples this instead of the baker’s live render target, which is faster.

The Fog Manager's settings in the Details panel

Is Map Centered tells the manager whether the world origin sits at the center or a corner of the map, so it positions itself relative to the layout:

Is Map Centered, with the origin at the map center

For Map Size, switch to Top view and hold the middle mouse button to measure across the map:

Measuring the map width in Top view

You normally never touch this, but it helps to know what the manager is doing each frame:

  • The local player’s position, converted to map (UV) space, and forward direction.
  • The field-of-view gate for the local player (omnidirectional unless you set a cone on the Tracker).
  • A list of every tracked beacon: its position, vision radius, forward direction, and field-of-view gate.

These are written to the fog material as named parameters. If you build a custom fog material, it must expose those exact names, see Material Parameters.

FunctionNotes
Get All Non Occluding ActorsReturns every actor in the level that is not tagged VISION_OCCLUDER. Used by the shadow / baking pipeline to know which actors should not cast vision-blocking shadows.