OpenGL Low-poly Fluid?

Hello,

I am working on a game where eventually I am going to want some low poly fluids.
I found this video on youtube that shows almost exactly what I am looking for.

Here is the video.

I have no idea where to start with creating something similar to this within OpenGL and LWJGL. I have
a feeling that using the jbullet library might help. The only thing I can think of is a soft body in jbullet, but I am not sure if it will give this effect. Do you know any particle of fluid dynamics libraries that could achieve something along these lines? Or any ideas?

Thanks,

After a great deal of search I have found almost all but nothing…

Until I ran into this project on github.

Here is a link to a video showcasing his work.

Granted his fluid simulation doesn’t take on the flat shaded look like my example. But it does appear
to be somewhat low-poly in nature. I could not find any libraries that did something like this though, not even libraries in different languages. :o

So the main question that still resides with me (other then that magic api I’m searching for :persecutioncomplex: ) is could something like this realistically scale in a game? I suppose a way of getting around this would be to have fluid dynamics only in regions where the water is in contact with an object. Else resort to a more simple approach without the dynamic fluids…

Fluid physics is something that is usually extremely expensive to compute. It’s basically a particle simulation where the particles interact with each other (uh-oh). Rendering is then done by generating a mesh from these particles. It’ll probably work for small bodies of water, but the code needed for it will be quite difficult to code and require shaders for rendering, at least if you want anything close to realistic water behavior. Your best bet is probably to look up papers on fluid dynamics and try to implement one of them.

Rending fluid using per face normals instead of smoothed normals is trivial part of otherwise quite complex task.

That makes a lot of sense, I realize now that if anything calculating all those surface normals for flat shading could make it even more complicated. But wouldn’t you say that the resolution (or how many particles are included) would have a huge impact? The difference between realistic looking water and this could potentially be a huge drop in number of particles involved when creating the mesh.

Thank you for being honest about fluid physics memory usage. Might make for it not being a realistic element of the game…
Also, your explanation got me on the right track as to what is going on during fluid physics. I’ll have to read more into the math behind fluid dynamics.

Also, I found this really in depth 17 part article on fluids in games so hopefully it will help some.