Volumetric Fog

Overview

The Volumetric Fog Blueprints allow designers to not only get a nice ground fog that fits the shoreline, but also provides with the ability to place up to 16 hand placed fog spheres per island. The blueprint also gives us density and time of day options to allow designers/artists the ability to adjust fog densities based on time of day. The hand placed fog points give us ultimate control over which areas receive fog and which don’t. Generally the fog pass should come after the IBL pass as IBLs do change the overall look of the fog.

Setup

  1. To setup Volumetric fog on a new island you will need to place 3 unique blueprints in your level (They must all remain in the farthest sublevel for each island)
  • Blueprint'/Game/Atlas/Effects/Volumetric/BP_FogBlutility.BP_FogBlutility'
  • Blueprint'/Game/Atlas/Effects/Volumetric/BP_VolumetricFog_Master.BP_VolumetricFog_Master'
  • Blueprint'/Game/Atlas/Effects/Volumetric/BP_FogPoints.BP_FogPoints'
  1. After placing these three actors select the “BP_FogBlutility” actor you placed and be sure to set its “Fog Reference” option to match the “BP_VolumetricFog_Master” actor that was placed.
../_images/BPBlutilityOptions.jpg
  1. Select your BP_Volumetric_Master” actor and move the blueprint to the center of the island. This doesn’t have to be exact but on the next step when we are scaling these it works best if this is centered to the island.
  2. Select the “BP_VolumetricFog_Master” actor and look for the Mesh Scale X,Y,Z options. You’ll want to set the XYZ scales to ensure the mesh is fully covering the entire island with plenty of room to breathe. Fog will only render within this mesh so ensure you have full coverage in all directions or fog will get a very unnatural cutoff at the edges, this includes both ground and hand placed fog.
../_images/BPMasterScale.jpg

Generally the volumetric fog mesh should be just below the ocean level.

../_images/MeshVisualizer.jpg
  1. Select the “BP_VolumetricFog_Master” actor and enable an option called “Use Hand Placed Fogs” This option and the next few steps can be skipped if the map is a very small one such as an islet that we normally don’t want/need individual fog points placed on.
../_images/BPMasterHP.jpg
  1. With the “BP_VolumetricFog_Master” actor still selected do a search for “Custom Tag” There are multiple Custom Tag options on this actor so be sure to get the one under “BP Volumetric Fog Master C”. This “Custom Tag” Must have a unique tag that does not exist on any other island. This basically ensures that the system is only getting fog point actors from this island and only this island. Generally we have been setting the overall name of the island as the tag for these to ensure they are unique.
../_images/BMasterTag.jpg
  1. Repeat the above step and do the same thing for the “BP_FogPoints” actors. The Custom tags on these actors MUST match the custom tags used on the “BP_VolumetricFog_Master” actor exactly or they will not work. Upon setting the custom tag for this actor if you have done everything correctly you should see fog appear at the location of this actor, if not be sure to check the above steps to make sure it is setup properly. You can place up to 16 fog point actors per island. Generally it is better to use fog points with a very large radius and just embed them in the ground than it is to place lots of small radius fog points. Every 4th fog point does increase the cost a very small amount, generally only the largest maps will ever need 16 fog point actors.
../_images/FogPointsTags.jpg

Settings

BP_VolumetricFog_Master:

../_images/BPMasterOptions.jpg
  1. Ground Fog Density: Sets the lower ground fogs overall density (Works like a global value and will adjust both day/night values)
  2. Ground Fog Density Day: Sets the lower ground fogs density during the day (Late evening and early morning transition between day/night values)
  3. Ground Fog Density Night: Sets the lower ground fogs density during the night (Late evening and early morning transition between day/night values)
  4. Hand Placed Fog Density: Sets the hand placed fog points overall density (Works like a global value and will adjust both day/night values)
  5. Hand Placed Fog Density Day: Sets the hand placed fog points Day Time Fog Density. (Late evening and early morning transition between day/night values)
  6. Hand Placed Fog Density Night: Sets the hand placed fog points Night Time Fog Density. (Late evening and early morning transition between day/night values)
  7. Fog Material: NO TOUCHY! Simply a reference to the dynamic material instance that gets dynamically created, you can’t change/update this.
  8. Overall Noise Scale: Adjusts the overall scale of the noise function that is being used for the fog. Probably don’t want to touch this value to keep things consistent between maps.
  9. Height Falloff Power: Normally not used by designers but it can allow us to setup a bit of a softer gradientZ transition for the ground fog. Setting a higher value will basically push the max ground fog height down a bit with a softer transition.
  10. Lower Fog Layer Height: Default value will be good enough for most maps but this allows us to set the actual max height the ground fog will come up to.
  11. BP Reference Array: NO TOUCHY! This is only visible as an easy way for designers to see how many fog points are currently in the level.
  12. Update Fog Points: Will update all of the fog point locations/values. You don’t need to use this if you have the Blutility actor hooked up properly.
  13. Extinction Near Percent Day: Controls the near camera fade on the fog during the day. To keep things consistent between maps we normally don’t want to touch this setting.
  14. Extinction Near Percent Night: Same as the above but controls the near camera fade at night.
  15. Visualize Mesh Size: Toggles visibility for a mesh to better visualize the total area the fog will be covering. Should always disable this option when you are done using it! It won’t break anything or show up in game but we don’t need lots of levels with giant red boxes enabled all the time.
  16. Mesh Scale X: Sets the X Scale of the mesh used for Volumetric Fog.
  17. Mesh Scale Y: Sets the Y Scale of the mesh used for Volumetric Fog.
  18. Mesh Scale Z: Sets the Z Scale of the mesh used for Volumetric Fog.
  19. Use Hand Placed Fogs: This needs to be enabled for most of our islands as you can’t place the specific fog points without this enabled. For small cay islands or islands where we do not want the specific points placed keep this disabled as it will be a little cheaper without.

BP_FogBlutility:

../_images/BPBlutilityOptions.jpg

The Fog Blutility actor is pretty straight forward, just need to place it and set the below setting. It does not matter where this actor is located in the world as long as it is in the farthest sublevel with the other fog actors.

  • Fog Reference: Connect this option to your Volumetric fog master actor to ensure it updates in real-time within editor.

BP_FogPoints

../_images/FogPointOptions.jpg
  • Fog Radius: Total radius that you want this fog point to render fog. Will be visualized in level by a green sphere.
  • Fog Density: Overall density value used by this fog point. Will be used on top of the day/night values.
  • Day Fog Density: Adjusts the fog density of this actor only during day time hours. Day/Night values blend between each other during early morning/late evening hours.
  • Night Fog Density: Adjusts the fog density of this actor only during night time hours. Day/Night values blend between each other during early morning/late evening hours.

Performance

Every 4th BP_FogPoints actor you place increases the cost of the system. So if you are using a number not divisible by 4 you probably have a few more points you can use. For instance, if you are using 6 fogpoints you can use 2 more free of charge without increasing the cost. While every 4th fog point actor does increase the cost slightly the fog system has an overall flat cost outside of that. Increasing the scale of these or overlapping them will not increase the cost.

Final Notes

../_images/FogTimeTransitions.jpg

When finalizing the fog passes for each level it is always a good practice to check that the values seem good at various times of day (Especially during the transitional times) as they do dynamically update to be different from day to night. In the Matinee_MasterDayCycle within the persistent map the night to day transition for fog starts at 28 and will be fully considered day at 36. The Day to night transition starts at 95 and will be considered fully night at 105.