<aside> 💡 Using VaFogOfWar plugin for Unreal Engine 4 :)

</aside>

General Considerations

There are four entities you should take into consideration:

  1. AVaFogBoundsVolume sets the region that covered with fog of war
  2. AVaFogLayer responsible for one individual fog visibility layer
    1. AVaFogTerrainLayer subclass for initial terrain/obstacles state
  3. UVaFogAgentComponent is the one who reveales the cloaked territory (or blocks visibility cells)
  4. AVaFogBlockingVolume blocks multiple cells at once

So, to setup fog of war for your own game you should:

Step 1. Add fog bound volume

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/c7dba0fd-6652-40bc-bee0-99e8c22f6221/Untitled.png

Step 2. Add fog layers and link them with bounds volume

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/38c6eac6-c537-4761-9c05-7b9dc6de705f/Untitled.png

At this step you should set:

  1. Layer Channel — defines how layer will handle fog agents:
    1. EVaFogLayerChannel::Permanent — once revealed it will stay revealed
    2. EVaFogLayerChannel::Scouting — handles actual revealed zone by active agents
    3. EVaFogLayerChannel::Terrain — keeps state of walls, trees and other obstacles
  2. Bound Volume — reference to actor added at the Step 1.

Step 3. Setup initial terrain level with blocking volumes

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/43c460e3-2483-4b4d-9e49-b9853fa20b5b/Untitled.png

You can markup initial terrain layers with AVaFogBlockingVolume actors. Just set the height level you want to "paint" with the volume: