I'm currenlty trying to create a fluid animation of a fluid flowing out of a container. I inted to create a simple pre-baked animation that can be repeated multiple times, not a real-time fluid simulation.
I already managed to create a something similar to what I envisioned in blender using their fluid system but currently it is not possible to import it into godot.
I also looked into other approaches like mesh deformation but did not find anything useful.
Any ideas how to implement this?

    This is a very non-trivial task. But maybe you'll find this Fluid Simulation in Godot useful.

    Blender and Godot are too different programs to just transfer something between them. Their compatibility is very limited.

    Mazzelfassel You'd be better off faking it with animation keyframes + shader + particles.

    I'd look into creating a waterfall.

    Mazzelfassel I'm currenlty trying to create a fluid animation of a fluid flowing out of a container.

    "Flowing out" — in the sense of the level of liquid in the container should decrease? Then you can try to combine level reduction (you can use keyframes) with waterfall effect — purely visual effect without physics.

    I have taken a look into the waterfall example. This got me an idea to use particles for this. I did some rudimentary testing with some simple quads and it is going into to right direction. But in my case I have to render the animation multiple times in simultaneously, if each uses a few thousand particles that could impact performance really fast.

    Another Idea I got is to deform a mesh and make it behave like a fluid. But I have no idea how to do this in Godot or if this is even possible.

    Here is an visualisation of what I want to animate. The fluid animation does not need to be the same as in the video, this is just an example.

      Mazzelfassel Here is an visualisation of what I want to animate.

      I would suggest Liquid In Mesh and include a simulated outflow (waterfall) when the liquid level exceeds the edge of the container.

      Mazzelfassel What kind of game are you making? Because creating fluid like that is quite an advanced task for Godot as far as I know. For example:

      using marching cubes
      or this.

      These are other options if this was me:

      • Faking it.
      • Render fluid simulation from Blender and use it as a cut scene instead.
      • Go for other game engine with already fluid system in placed.

        Gowydot Faking it.

        I am trying to create a factory game. So faking it is more than enough. The fluid animation would be played statically in repeat, but multiple times in paralell based on how many of a building you place in the world.


          Ooh what kind of factory game? I have spent half a year on a factory game. Well I guess the game I'm working on now is also kind of a factory game. Unfortunately if physics are employed at a large scale and you're in 3D I'd recommend either faking it or just using unreal. Godot doesn't have all the tools you might want.

            Erich_L Mine is grid based. So I dont need any actual physics and gonna fake it as best as I can. I also took a look into unreal (worked a little bit with it some years ago) but my motivation plummets almost instantly because unreal is not very easy to understand compared to Godot or Unity (my opinion). And I definetly do not have the energy to relearn how to use an engine from scratch.

            Mazzelfassel Another way you can try is using shape keys from Blender which can transfer to Godot quite well last I tried (a year ago maybe). I'm thinking like using shape keys for based water flow, then add shader and particles. Might be a bit tricky to do shaping all that water though, and I don't know how intensive to cpu that would be.