Main water system in Unreal

Basic commands in editor

The dynamic water system on land is programmed as a blueprint.
BP_Watersystem contains both the logic and the assets of the water system. The backbone of the BP_Watersystem is a spline with points. The points represent a change in the water system, for example: input discharge, different structure (pipe, channel, weir..), different dimension. So each point (=Node) is connected with the database WaterSystemData. So in between 2 points (=branch) of the backbone spline, everything is the same, based on the information of the downstream point.. Spline and point represent the bedlevel of the structure.
Index 0 spline is downstream

Al the programming is done in the so called construction script. This is a cool feature of Unreal Engine.  Al programmed calculations can be done in the editor. It is for example not necessary to run the game, to see what waterlevels will occur. They are already calculated in the editor.

Formulas used for calculation water levels

Some general Notes:

  • The basis of the watersystem is a spline. Between 2 nodes the structure is the same. The location of the spline is the bedlevel.
  • BP_Watersystem is one line with no branches and has a fixed direction of flow.
  • A dendritic system is possible, because the 3D world may contain different BP_Watersystems which are connected at points. When calculation a dendritic system the sequence of making calculations is important.
  • Strategy for calculating the water-system.We assume a stationary flow. So new calculations are only made when changes are made to the water-system. In the future calculations will be made per time-step and change in storage will also be taken into account.
    Link to page with formulas used
  • To get access to the information, or to change information menu are used.
    Link to page Navigation
  • Internal Unreal uses centimeters, the BP_watersystem uses m
  • Backbone of BP_Watersystems is the WaterDataStruct which stores all data (also calculated data) for each branch.

Connect side branches

  • Information on side branch is stored in [ConnectionLeft] and/or [ConnectionRight]
  • In FD_GameMode: FD_WaterSystemsref and FD_WatersystemName. Note This does not work in constructionscript ? So it should be a separate function in the constructionscript.
  • New function Find_Side_Branches
  • Changed variable InputDischarge to a 2dvector. x = de input branch, y is the input from sidebranches

Design Manhole

  • Is not a separate branch, but is generated when 2 culvert pipes branches connect.
  • The check is made for the first pipe. Is the second branch also a pipe.
    So for the first pipe it is the “next point index”
  • Switch to add manhole is :
    When diameter pipes is different, manhole is added automatically
    When diameter pipes is the same, the following switch is used.
    Slope X = 0 add manhole, Slope X = 1 no manhole  
  • Manhole is always a rectangle, with max 4 pipes connected.  So 2 other BP_watersytems could be connected to the manhole.
  • Alle dimensions in m
  • When function manhole is activated the following information is defined:
    – bedlevel, based on 4 connections
    – D1, D2 (left), D3, D4(right)
    – Width manhole based on D1 and D4.  Width = Max D1 / D3 + 0,6 m
    – Length manhole based on D2 en D4. Length = Max D2 / D4 + 0,6 m
    – Length manhole / 2 = reduction length (m)
    – Surfacelevel is de highest surfacelevelworld of the 4 connections
  • Manhole is activated before the pipe is drawn. This because the reduction length
  • In de first version, side connections is not taken into account.
  • Information from the array is also necessary for the Reduction Length for ending and starting pipe.

Design weir

  • Exists of 3 parts, left – middle (=crest) – left
  • Width_Diameter_m.x = width weir.
  • Width_Diameter_m.y = width sides

Blueprints used:

Share Button



Share Button



Share Button



Share Button

Underwater life




Share Button





Share Button


Tutorial for water,,/jE1ZcsXKLFlNoVdlsbPWevmjkyOPe4q8sr9xDOSp1N073AVtZvnJPgz9jdJSCJskYKSaGAwRHplijRtZDuWHMYlOt-BYXw7tVTDrv7XVZNBLaJ5j9ctu9pyR8loB-826oFHUJ0oCS2ZYUgKua4wJlxTpAZkMVimE1irJIbQozSE7sqUx-6SZUbGAyUSlzUvR3WWaEH9Y6M2a8FS9OpJuseA26xIKzn4AS7PU6hvwyosXoxwS2-BNtB088qpGK-c42SSdUhKy9K3VVvx-eL6bwczGkvwfRxYnuo4ETFznGEGBLJ6iTwVHwxLcnjkMBQp3EgZ4J-1-t0CHi0l0Q980UiSMnB0WlHsU7_p_37CqhyCgXFrYEnHutiON3BmUJJUw-lfLlvQ5z3M,


  • Project settings / rendering /  lighting : Generate Mesch Distance Fields should be enabeld.
  • Distance field does not work with skeleton, so you need to put a cilinder at the character.

Share Button


List of the different water-systems on the island.  Wil be used for the instructural design, design island and assets

First attempt to build a water system in Unreal

  1. Waves at sea
  2. Tide at sea
  3. Currents at sea
    Erosion of beach
  4. Culvert at dike
    To discharge water from island to sea
  5. Pumping station with pipes
    To discharge water from island to sea
  6. Rainfall
    Is main source for supply of freshwater on the island
  7. Seepage
    From island to sea.
    From sea to groundwater.
  8. Groundwater
  9. Drainage pipes
  10. Ditches
    Discharge water to Pumping-station of culvert at dike
  11. Weirs
    To control waterlevel ditch
  12. Culvert in ditch
    When ditch has to cross road
  13. Lakes / surface water
    For storage of surplus of rainfall
  14. Sewer pipe
  15. Infiltration
    Infiltration sewer, Wadi, infiltration box, infiltration box
  16. Storage settling basin (BBB)
Share Button


I bougth the Procedural Nature Pack Vol.1

Tutorials for the nature Pack

There is also the free Open World Demo Collection


Share Button

Fluid Dynamics Formulas

Formulas used in the Virtual World. For more theory 
General assumptions:

  1. Flow is turbulent.
    So formulas of Manning, Chezy and Darcy-Weisbach can be used.
  2. Flow is sub-critical.
    So calculations of water-levels start downstream and goes upstream.
  3. Flow is steady
    Discharge is not changing rapidly. Of-course over time discharge (and thus water-levels etc) can change.
  4. Sea is salt water, on the island fresh water
  5. There are two main watersystems. The watersystem on the island and the sea (waves, tide, current). The connection between the two are by the culvert in the dike and seepage. High tide in combination with low water level on the island could make water flow from sea to the island. High tide can cause seepage to the land, low tide seepage to sea. Maybe in high tide in combination with big waves can cause water flowing over the dike to the island.
  6. Water enters the systeem by: rainfall and seepage.
  7. Water leaves the island through : Culvert in dike, pumping station, seepage and evapotranspiration.
  8. System is dendritic.
    So water has one direction to flow.

Calculations in FD_watersystems

  • For each branch waterlevel (ylevel) and Energylevel (Hlevel) are calculated at the beginning and end of the branch.
  • The Hlevel downstreams is transferred from the Hlevel upstreams branch downstreams. The ylevels are calculated with the dimensions from the branch. So it could be that ylevels between 2 branches are not the same? When drawing the yline, a transition between the 2 y levels has to be made.
  • For connector you have different width and slope downstream and upstream!!
  • CulvertRectangle: If downstreams  waterdepth < Height culvert : Type is converted to Trapezium. Note: With high velocities, water level will rise and the type maybe should be concerted back to culvertrectangle. This can be solved by using several extra points.
  • Water level at weir. 
  • In a branch (between 2 points) discharge is always the same. 
  • Normally HlevelWorld_m. x = HlevelWorld_m.y downstream branch. Except with a weir.
  • At a point with InputDischarge, the waterlevel will drop because the increase of velocityhead. If this happens very suddenly is looks odd. Solution is to add 1 or more extra point downstream of a point with InputDischarge. So the full velocityhead is taken into account at the point downstream of the pint where InputDischarge occurs.
  • 2 special branches when calculating. First is the outflow: Discharge = 0. Value in InputDischarge.x is the velocity in the receiving water. Second is the weir : There is a jump in HlevelWorld compared to the downstream waterlevel.
  • Weir is always assumed as free flow.  And as a short crest. Waterlevel .x and .y are the same.

Workflow calculation

In the case of type = trapezium

  1.  HlevelWorld_m.x = HlevelWorld.y previous branch
  2. yLevelWorld_m.x = yLevelWorld.y previous branch 
  3. Get Discharge from point upstreams
  4. Calculate Depth_m.x ,WettedArea.x, WetterPerimeter.x, HydraulicRadius.x, Velocity.x
  5. Calculate Hslope, dH, Time
  6. HlevelWorld_m.y = HlevelWord_m.x + dH
    ylevelWorld_m.y = yLevelWorld,x + dH
  7. Calculate Depth_m.y ,WettedArea.y, Velocity.y, VelocityHead
    ylevelWorld_m.y= HLevelWorld_m.y – VelocityHead
  1. Outflow down-streams is calculated separate
  2. Check if branch is weir. If weir calculate H above weir, convert to HlevelWorld_m.x = HlevelWorld.y.  yLevelWorld_m = CrestlevelLevelWorld_m + 2/3 * H.
  3. If branch is not weir
  4. If branch = connector; calculate average width and average slope
  5. Calculate Depth_m.x ,WettedArea.x, WetterPerimeter.x, HydraulicRadius.x, Velocity.x
  6. Calculate Hslope, dH, Time
  7. HlevelWorld_m.y = HlevelWord_m.x + dH
  8. ylevelWorld_m.y = yLevelWorld,x + dH
  9. Calculate Depth_m.y ,WettedArea.y, Velocity.y, VelocityHead
  10. ylevelWorld_m.y= HLevelWorld_m.y – VelocityHead


Area pipe

Chezy coefficient
Chezy energy slope

Manning energy slope
Slope energy line
Sharp crest free flow
Partially filled pipes
Share Button