Fluid Simulation & Rendering

It’s time to release the demo I worked on for the past months during my spare time.

It’s not finished yet (still some docs to write + trying a WebGPU compute shader implementation of the fluid simulator) but I may not be able to work on this in the coming weeks so I wanted to release something now.

It’s a fluid simulation and rendering. In fact, it’s more the rendering side of things than the simulation part: there’s a simulator, but it’s quite basic at the time (still, collisions with particles are handled in the demo). Who knows, the rendering part may be integrated into Babylon.js in the future (need to discuss it with the team)…

[EDIT]
This is now integrated into Babylon. You should refer to this page for documentation and access to the demos:

[/EDIT]

Some pictures:

image
(particle positions are precomputed, not generated in realtime in this screenshot)

In these pictures, the realtime fluid simulator is used:

image

image

image

Some videos:

(direct link)

(direct link)

(direct link)

(direct link)

37 Likes

Cool but work incorrect on my android in chrome

1 Like

Unfortunately I can’t test this configuration.

The code needs WebGL2 support, though, so make sure it is indeed supported by Chrome.

OMG :exploding_head:

1 Like

It’s incredible.
Is this something that will be integrated into the Babylon engine? that would be great.
Or is there a JavaScript version of this?

The wine glass is my favorite. If you move it very slowly in circles can even make a little whirlpool form in the middle. Move it too fast though and well, a mess. Could make a whole game out of that there : )

Hi. Android 10, chrome 103
Webgl2 work.

Awesome :smiley:

this is amazingly beautiful. Wow…

Well I have NO PROBLEM to integrate it!!

This is a fantastic demo! cc @PirateJC for socialization

Regarding the rendering part, yes I think we will be able to integrate it into the engine.

For the simulation part, it’s a bit too rough and not really production ready to be used. It’s better to use it as a starting base for your own experiments.

2 Likes

@Evgeni_Popov this is absolute INSANITY!

I’m freaking out over here!!!

In Awe What GIF

Any objection to me tweeting about this or would you prefer to wait?

1 Like

MOAR TWEETS please!!!

No objection for tweeting about that.

2 Likes

INCREDIBLE :heart: :heart: :heart: :heart: Makes me want to take a sip of wine in a nice spring field :rofl:

2 Likes

That’s really cool @Evgeni_Popov !

seriously cool :clap:

You are the best @Evgeni_Popov !!!

This is insane!! I’ve got goosebumps!! :heart_eyes_cat: :heart_eyes_cat: :heart_eyes_cat: :heart_eyes_cat: :heart_eyes_cat: I always wanted to create something like this, but pretty far from it :smiley:

How should I set the parameters of SDFGen? The collision seems to have not worked as expected.
@Evgeni_Popov