Water Plugin in UE5: Does anyone know how to use the foam on rivers? (see video linked)

Hello everyone!

After looking everywhere on the net, I have a hard time understanding how to make the foam works for rivers in UE5 with the water plugin. This feature seems awesome to make good-looking rivers. It’s a shame that there aren’t any real tutorial or steps to know how to make this works!

In this video from Epic talking about the plugin and Fortnite, the guy shows that increasing the velocity of the river shows some foam (I set the videao at the right timestamp).

I’m trying to understand how this works but in vain. I thought it was linked to the BP_Fluid_Sim1 that you need to use for Wave Foam in the Ocean but it’s doesn’t seem to work.

Anyone has ever managed to make this work? Is it bugged or is it a custom shader that Epic modified?

Thank you in advance!

The Water plugin was abandoned as far as I can tell. Foam, physics interactions, caustics, none of it seems to work under UE5.

I’d be happy to be proven wrong as I’ve been trying to set up water for my own project. Maybe take a look at UIWS or Fluid Flux instead.

fluid flux also has many issues and is almost unusable unless scale is small and only for cinematics. I think more time is simply required after for updates and the creators are very busy.

River foam seems to work, same as ocean, you just need to enable it in material instance options and have fluidSim bp on the level. Tweaking it to something sensible looking is another story.

Does that work with WaterBodyCustom? I get the feeling most of the problems I’m experience stem from the fact that I need to use WaterBodyCustom in my project.

I tried:

  • Enabling foam in my material instance.
  • Adding a True bool to the Enable Foam input on the SampleFluidSimulation node in the Water_Material master.
  • Adding a BP_FluidSim_01 to surface of the WaterBodyCustom.
  • Setting the Water Mesh Override to Cube.

I was able to get water ripples to work after adding a RegisterDynamicForce node to my character blueprint, but no luck with foam.

But a bigger issue is getting ripples to solve in multiple WaterBodyCustom pools that are placed at different heights. Currently I have three pools all using WaterBodyCustom and ripples only work with one of them. I can enable ‘Show Simulation Mesh’ on BP_FluidSim_01 to see the area that’s getting simulated and have Follow Player enabled, however it only follows my character on a 2D axis. If I interact with a pool higher or lower than BP_FluidSim_01, no ripples occur. I’ve been able to reproduce this issue with other water types placed at different elevations. And obviously I can only have one BP_FluidSim_01 in my map.

There also seems to be a discrepancy with how bouyancy behaves between WaterBodyCustom and the others. For WaterBodyCustom I need to increase a floating object’s mass by 200kg’s or more to make it float normally, otherwise the object just hovers above the surface or doesn’t match the motion of the waves correctly. This issue doesn’t occur with the other water types.

Underwater post processing effects also don’t work properly with WaterBodyCustom. The fog post-processing effect occurs but doesn’t appear to be properly masked by the height of the water. The blurry ‘water edge’ effect also doesn’t occur.

I fixed some problems with Custom Water Body but in the end because of water and buoyancy desync I’ve ditched it in favor of Ocean Water Body (land can be removed). In your case for the ripples to work on different bodies I guess you should update the ‘water body’ field in fluidSim bp as your character switches between them.

Unfortunately that didn’t work. I can even set Water Body back to None and it’ll still resolve ripples in the pool that BP_FluidSim_01 initially overlaps. The problem is that BP_FluidSim_01 tracks the player in X,Y axis only. I even tried changing the GridMovement function in BP_FluidSim_01 to track the player in all 3 axis, but all it did was track the simulation mesh plane, not the actual ripple simulation area if that makes sense. Based on the ApplyFluidForceImpulse function I can see that the value that drives the simulated area is FluidSizeSquared, which is derived from SimulationWorldSize². Increasing Simulation World Size value in BP_FluidSim_01 only affects the size of the simulated area in X,Y. ¯_(ツ)_/¯

In BP_Dynamic_Force_Component you can change the material to M_Fluid_Sim_Force_Boat_Component and Z-axis tracking will start working. I think Z is not tracked because of issue in default material instance of Dynamic_Force_Component. Also BP_Fluid_Impulse_Repeating will work on different water Z.

That actually worked but made ripples eminate from the actor’s capsule collision in a diamond shape rather than from the sockets I set up under Skeletal Mesh Setup. But I’ll look into that material further. For now I came up with a workaround:


Basically on a timer I’m running Remove Dynamic Force so I can re-run Register Dynamic Force with a new water level based on the character’s current position. It’s pretty inefficient but it works. In the screenshot I had the time set to 3 seconds, but 0.5 still seems to be performative if it’s only running on a single actor.

You can take a look at my project with some fixes (skeleton tracking by Z fixed too):
https://github.com/aelmod/UnrealInteractiveWater

Later I will create video to describe these fixes.

Very much this. Unfortunately a lot of things seem to get released as Beta or experimental and then never finished. I imagine the new Nanite landscape features being worked on might conflict with the water displacement features that were made for the old landscape as well so…not holding my breath for an update on this, I think the water plugin is sigh dead in the water.

You are better off to go with a custom solution either made in-house or from the marketplace.

I also think so. But now I am dealing with the Water Plugin in detail in order to make my own, because there are no implementations in the market for my tasks. Water from the plugin has many interesting details and implementations and you can understand a lot from it. That’s why I fix existing problems and at the same time figure out how it works :slight_smile:

there have been updates to water plugin in last 3 releases afaik

Yes, but these are just small fixes that you can see on github. Unfortunately the water remains broken. It cannot be taken and used out of the box, especially if you want to have a “simulation”. In order for it to start working, it takes a lot of time and you must love pain to fix problems in bp_fluidsim_01, find missing render targets, fix materials and other blueprints

Just saying that ‘dead in the water’ is not true, documentation sure sucks as for most parts of this engine but at least there are updates that keep this thing compiling. And there are more that one person here trying to figure out how does it work, which might not be the case with other solutions from market place.

1 Like

Cool, I’ll see if I manage to make it work this way. Thank you for the advice.

Hello @LaggyLuke. Do you mean the check box called “Ocean foam” in the river material?

This is the only foam parameter I see in the Material Instance for rivers.

Also, are you talking about the foam generated by the river speed or the one around the character interacting with it? I was trying to make the speed related one work.

I’m interested in the steps you’re doing if you managed to make the foam work for rivers.

Even with the FluidSimBP in the scene, I never seem to get them.

yea, Ocean Foam global enables it on rivers too, not sure if that’s one you are after tho . Afaik the super nice dynamic foam from epic’s presentation video requires shallow water sim mode in FluidSim which doesn’t seem to work after 5.0. I didn’t messed with river foam much yet, currently trying to get around terrain artifacts caused up by incorrect layer order in my project :smiling_face_with_tear:

I wanted to share what I found with some challenges I had getting the Dynamic Force component to work with Custom Body Water. For the life of me, no where could I find anyone getting this to work without water levels AT 0, Of course this is not acceptable. I started trenching through all of the supplied blueprints and I found the solution to fix BP_Dynamic_Force_component.

Inside of BP_FluidSim, Go to the function Draw Dynamic Force function, and added a set Scalar Parameter Value (for WaterZ) right before the draw Material. Below is a snipped of the modified BP_FluidSim.

1 Like

Hey @Duffmasta!

Thank you for digging more and sharing your solution. I’ll try this today and give a feedback! :slight_smile:

Are you getting the World Transform from the Force Component?

EDIT: Managed to make it work with your solution for dynamic character interaction. You rock!

Now, if anyone ever manage to make the “speed-related foam” in River Bodies, I’m still interested! I’m not marking the topic as solved yet as this was my original question!

1 Like