We are developing a new fluid solver using machine learning, capable of simulation large simulations (for foam-less fluid ~10 million, with foam a bit less) with surface generation, rigid body coupling, multi-phase and rendering in real-time. The quality-running time trade-off is controllable.
SIGGRAPH 2017 Real-time Live submission video :
The method is perfectly stable in any circumstances, including when the incompressibility constraint can not be fully satisfied (non-simulated objects squash the water etc).
We developed the alpha version of a plugin for UE4, mainly for designing purposes, but if there is any interest in the game development community, we can work on it a bit more to make it releasable. Based on my knowledge, a typical games give only several milliseconds per frame to a physics engine, and mostly only on CPU. We haven’t optimized our method much (it’s simply a basic vanilla implementation), so there is a large space for improvement (my guess is that 5x should be achievable). Also several approximations (height map and low precision/skip calculations outside of the region of interest) are possible, however 3ms on CPU with current hardware seems out of reach.
If anyone’s interested in our project, or is able to provide us some example scenario from UE4 with a lot of water, so that we can optimize an algorithm for a particular scenario, please send me a message or write a comment below.