Introduction
- Category: Blueprints
- Update: 1.1 (19-05-2022)
- Unreal Engine: 4.26 - 5.0
- Platforms: PC, Console
The Fluid Flux is a powerful water system based on 2D shallow-water fluid simulations.
Features
- Realtime shallow water simulation – fluid data modifiers, wave generator, and extendable interface
- Fluid surface rendering – caustics, wetness, underwater, waterline, advected foam, advected waves, blending with the ocean, dynamic audio detection
- Fluid Interaction – simple cheap ripple solver moving with character, optimized to an absolute minimum
- Ocean wave blending – rendering tillable ocean heightmap texture in a single pass
- Niagara environment interaction – High-quality effects, bouncy, plants, character swimming, boats,
- Clean, efficient, GPU-friendly implementation, interface designed with the KISS (Keep It Simple, Stupid) rule in mind
- Small, compact, and low memory footprint
- Tool for generating ultra-fast static meshes with flow maps baked into vertex color.
- Advanced fluid state management, loading state in gameplay.
- Niagara fluid async readback system for sampling height and flow of fluid in blueprints.
- Dynamic audio analyzer. The sound source is positioned based on fluid movement.
- Four example maps – beach, island, river, and baked static river
- Velocity-based fluid flow advection method for foam caustics and waves
Limitations
With great power comes great responsibility. I’m trying to be a reliable marketplace creator so it is important for me to be clear about the limitations and disadvantages of using simulations. The Fluid Flux system is overhyped so please read the description below before you buy this product and make sure that everything meets your expectations and requirements:
- In general, I can’t solve every possible water problem in every possible type of project. The Fluid Flux is a huge step forward for the game industry but also makes everything harder. Simulations can be hard to control and tweak, sometimes a single parameter can change the flow of fluid on an entire map.
- The Fluid Flux simulation is based on the Shallow Water Equations (SWE) solver, the algorithm was published by Matthias Müller in “Real-time Simulation of Large Bodies of Water with Small Scale Details”. Simulation is calculated on heightfield mesh which means all obstacles are rendered to heightmap with top-down projection. Fluid can’t be simulated in caves and multilayered.
- Scalability is a real problem. The simulation requires allocating floating-point render targets so the maximum recommended resolution of texture is 1024×1024. That means if 1 pixel represents 100 cm in real-world (very low quality) then your simulation area can cover approximately 1km x 1km square with low detailed water. It’s not that much but still useful. The simulation frame can be baked to static mesh and used as mesh placed on the level.
- Multiplayer is not supported for dynamic simulation because synchronization of render targets is limited. However, the system can be used in a multiplayer game as long as your gameplay is not dependent on fluid simulation results.
- The geometry of fluid is rendered using a static mesh plane displaced by fluid height. The system uses a huge plane (1024×1024) for rendering the water surface without any dynamic tesselation. This method has a lot of quality flaws.
- Statically generated LOD mesh can be inconsistent with waterline post-process this issue will be addressed in the future.
- Water Plugin is not supported in the current version. It is possible to use my water material with the water plugin mesh but it is not officially supported.
- Niagara fluid readback system returns results with one frame delay. It’s good enough for most features like swimming water detection etc.
- My support time is very limited. It’s an early version of this product, be aware that there will be multiple updates that will improve the quality and efficiency. The project is enormously big and complicated, simulations can be unpredictable – sorry for all the problems and bugs. I’m ready to help in case of problems contact me on Discord or by e-mail.
- The documentation is incomplete in some areas yet. I was pushed to release as soon as possible and could not find enough time to prepare many simple examples. The Fluid Flux system is clean and elegant but blueprints reading skill, and example code analysis is required to use.
- The simulation area can’t be rotated. The product supports only axis-aligned rectangular volume.
- The simulation area can’t be moved in runtime. Movable volume is one of the most important features for future updates.
- Trace hits with dynamic fluids are not supported now.
- The system also does not support the wave break effect because this approximation of fluid does not contain the needed data to render it.
- Underwater glass, holes, and the submarine view are not supported.
Good and bad practices
- Try to avoid using huge simulation resolution because you will run out of memory very fast, 1024×1024 seems like a good compromise for now.
- Don’t make your gameplay rely on fluid simulation in multiplayer because it can’t be synchronized.
- Avoid using Fluid Flux on flat surfaces, subtle slopes are always better.
- Avoid hard-edged geometry (boxes) it can be approximated wrongly in heightmap and large slopes sometimes look terrible
- Try to not overestimate this system, if I didn’t prepare the ocean with ships and a huge island covered by rivers and simulated lakes then there is probably some reason for that.
- Try to not update the simulation ground in every frame it can cost you a lot of performance.
Questions & Answers
- Unreal Engine 5 support?
The Fluid Flux was created and tested on Unreal Engine 4.26. Unreal Engine 5 is in an early stage of development. The product can be used with this newest version of the engine but I can’t support engine-related bugs and all differences between UE4 and UE5. Please read the “Known issues” chapter to make sure that you are aware of the most common issues that you may encounter. - Why is the price so high? Could you do some promotion?
- Creating a Fluid Flux pack took me over 20+ months of work during nights. Normally this kind of system would cost the company at least $150 000 so it is a huge shortcut for everyone.
- The subscription for all future updates and support is included in the price. This kind of system requires a lot of support. The engine updates make it even harder. It is not the only product on my marketplace profile so my time is very limited right now. I quit my job to focus on this project and I will probably have to hire someone.
- The product is a combination of multiple big features that are designed to work together and it can make your development easier. You don’t have to buy multiple products and work on merging them together: ripple solver simulation, shallow water fluid simulation, water surface rendering, ocean waves generator, buoyancy, waterline, post-process, and Niagara particle support. I did it for you.
- Take a look at my marketplace profile and make sure I am a trustworthy creator with hundreds of positive reviews. The price is always calculated on the real work and time that I need to put into my products. Someday you will realize that time is a real currency that is worth something in this world.
- There will be a promotional sale but first I need to feel that I am ready to support more customers. If you are not in rush then just add my product to the wishlist and be patient. If you want to be notified a few days earlier about a planned promotional sale then join my Discord server 🙂
- I’m not forcing anyone to buy my product. There are alternatives like Niagara Fluids, and Water Plugin, you can try them for free and compare results with my demo, maybe you don’t even need the Fluid Flux.
- Can it be used in my open-world game?
The open-world setup was not tested yet. The demo examples are showing how the system can be used. I can’t promise anything more at this point of development. Just assume that you get what you see in my videos no more no less. - Does it support multiplayer/replication?
Unfortunately, multiplayer is not supported. The Fluid Flux can be used in multiplayer games only as visual addition and should not affect gameplay. There are many reasons:- Technical limitations. Fluid Flux uses Niagara readback for sampling wave data (it’s the only way to read from GPU). Niagara is not working on the server.
- Bandwidth limitations. There is too much data changing dynamically so simulation can’t be synchronized over the internet. Everything would break very fast without correcting the differences between a server and a client.
- Human limitations. I am not a multiplayer programmer so it’s even harder for me to jump into it and find reasonable workarounds.
- External packs integrations ALS/UDS/Fluid Ninja
I am planning to work on some integrations in the future. If you have some specific pack in mind let me know. - Can I use it with Voxel Plugin?
Yes, you can use Fluid Flux with Voxel Plugin but it is also limited to heightfield projection so caves and planets are not supported.
Use Simulation.RuntimeCaptureDelay = 1.0 to force simulation to wait for the voxel plugin map to generate mesh before rendering it to the height map.
The heightmap in this presentation is updated every frame using CaptureGroundHeightmap. It is not very efficient and should be probably optimized to only update the area around the brush when something changes on the map. The UpdateGroundMap(Position, Size) function would be a better choice in this case. - What about VR and mobile?
The VR devices and mobile are currently not supported by me.
Dynamic fluid simulations with high precision can’t be calculated on mobile so only baked meshes/states can be used on this platform. I am planning to add VR and mobile support in future updates. The pack will receive a cheap surface material mode similar to the solution presented in Aquatic Surface. One user notified me that my demo maps are working without issues on Oculus Quest 2 but I did not test it yet so I can’t confirm it. - How to add swimming to ALS? Can you show me?
This task is on your side. The Fluid Flux BP_FluxDataComponent) can give you all data that you need to implement swimming. I’ve also prepared an example swimming implementation (BP_FluxSwimmingComponent) for testing. - Should I change to Fluid Flux? Is it better than WaterPlugin/Oceanology or Aquatic Surface?
It depends on what requirements you have. The Fluid Flux is good at creating a dynamic river simulation on heightfields, and interactive scenes but does not scale very well so if you need just a background ocean then you should not bother using simulations. Play the demo of the Fluid Flux and decide if this is what you want. - Why blueprints? It is slow because of that?
This system is fully implemented in blueprints but relies mainly on GPU (shaders/render targets). The cost of c++ implementation would be similar in typical conditions. The cost of blueprints will be reduced by Niagara implementations in the future so it will work even better. The user interface and lack of tessellated fluid surface is a bigger problem with blueprints but I will also work on solving that. - Is fluid flux calculated deterministically?
If you run a simulation on the same machine it is deterministic (constant delta time is used) but there are probably differences between floating-point operations on different GPUs so it can’t be fully deterministic. In multiplayer the biggest problem is the synchronization of state when someone joins the game and when the player loses some frames because of spikes and the simulation can’t work it off – I’ve decided to limit the number of accumulated iterations per frame in this case. - Do I need this pack? Other water systems like your Aquatic Surface can do the same.
Well, if you can’t see the difference then probably you don’t need the Fluid Flux. I’ve prepared a simple comparison of Fluid Flux and Aquatic Surface that visualizes the difference:
That does not mean Aquatic Surface is bad. It’s a great product with a completely different feature list. You have to choose a product that fits your requirements. - Is it efficient?
It depends on GPU, resolution, etc. You can download the demo and try it yourself there is an FPS counter on the screen.
GPU River map Island map RTX 3080 (2560×1440) 320-380 FPS 260-310 FPS RTX 2080 (2560×1440) 160-200 FPS 110-160 FPS 8 yeras old notebook Lenovo Y50: (1920×1080) 25-30 FPS 20-25 FPS - What about the future of this project?
I’m planning a lot of updates, more optimizations, and moving implementation to Niagara.
https://trello.com/b/NBN93cSo/fluidflux-roadmap
Reporting Bugs
The code that doesn’t exist is the code you don’t need to debug. I am trying to do my best and solve all possible bugs or find good workarounds but there is always something that can be broken it’s like a typical lifetime of applications nowadays.
Simulations can be unpredictable some edge cases are probably still not handled. In case of finding some specific bug, you can rep[ort it to me and I will take a look at it in a few days. Before sending the report:
- make sure that you use the newest version of my pack.
- prepare a detailed explanation of the repro steps needed to recreate your bug, and make sure that the explanation is as clear as possible.
- information about the engine version you use, and your development platform.
- create a minimal example project that can show me the bug (it will increase the chance of fixing it)
- prepare a video or screenshots presenting the problem and reproduction steps.
Now you can report this bug by sending an e-mail at krystian.komisare@gmail.com.
Known issues
- Meshes with dithering enabled can not be cached by ground capture. There is a workaround for this problem presented in the M_Photoscan_Master material.
- Currently, known issues that exist only on UE5+:
- In some configurations of UE5 reflections can flicker on rivers. It’s somehow related to the reflection capture actor but I was not able to find the reason why. Removing box capture helped once but some users still experience this bug. If you will find the answer then please let me know.
- The audio parameters are not working on UE5 (will be fixed in 5.0.2) so Fluid Flux uses a workaround that is switching between under-fluid and over-water fluid waves instead of soft blending.
- It seems like construction scripts are working differently when the level is loading during the editor start in UE5.1.Render targets are not initializing properly because of that. If you will see that something is not loaded then just reopen the map/restart the simulation and everything will work fine again – sorry for that.
- Plants will not load properly on the map if you are not in “Real-Time” render mode in the editor. Its limitation of blueprints I don’t have any event that could execute afterload and adjust Niagara effects.
- “Real-Time” render mode is also required to simulate in the editor. Otherwise, the view will not refresh after each frame.
Planned improvements
The current status of improvements can be followed on Trello.
- Surface mesh – better water surface. Currently, it uses dense planar mesh but in the final stage, the mesh will be dynamically tessellated.
- Scalability – Large-scale simulations locally updated with the moving areas are in my plans.
- Niagara fluids – the system will be rewritten to Niagara fluids when it will be stable and ready for this.
- Audio detection – the current system uses an ambient audio source and a simple dynamic source I am planning to improve to three dynamic sources of audio that works at a different distance.
- Simulation volume – movable simulation area and working with multiple simulations a the same time.
- Alternative material modes – path tracing and stylized water
Documentation
Getting started
This section covers the fundamentals of Fluid Flux and its tools. If you are new to Unreal Engine, you should become familiar with the Unreal Editor interface, Blueprint visual scripting, and the types of content. Working according to the documentation can provide the best possible experience with this product.
Project configuration
The Fluid Flux pack requires enabling a few basic plugins and TPP input config for testing the character. The package is an asset pack so it can be downloaded directly to the project. The package can be added to any project using Epic Launcher but users also can use an empty project compatible with UE4.26 configurated by me that can be downloaded from the link: FluidFlux_Template.
A list of plugins that needs to be enabled can be found below:
- Editor Scripting Utilities
- Niagara
- Procedural mesh Component
- Asset Tags (optional)
The first place to visit in the demo folder is Demo/Maps. This folder contains all example maps that are working perfectly with the TPP example character (BP_DemoCharacter). If the project uses another character template then probably input should be changed to make it work. Input config can be downloaded from this link: DefaultInput
Make sure that DBuffer is enabled in your project settings because it’s required for proper decal (wetness and caustics) rendering. If you don’t want to use those effects then you can disable decal material in the surface actor.
Project structure
The Fluid Flux project is organized in a certain way, this short description will bring you closer to what kind of content can be found in each folder.
- Demo – The demo is the most important folder for new users. The demo examples present how to use this pack, how effects can be achieved, and how to integrate systems with characters. Everything that can’t be found in this documentation probably will be presented in a very clean way in the demo folder.
- Editor – editor-related tools, icons, utilities, procedural mesh generator
- Simulation – Shallow water simulation actor and tools for controlling fluids and generating state.
- Interaction – Simple system of interactions that adds detailed lightweight ripple fluid simulations.
- Surface – Presenting the simulated fluid renders surface, underwater volume, post-process, caustics, and audio and combines everything together.
- Environment – Niagara particle systems that allow readback pieces of information from simulation implementing swimming, buoyancy, and drive particles using fluid state.
- Waves – a system designed for generating ocean waves that can be used in the background and mixed with fluid simulation. Before starting work with the pack it’s worth being familiar with the structure of the pack and the systems that it provides.
Updating process
The current newest version is described on the marketplace page and on top of the documentation. Frequent updates of Fluid Flux are planned so always make sure that the Fluid Flux package version is up to date but be aware of potential problems when updating.
Changes that can be made during updates:
- fixing bugs
- adding features and examples
- removing/renaming files
- improving quality and exposing parameters
I am always trying to minimalize the damage after the update however it is not an easy task when an update system on the marketplace supports only adding or replacing files. There are a few basic rules worth noticing before updating:
- It’s better to have some backup. Copy your version of the pack before doing the update,
- Remove the pack from the project before updating it. This way you will get a clean, and fresh version of the pack without any ghost files.
- Do not modify the pack on your own. If you need modifications then you can inherit classes/materials and override functions. Store child classes and custom material instances outside the Fluid Flux folder.
- If you need some small trivial modification that could improve usability then you can let me know we will figure out some solution maybe put it into the next update.
Simulation system
The BP_FluxSimulation blueprint is the heart of the Fluid Flux system. Basically, this blueprint is responsible for handling important tasks like:
- Rendering of the ground heightmap to texture.
- Updating simulation of shallow water fluid, foam, and wetness.
- Baking and exporting simulation state.
- Sending data to the fluid surface renderer.
The Shallow Water simulation is based on the idea of assuming linear vertical pressure profiles so it is simulated in two dimensions. In general, the algorithm can be described in a few steps:
- Simulation data is stored on 2D render targets.
Ground map – information about landscape and obstacles
Velocity (RG) Depth(B) Foam(A) map – stores information about fluid
Height(R) Wetness(G) map – stores surface height and wetness of the surface - The slope of the ground heightfield and the slope of fluid is combined and used for calculating the pressure and velocity.
- Simulation is an interactive process of updating fluid height and velocity.
- The result of integration is used for foam and velocity advection.
- Fluid modifiers can be used as input for simulation to change the current state.
- The simulation frame is used for accumulating fluid wetness and generating the fluid surface mesh displacement.
The BP_FluxSimulation actor placed on the map is doing nothing because it’s empty and needs to be filled with fluid. It is the simplest way to fill containers with fluid is by adding a Modifier source actor.
If the “Pixel Depth Offset” feature is used in the material then it may be not rendered to a ground map and cause some simulation problems. In this case, the best option is to use MF_FluxPixelDepthOffset material node that will automatically disable “PixelDepthOffset” during the process of caching the ground map. The M_Photoscan_Master material is an example of a workaround for this problem with the use of the MF_FluxPixelDepthOffset node.
Real-time simulation
Before starting to simulate the fluid on your level make sure that Real-time rendering is active in your viewport options.
Modifier Component
A modifier component is a powerful tool that affects the simulation state and changes the current simulation state. It’s the simplest way to interact with the simulation. Modifiers can be used for:
- Adding/removing fluid in the simulation domain.
- Changing the velocity and flow direction of the fluid
- Simulating custom interaction with fluid
- Generating waves
The tutorial below is presenting how to add a source modifier on the scene and fill the simulation domain with fluid:
The Fluid Flux contains predefined modifiers:
- BP_FluxModifierComponent – Base parent class for all fluid modifiers. Every modifier component extends it and implements specific behavior. Users can create custom modifier classes and materials for specific use cases like whirlpools/waves. Describing the architecture is outside of the documentation scope, the BP_FluxModifierSourceComponent component is a good example of a modifier that can be used as a starting point for learning how the system is designed.
- BP_FluxModifierSourceComponent – Simple modifier that allows adding/removing fluid and changing velocity in a specific area.
Parameters Volume The quantity of fluid applied by modifier (depending on Mode). Velocity The velocity of fluid applied by the modifier (depending on Mode). Shape The shape of the fluid modifier Mode Defines how the modifier is applied to the simulation. All modifiers are rendered to a simulation buffer. Mode is a method of blending used during this process.
Add – This mode will add the ‘volume’ of fluid and its velocity to the current fluid on the map.
Adjust – adjusting the current state of fluid to the height of the modifier.
Set – will set the constant height of fluid in the area.Edge The softness/hardness of the modifier edge. Useful for soft mixing with fluid or uniform filling the vessel. Intensity Scale the effect of the modifier on the domain (0.0, 1.0>. Duration Defines long the fluid source will be active. (less than 0 means infinite), (0 Rendered in a single frame and then modifier will be disabled), (more than 0 is a number of seconds) SortPriority Affecting an order of modifiers in the queue. It may be useful when the user needs to fill the domain and then remove some fluid. A value larger than 1000 forces the system to add on the end without sorting. AutoActivate The modifier can be inactive at the beginning and activated by an event from gameplay or a sequencer. There are many ways to remove fluid from simulation domain. It depends on mode you choose:
Mode=Set, Volume=0 //This will set 0 water in the area of the modifier
Mode= Adjust, modifier on a specific position // never allow to add more fluid Mode=Add, Volume negative // slowly removes fluid - BP_FluxModifierGerstnerComponent – Generates waves/fluid on borders of the simulation domain. More info and use cases can be found in the chapters related to ocean configuration.
- BP_FluxModifierForceComponent – Generates forces when the actor is moving (based on the velocity). Can be added to the character.
Modifier Container
The modifier container is a special type of actor that can store multiple modifiers and send them to the simulation. If the actor implements the BPI_FluxModifierContainer interface then it’s considered a modifier container.
BPI_FluxModifierContainer interface can be implemented by any actor. A good example is BP_DemoCharacter that uses BP_FluxModifierForceComponent to interact with a fluid. AddModiffiers function only needs to be implemented to make it work.
BP_FluxModifierContainerActor is a basic container that can combine multiple modifier components in a single actor that works simultaneously.
BP_FluxModifierSourceActor is a specific type of container actor that simplifies the process of adding simple source modifiers to the scene.
Every modifier is rendered in an additional render target pass, so it’s not cheap. It’s good practice to minimalize the number of fluid modifiers inside the simulation for achieving the best possible performance.
Known issues
Sometimes simulation can behave unexpectedly because of stability loss on high slopes. It’s a well-known issue, it can be fixed by adjusting a few parameters and making the simulation more reliable.

- Slope Scale (Increase)
Increasing this parameter will scale down the height of the scene on Z-axis and make your fluid move slower on slopes. (This parameter will be probably redesigned in the future version for better consistency with the world scale measurements). - Simulation Delta Time (Decrease)
Fluid flux is updating with constant delay time. That means the time that elapsed between two frames of the game is divided by delta time and the result is the number of iterations. In general, more iterations mean less performance. By default, the Simulation Delta Time attribute is set to 0.2, it is not safe in terms of accuracy but can work with the highest performance. - Debug Preview / Debug Hidden In-Game (Debug)
Pay attention to the ground debug preview. If you will spot some red spikes in places where the simulation does not work properly then probably the problem of your ground texture and geometry should be adjusted. - Try to tweak other variables like Slope Clamp, Velocity Clamp, Friction, Damping, Gravity, and even World Pixel Scale can make difference.
I am still experimenting different solutions for this spikes problem and trying to figure out some method to force stability even in bad conditions. You can expect multiple improvements in the future updates.
Ground heightmap
The simulation actor needs to capture the ground to recognize the environment and find slopes for fluid movement calculation. The simulation actor contains settings that allow configuring which objects should be rendered to the ground heightfield.
The Debug preview option is the most important feature here, it is showing a height map that will be used for simulating water on the scene.
It’s noticeable that not every detail will be captured in-ground map probably and the accuracy depends on the simulation resolution scale. The shader used for rendering this preview is coloring lines based on slope and exposes the discontinuity of the ground.
- Green lines – easy to simulate very stable fluid
- Blue lines – Good slope for moving fluid in some direction
- Red lines – can cause some instability if fluid flows on it but good for walls
- White lines – there may be some cave that can expose holes in the fluid mesh.
- Fully red polygons are representing holes and discontinuity in the mesh. It should be eliminated if fluid can flow into this area.
If you will notice that some objects should not be rendered to heightmap you can exclude them and if something is not rendering you can start investigating what is going on without simulating the fluid.
Meshes with enabled dithering can’t be rendered during ground capturing process. There is a workaround for this problem presented in the M_Photoscan_Master material. MF_FluxPixelDepthOffset node is used for disabling dithering on objects that are rendered in top-down flat projection.
Sometimes picking “Hidden Actors” one by one to exclude them from heightfield can be a waste of time. There is an additional tag called “FluxHide” that can be used by actors to hide them automatically.
Dynamic ground
The Fluid Flux uses a static ground map for simulating fluids on it but updating is also allowed from time to time. It’s not a very cheap operation so it should not be done every frame.
The BP_BreakableDam presented in the video can be destroyed when the player hits the trigger. It is a good example of updating the ground after the dynamic object. Take a look at the Break function which is the heart of the dam system.
It evaluates UpdatGroundMap on a simulation actor, which takes the position and the size of the object that will disappear to recreate the ground in this area. You can do the same operation when adding something on your level.
Ground visibility
The ground scene capture component renders the current scene to heightmap texture. Sometimes we need to exclude some actors that should not be fluid blockers. In the Simulation:Ground: Scene tab you can find multiple options that may be helpful to determine meshes should that be visible in the heightmap:
- Use hidden actors for excluding by mesh
- Use hidden class for excluding by actor class
- Use the “FluxHide” tag in actors that should not be rendered.
- Use M_PhantomMesh material to render mesh ONLY during processing ground (invisible in the world) good for imitating soft slopes of waterfalls or just creating an alternative version of ground when the environment is more complicated (like indoor meshes).
Editor
The BP_FluxSimulation blueprint comes with a simple editor that allows simulating the state of the fluid on the map in the editor mode. Simulation can be prepared in the editor baked to state or dynamically updated by the simulation blueprint.
Fluid state
The PDA_FluxSimulationState is a special data asset created especially for storing the current frame of the simulation. The simulation state is the most important structure in the system because:
- It’s dynamically updated by the simulation actor
- Can be saved to a data asset file
- Can be loaded in runtime
- Can be used as a starting point for the simulation
- It delivers data that can be rendered by the surface actor
Example river state and baked textures.
Pay attention to simulation resolution! The “Power of Two” rule is a fundamental necessity due to the way game engines work. You will not be able to export simulation state if it is size is not power of two (128/256/512/1024 etc.)
A short tutorial about generating the fluid states:
The state use case is described below:
-
A dynamic simulation state is automatically created in BP_FluxSimulation.CurrentState actor constructor script. Data stored in it can be easily previewed.
-
If BP_FluxSimulation.SurfaceActorReference is set then actors are communicating together and the state is automatically passed to BP_FluxSurface.SimulationState
-
BP_FluxSimulation.CurrentState can be baked to an asset by clicking the right button on BP_FluxSimulation and choosing Scripted Actions -> Flux Export Simulation.
-
The Baked state can be used as BP_FluxSimulation.InitialState in simulation actor
-
Baked state can be also used BP_FluxSurface.SimulationState after removing/disconnecting the Simulation actor.
Fluid surface
The BP_FluxSurface is responsible for an audiovisual representation of the simulation state data.
The surface actor implements a list of advanced subsystems:
Actor component | Features |
DecalCausticsWet |
|
SurfaceOverMesh |
|
Post-Process |
|
SurfaceUnderMesh |
|
SurfaceProceduralMesh |
|
FluxAudioComponent |
|
Volume Absorption, Volume Scattering |
|
Configuring all those subsystems may take a lot of time, especially hard for new users which is why the package contains predefined surface templates.
The BP_FluxSurface is an abstract base parent class which means it can’t be placed on a level and each template is a child and can be dropped directly on a map.
There are a few basic templates:
- BP_FluxSurface_Water – default water surface, spawned dynamically when the simulation target surface is not specified.
- BP_FluxSurface_River – simple river material and basic underwater post-process, reiver audio
- BP_FluxSurface_Ocean – advanced ocean materials, ocean audio, materials blended with wave actor, underwater mesh, underwater scattering, and absorption volume
Mesh generator
In the tutorial below, we will go through a useful workflow for generating static meshes based on a baked state of the simulation. With this method you can achieve the highest performance, unfortunately, the waterline effect will not correlate very well with static mesh geometry.
- Setting up LOD and padding
- Converting a generated mesh to a static mesh asset
- Preparing material for static meshes
- Using static mesh in Surface actor
Mesh generation tools can be found in the BP_FluxSurface – Procedural Mesh tab.
Switch GenerateProceduralMeshView = true to see a preview of the generated mesh. After choosing this option surface automatically generates static mesh based on the Procedural Mesh tab configuration.
The last step is selecting SurfaceProceduralMesh Component and clicking “Create StaticMesh” which will export the mesh to the static mesh asset.
If SurfaceProceduralMesh is not visible on the list of BP_FluidSurface components then you have to deselect the surface and select it again. It’s working like that because the engine does not refresh the list of components after switching on/off generation mode.
Now you can find your static mesh in the content browser and preview it.
The river is simulated on the map and then converted to static mesh. The velocity flow map still works, mesh can be directly used by the surface actor.
Saving static mesh assets with dynamic material is impossible that is why you will have to clean the material slot in the newly created mesh before saving it. You can also set “static” type of material (MI_River_SurfaceOverStatic .UseFluxState = false) that will allow to preview mesh in editor.
Fluid data like foam and velocity are encoded in vertex color which is why they can use simplified material that does need to sample render targets. MI_River_SurfaceOverStatic is an example configuration of material prepared for static meshes. MI_River_SurfaceOverStatic .UseFluxState = false forces the system to read data from vertex color.
BP_FluxSurface can render static meshes using SurfaceMeshMode=StaticMesh which means the mesh will not be transformed by simulation state scale and geometry will be taken from SurfaceOverMesh component configuration.
Async readback
The Fluid Fluix is using Niagara asynchronous readback events to read data from fluid render targets and pass them to blueprints. The BP_FluxDataComponent is a listener that can receive, update and store fluid data at a certain location.
The Fluid Flux uses this feature in multiple situations:
- buoyancy and floating objects
- automatic dam breaking
- interaction detection
- swimming system
- fluid sound source analyzer
- underwater camera detection
Add BP_FluxDataComponent to your actor and it will automatically detect the fluid surface under the actor. BP_FluxRotatorActor is a good simple example of an actor that can react to fluid.
The Readback data component can be attached to the scene component in the owner actor by adding a tag to it “FluxReadbackOwner“.

Use Debug option in FluxDataComponent to make sure that component is following your actor and sampling proper values.
Interaction system
The BP_FluxInteractionCapture is a system designed for adding detailed ripple simulations on the fluid surfaces as a result of the interaction.
- It’s a perfect addition that can improve the quality of baked simulation almost for free.
- It is currently supporting the simplest fast ripple solver
An example of the interaction system configuration is presented in the BP_DemoCharacter. A detailed description of the implementation can be found below:
- BP_FluxDataComponent – This component is reading the fluid data like height and velocity that can are needed during further calculations of interaction. You can find more info about this component and configuration in the section Async readback.
- BP_FluxInteractionComponent – This component is storing a list of interaction sources. The interaction source is a sphere attached to a component (or skeletal mesh bone) that will generate waves after interacting with fluid.
Configuration of interaction surce atached to l_foot bone. System uses owner skeletal component with tag “FluxInteractionOwner”. - Interaction sources are attached to skeletal mesh with the tag specified in the OwnerComponentTag attribute so it’s important to add this tag (FluxInteractionOwner) to skeletal mesh that will move the interaction sources.
- The BPI_FluxInteraction is the interface that takes care of communication between the actor and the interaction capture system. It should be added in the Class Settings of the actor that will interact.
Player character interfaces - Implement the GetInteractions in BPI_FluxInteraction. When BP_FluxInteractionCapture is an overlapping interactive actor then it’s calling this GetInteractions function to find pieces of information about interactions that occurred.
Simple implementation of GetInteractions function from the BPI_FluxInteraction interface.
There are many steps to do before interaction start working but no worries you can debug and make sure that every part of your implementation works correctly:
1. Test it on demo maps at first
2. Enable DrawDebug in BP_FluxInteractionCapture
3. Enable DebugDraw in BP_FluxDataComponent
4. Enable DebugDraw in BP_FluxInteractionComponent
5. Make sure that “GetInteractions” is evaluated. Put a breakpoint in this function to check.
Interactions with a fluid surface may generate splashes, which add realism and immersion to the simulation. This is achieved through a straightforward mechanism that detects when the interaction source intersects the fluid surface. If this condition is met, a splash effect is created to simulate the disturbance caused by the interaction.

The InteractionComponent->Source->SplashType is defining the index of splash that is indexed is stored in the Surface->InteractionSplashes array.
Niagara integration
The Niagara integration is based on three elements:
- BP_FluxNiagaraActor communicates with the simulation and data to the Niagara system.
- NE_FluxData emitter should be inherited by the Niagara system to read the data.
- NMS_FluxData special module that extracts simulation data to Stage Transients variables that can be used to drive the particles.
All particle systems (trash, plants, splashes) in the pack are constructed the same way, fill free to check the examples and modify them.
Recreating Ocean
Preparing an ocean scene is an advanced topic because it requires multiple actors working together at the same time. It’s good to try all other tutorials before starting to work on recreating the ocean scene.
Examples of setup are presented in the demo maps FluxIslandMap and FluxBeachMap you can copy this setup (Surface, Simulation, WaveTexture, WaveModifier) or create it from scratch on your map. There is no video tutorial for ocean waves yet because I am planning a lot of improvements on this topic (infinity ocean surface already implemented) that will be published soon in version 1.2 of Fluid Flux. I have decided to make a tutoprial after the release.
Step by step
I’ve prepared a minimal MinimalOceanMap with all those parameters set according to this list and sending it to you in an attachment so you can check every actor and compare it with your config.
Start with an empty map with some island/landscape/ground mesh:
- Add BP_FluxSimulation actor
- Add BP_FluxSurfaceOcean actor (make sure that you use Ocean actor)
- Add BP_FluxOceanWave actor
- Add BP_FluxModifierWaveActor actor
Configure Simulation BP_FluxSimulation:
1. Pin SuraceActor to SiumationActor
SurfaceRenderMode =
SuraceActorReference = BP_
2. Adjust the transform of ModifierWave to cover the area of the simulation (change scale and position)
Configure Surface BP_FluxSurfaceOcean:
3. Set WaveTexture = BP_FluxOceanWave actor
4. Set WaveTextureStateAreaBlend = 4
5 Set SurfaceMeshTransform.Scale = (4,4,1)
6. Set SurfaceMeshMode = Plane_1024
(optional)
Configure Distant meshes in BP_FluxSurfaceOcean:
7. Add SM_FluxPlane512x512 on level
8. Set SM_FluxPlane512x512 to BP_FluxSurfaceOcean.
Additional options:
BP_FluxSurface_Ocean:
– WaveTextureActor texture actor added in the previous step.
– WaveTextureStateAreaBlend the hardness of blending between simulation and ocean wave
– WaveTextureStateAreaBorder edges of simulation that will be blended with wave texture
BP_FluxModifierWaveActor modifier.
– Scale/Move the component to cover the simulation area
– Set SurfaceHeight to generate water at a certain height
– Set StateAreaBorders to select which borders should generate fluid and affect the simulation
Ocean waves
The BP_FluxOceanWave is a dedicated actor for simulating ocean waves. Implementation is much simpler than the classical analytical approaches like Gertner or FFT. The system uses multiple tillable textures and combines them into a height map that can be used in the post-process/surface/Niagara system to represent wave displacement.

The fluid surface uses data from BP_FluxOceanWave placed on the map pinned to the BP_FluxSurfaceActor variable. The blending between simulations of ocean waves can be configured in special cases like on the beach map.
The beach example contains ocean waves blended with fluid simulation. All materials configurated for use with oceans are declared in the Surface/Templates/Ocean/ folder. Surface material uses the UseFluxOcean=true flag to activate ocean wave blending.
- Ocean waves in the simulation are generated using the modifier BP_FluxModifierWaveActor that is adding fluid and velocity at the borders of the simulation area.
- Additional waves in the background with simplified material (SurfaceDistantMaterial) are attached to the surface in the “DistantMeshes“.
- You can use RenderDebugPreview to see the analytical waves preview. This actor will not be visible it’s only there for generating the texture of ocean waves that the surface will use.
- Change Z location to adjust the height of the ocean wave.
I’ve been working on a kayaking game for the last couple years and was very excited to see Fluid Flux. While it may not meet my needs for that project I am sure I can make use of it in other projects I have in mind. Thank you for the candid and honest list of what the product is designed to do and not do. I look forward to seeing how Fluid Flux evolves.
Holy crap man, this is truly amazing stuff. Keep it up, you have a gift for this.
Any reason that you didn’t put this into a UPlugin?
I had to release the product instead of polishing forever and rewriting it to c ++ wouldn’t change a lot at this state. I will work on c ++ version in the future to overcome some limitations and improve performance.
Look great, Im currently waiting on VR support.
The limitation about not being able to use Fluid Flux in caves… does this mean it’s only usable in outdoor environments? If that’s true, couldn’t there be a way to have the heightmap projection ignore certain object types? If so, you could have the projection ignore those objects. I’m assuming it works like a line trace – but maybe this isn’t an option.
Yes, it’s an option. Some meshes can be ignored and you can even create a phantom mesh that will only be used to generate a height map. It’s tricky and requires more work than a typical use case but doable with Fluid Flux.
I tried to install unreal engine 5, but only the name appeared and everything to do
I don’t understand what is the problem. Could you elaborate?
where is the values in VelocityDepthFoamMap calculated? the blueprints so amazing,and so complex QAQ
It’s updated in the simulation actor using rendering to texture.
Hi Krystian!
I am stuck (a few days now) trying to render a scene (Ocean, beach, Iceland…) with all the components…I mean, I can achieve a “simulation state” about fluids, foam, and movement of the water (imagine you are seated on a beach, a few meters from the water)that’s correct but, the WAVES of the distance meshes planes (flux waves) and the more closest ones (rolling over the sand you know…) are static.
I have no problem with the real simulation, it’s ok, beautiful! I am a bit confused why I can’t get the distance and closest waves for exporting them to scripted actor actions and to get a perfect simulation state.
About hidden actors, hidden class…I am sorry, I am not English but I understand “hidden” means you want not to render whatever (flux sim, flux surface, etc) or the contrary, “show only actors” means what I want to generate? Please, Could you give me a few lights to achieve this?? I spent a week working on this mainly for the Flux fluids, it’s amazing! but a bit confusing to me…Thank you!
Hello, I’ve not checked the comment section regularly. Just noticed your message if you still need my help just mail me with details and some videos presenting your problem and I will try to answer as soon as possible.
Is there a workaround or way to add modifiers at runtime without restarting simulation? No matter what I try the moment I spawn a new source actor it resets the simulation.
I’ve just checked and you are right, there is a bug… fortunately easy to fix.
Change “RestartSimulationOnEdit=true” (I know the name is counterintuitive as hell it is a temporary workaround for you) and add a modifier manually to the list. Sorry for that inconvenience I will think about a cleaner solution – added on Trello and it will be fixed in the next version.
https://ibb.co/GJLnLXD