Sein Fog Of War Render
Class · ASeinFogOfWarRender : AActor
#include "Render/SeinFogOfWarRender.h"
can be subclassed in Blueprint
Draws fog of war over the local player’s view. Place one in the level and assign a Fog Post Process Material; it reads the player’s vision and darkens unexplored and explored-but-hidden areas. It can also switch the view to alternate vision layers, each with its own look.
Functions
Section titled “Functions”Get Active Vision Layer
Section titled “Get Active Vision Layer”The vision layer this view shows: -1 for Normal, or 0 to 5 for a custom layer.
int32 GetActiveVisionLayer() const;Set Active Vision Layer
Section titled “Set Active Vision Layer”Switch the local view to a vision layer: -1 = Normal, 0..5 = custom slot. Rebuilds the fog reveal from that layer’s bit and swaps in its style material. Switching to a disabled / out-of-range custom slot is ignored. Pure render/view change — never touches the sim.
void SetActiveVisionLayer(int32 LayerIndex);Cycle Vision Layer
Section titled “Cycle Vision Layer”Cycle the local view through Normal → each ENABLED custom layer → Normal.
void CycleVisionLayer();Refresh Fog Render
Section titled “Refresh Fog Render”Force a full rebuild of the tint texture (e.g. after switching the displayed observer in an observer/replay camera). Normally unnecessary — the actor rebuilds automatically when vision changes.
void RefreshFogRender();Properties
Section titled “Properties”Fog Post Process Material
Section titled “Fog Post Process Material”TSoftObjectPtr<UMaterialInterface> FogPostProcessMaterial
Editable in defaults and on instances · Blueprint read and write
Post-process material that composites the fog tint over the scene. It reads the texture parameter FogTexture (the per-cell tint, BGRA) and the vector parameters FogWorldMin and FogWorldSize (the world XY rectangle the texture covers). Without it the overlay does nothing and a message is logged. The reference is soft, so placing the actor does not load the material into every map.
Unexplored Color
Section titled “Unexplored Color”FLinearColor UnexploredColor · default FLinearColor::Black
Editable in defaults and on instances · Blueprint read and write
Tint applied to fogged (unexplored + explored-not-visible) cells. Black is the classic RTS look; raise toward a blue/grey for stylized fog.
Unexplored Opacity
Section titled “Unexplored Opacity”float UnexploredOpacity · default 1.0f · min 0.0, max 1.0
Editable in defaults and on instances · Blueprint read and write
Opacity over NEVER-explored cells. 1.0 = opaque (can’t see the map at all).
Explored Opacity
Section titled “Explored Opacity”float ExploredOpacity · default 0.75f · min 0.0, max 1.0
Editable in defaults and on instances · Blueprint read and write
Opacity over EXPLORED-but-not-currently-visible cells — the dimmed “terrain memory” tier. The headline tunable: 0 = no dimming, 1 = as dark as unexplored.
Smoothing Strength
Section titled “Smoothing Strength”float SmoothingStrength · default 0.1f · min 0.0, max 5.0
Editable in defaults and on instances · Blueprint read and write
Edge smoothing as a blur radius in fog cells. 0 gives hard, blocky per-cell edges. Above 0 the fog texture is filtered bilinearly and blurred by that radius, which softens the fog edge and rounds off the stair-stepping. It is cheap because the fog texture is small.
Vision Layer Post Process Materials
Section titled “Vision Layer Post Process Materials”TArray<FSeinVisionLayerView> VisionLayerPostProcessMaterials
Editable in defaults and on instances · Blueprint read and write
Per custom vision layer the player can switch their view to (slot N → layer N0..N5, matching Project Settings > SeinARTS > Vision Layers). When the local player switches to this layer (SetActiveVisionLayer / CycleVisionLayer, or the Sein.Vision.Layer console command), this slot’s Post Process Material is applied FULL-SCREEN on top of the scene but UNDER the base fog — giving that layer its own “visor” look (e.g. a thermal heat palette). The base Fog Post Process Material keeps handling the unexplored/explored darkening, so this material only defines the STYLE, not the fog tint. Leave the material empty for a layer that changes the revealed area without restyling; disable a slot to make it un-switchable.
Active Vision Layer
Section titled “Active Vision Layer”int32 ActiveVisionLayer · default -1
Read-only in Details
The vision layer the local view is currently using: -1 = Normal (the V bit), 0..5 = the custom layer in slot N. Client-only view state.
Post Process
Section titled “Post Process”TObjectPtr<UPostProcessComponent> PostProcess · default CreateDefaultSubobject<UPostProcessComponent>(TEXT("PostProcess"))
Read-only in Details
Unbound post-process source that carries the style + fog blendables.