Real time diverted water

I want to make a river in a survival game that if the players build something in the river to block it the water will pool or divert around/over the new obstacle. Would this be something I would need a special plugin for or would water and niagara work for this?

Hey there @Ugsquish! So this question is a bit open in that there’s so many ways you can pull this off, but most of them are going to have to be custom. So the water plugin is amazing but it’s mostly geared towards being prepared in editor, but not much can be worked at runtime. So say you wanted to use the water plugin and you have your river right? Let’s say you want to delete the river, or move it, or adjust it. You start to get issues like this:

Where the place the river was at level start is the place the rut will remain (which is fine I guess if you want it to “dry up”), and any connections to other water systems break instantly with major artifacts.

Same occurs if you try to move it:

Now you could work around all of that, but the best recommendation is for a specialized system like that I’d highly recommend writing it from scratch.

Hope this helps!

@Ugsquish
Look into vector fields first.
Then study up on flow maps.
Then look into distance fields.

Then combine the 3 to create a dynamic runtime effect.

Or, build a custom version of ue4 witn Nvidia Game Works to get the flex water system going.
Its not great percormance wise, but it is one of the still cool things that simulate flow.

1 Like

Thank you SupportiveEntity for your response. To clarify I am creating a game with a base building system like Ark, Icarus, & Valheim. But I want a system where if players build a dam that the water in the player created dam will fill up as a dam would and it would affect the water “down stream”, at least till the dam overflowed. After looking at the responses so far I realize it may be extremally taxing to do so, but I want to give it a go. The water plugin would work as far as I can tell for like a story event, and I may use this suggestion in another project. Sorry for the lack of clarity.

Thank you MostHost_LA for your response. I will give this a try.