Material Parameters
Most users never touch this. The plugin ships the fog material
(M_Main_Fog_Volume) already wired to the Fog Manager. This page is the
reference for anyone building a custom fog material or curious how the manager
talks to the shader.
How it works
Section titled “How it works”The Fog Manager creates a dynamic instance of Fog Material at BeginPlay and
adds it as a post-process blendable. Each frame it sets a small set of named
parameters on that instance: the local player’s position and view, plus the
fog’s configuration. The material reads those names to draw the darkness and
carve out lit areas.
That means the contract is the parameter names. A custom fog material must expose these exact names, or the manager’s updates land nowhere.
Configuration parameters
Section titled “Configuration parameters”Set once at BeginPlay from the Fog Manager’s settings.
| Parameter | Type | Source / meaning |
|---|---|---|
MapSize | Scalar | The manager’s Map Size. Converts world units into map (UV) space. |
IsMapCentered | Scalar (bool) | The manager’s Is Map Centered (1 = centered on origin). |
CharacterVisibilityRadius | Scalar | The manager’s Character Visibility Radius. The lit radius around the player. |
FloorMap | Texture | The baked Floor Map Texture, when one is assigned. White is lit-able ground, black is permanently dark. |
Per-frame player parameters
Section titled “Per-frame player parameters”Updated every tick from the local player’s tracker.
| Parameter | Type | Meaning |
|---|---|---|
CharacterUVLocation | Vector | Player position in map space, using Map Size. |
CharacterUVLocationFixed | Vector | Player position in map space using the baseline 3000 scale, kept alongside the above for the material’s sampling. |
CharacterForwardDirection | Vector | The player’s forward direction (x, y), used for field-of-view cones. |
CharacterFOVCosHalfAngle | Scalar | Cosine of half the tracker’s Field Of View Angle. -1 when the angle is 360 (omnidirectional), so the cone test always passes. |
Beacons
Section titled “Beacons”Beacon positions and field-of-view data are gathered every frame into arrays on
the Fog Manager (BeaconLocationsAndSizes, where each entry is x, y, z, radius, and a parallel BeaconFOVData of forwardX, forwardY, cos(halfFOV), unused). These are exposed to Blueprint and routed to the material through the
beacon render target (RT_Beacon_Locations) by the plugin’s Blueprint layer
rather than as individual named scalars. If you build a custom material, reuse
that beacon pipeline rather than re-deriving it.