The Water plugin is a collection of modeling and rendering tools that utilize spline-based workflows to create a unified water editing experience. It features a combined shading and rendering pipeline, as well as surface meshing that automatically supports gameplay physics and fluid simulation. With the Water tools, you can quickly create oceans, rivers, lakes, and custom water bodies using an iterative process that does not require much manual setup.
Enabling and Using Water
To use the Water Modeling Tools, you must first enable the Water plugin. Click Edit > Plugins to open the Plugins window, then navigate to the Built-In > Water category and enable the Water plugin. You may need to restart your editor.
Water Tool Features
The Water toolset has several features that supports the creation and editing of water bodies in a large, open world.
Water Body Actors and Spline-based Tools
Working with Water Body Actors introduces a spline-based workflow that emphasizes iterative design and ease of use. These Actors represent rivers, lakes, oceans, and other types of water that can be placed in your level.
Since Water Body Actors are Actors created using splines, they have the following features:
Move, rotate, scale, and duplicate using the same behaviors you are used to using with Actors.
Create new spline points using Alt + drag
Adjust water speed, depth, and audio features per point.
Access a context sensitive menu for each spline point and enable visualizers for adjusting water properties on the fly.
Automatically interact with your Landscape using non-destructive Landscape Edit Layers feature of the existing Landmass plugin.
Gerstner Waves
The Water plugin feature a highly customizable Gerstner Wave simulation built into lakes and oceans capable of creating simple or complex wave surfaces. Each water body has its own set of wave parameters. You can save these to each Actor or separately as a Water Wave Asset. These assets make it easy to apply the same wave simulation settings to multiple water bodies and create visual parity across an area or level.
Fluid Simulation and Gameplay Physics
The Fluid Simulation tool is capable of interacting with characters, vehicles, and weapons. This adds to the realism and feel of the world by creating ripples, splashing, and foam effects:
Forces are applied to the fluid simulation using force impulses that are controlled on a per Actor basis. For example, players and vehicles can apply force to fluid sim as they pass through the water, projectiles can create splashes, and Ripples can reflect off the shoreline and be affected by river flow maps.
Water Mesh Actor
All Ocean, Lake, and River water bodies are rendered using a single Water Mesh Actor. This special Actor automatically generates the needed mesh for each water body in a level based on their splines, so that overlapping water body Actors share the same mesh and water flows seamlessly across the transition.
Level of detail is handled using a quadtree structure and traversing it each frame to generate an optimized set of visible tiles, collapsing per LOD level. Here is an example of the concept shown using an 8 x 8 grid:
Here is an example of the concept in-game:
The Water Mesh Actor can be controlled by selecting it in the editor via the World Outliner and adjusting the properties in the Mesh section of the Details panel:
Setting |
Description |
---|---|
Force Collapse Density Level |
Density level at which a tile is allowed to force collapse even if not all leaf nodes in the subtree are present.
|
Tile Size |
Determines the world size of a leaf tile (smallest possible tile) in both X and Y. |
Extent in Tiles |
Number of tiles in X and Y on which water tiles are generated. |
Tessellation Factor |
Max tessellation factor for a water tile grid. For example, the max value represents the tiles at LOD 0. This is the most dense the grid will be. Increasing this setting will negatively impact performance. |
LOD Scale |
Scales the LOD ranges, either pulling them in to have less dense tiles appear closer to the observer, or pushing them out to have more dense tiles further out. Increasing this setting will negatively impact performance. |
Far Distance Material |
When this material is set, a simple skirt mesh generated around the Water Mesh Component tile area. |
Far Distance Mesh Extent |
How far from the edge of the Water Mesh Actor the generated Far Distance Mesh extends. |
Rendering Features
The water rendering pipeline contains several properties for customizing the look and feel of your water:
Underwater Post Process material that is applied based on the location of the camera to allow for partial and full submersion in a water body. This post process material can be adjusted via a property on each Actor allowing for variation between water bodies.
Specified transitions between rivers and other water bodies that are material driven. Transition materials can be specified on each river Actor to automatically be assigned to transitions between rivers and lakes, and rivers and oceans.
Caustics generation tools that you can use to define and render your own custom caustic material, which can be applied to shallow water surfaces. A custom level setup is used to adjust the properties of a water body. Once you have achieved your desired result, a custom editor-only class takes the resulting caustics animation and renders it to a texture. This is saved for use with other water bodies in the Water/Caustics folder of your project.
Water Bodies
Ocean
Oceans use a closed loop spline to shape your Landscape and generate a main island. It will then fill the rest of the Water Mesh Actor with with water:
The spline is limited to having all points at the same height. The ocean can be extended to the horizon using a Far Mesh Material defined on the Water Mesh Actor.
Lake
A Lake is a smaller water body that also uses a closed loop spline. This forms the lake and carves out the Landscape beneath it:
Similar to the ocean, the lake spline must have all points that are the same height. Lakes do not support being tilted.
River
Rivers are water bodies that utilize a long, open spline with start and end points. They act as connectors between lakes and oceans:
You can add more points to the spline to lengthen the river and points can have varying heights, and you can adjust water properties at each point. The spline will carve the landscape according to its path and properties. Rivers use the velocity at each point to write to a flow map which drives the flow visuals of the surface. Transition materials are set on river Actors to automatically be assigned to transition areas between rivers and lakes and rivers and oceans.
Custom
A Custom water body uses a user-provided mesh and material which has support for adding data using a spline. It has support for Water Waves, as well as underwater post processing. This can be used for a variety of water bodies, such as a swimming pool or large fountain, or to implement waterfalls. They are not rendered using the Water Mesh Actor, nor do they affect the landscape.
Water Body Island Actor
Though not a true water body, this Actor creates islands based on a spline, similar to the lake water body actor and with similar landscape carving controls. Its purpose is to affect the landscape underneath it and ensure a given piece of land is always above water, their landscape interactions are applied after all other water bodies.
Additional Resources
Building Worlds in ‘Fortnite' With Unreal Engine | Unreal Fest Online 2020:
4.26 Water And Volumetrics Preview | Inside Unreal: