How to Exporting liquid animation as GLTF?

I’m new to Blender, and I need to create a liquid animation where liquid flows from the top into a bowl. This animation is intended for use on a website. I found a tutorial by Cleverpoly on YouTube (https://youtu.be/6xsGdEvZGoQ?si=jkKVjVeE6kVU4Q5c) that shows how to create a liquid flow similar to what I need.

However, I need the animation in GLTF format to use it with Three.js. Additionally, I want to control the liquid flow on the website (e.g., play the animation as the user scrolls).

How can I export this animation as an animated GLTF file and implement scroll-based control in Three.js?

Any help is appreciated!

1 Like

@jordanvarghese

Hi Jordan,

The GLTF format cannot do what you want. It can only store animation that is derived from some bone/armature system or shape keys.

A fluid simulation has different numbers of vertices at every frame of the animation and the format best suited to that is Alembic. This can store, efficiently, arbritrary meshes per frame with no understanding/need for the underlying process that created the animation. For instance it can save a mesh with an animated boolean.

here’s a prior thread on getting shape keys into GLTF should you need . . .

However, as I mentioned a fluid sim cannot use shape keys as it has a varying vertex count per frame.

Cheers,
Dj.

Thank you so much :handshake: DJ for the reply, ill check out the thread

1 Like