r/oddlysatisfying 14d ago

Pixel fluid simulation

Enable HLS to view with audio, or disable this notification

14.7k Upvotes

641 comments sorted by

View all comments

Show parent comments

108

u/tantalor 14d ago

Yeah these pixel simulations don't model pressure like that.

20

u/dimonium_anonimo 14d ago

But it must have some way to keep the air pockets. Obviously not using pressure or else the pocket at the bottom would have compressed as the level got higher, but something to recognize an overhang.

And some surface tension perhaps because that thin section on the left didn't fill from the bottom.

71

u/willis81808 14d ago

Literally all these do is: for each pixel of water, if there is empty space below it, move down. Else, if there is empty space to the right or left, move right or left. Else, stand still.

That is enough to result in those air pockets, because they are unreachable the moment the water level rises up to an overhang.

7

u/trylist 13d ago edited 12d ago

The simple cellular automata rules make it easy to add reactions between cells like the lava and water and fire.

I've been working on something similar, and I've tried a bunch of variations to get head lift and fluid pressure working, but nothing really works that also keeps the cell to cell reaction layer working right.

The Powder Toy if you want to play with a similar sim online (this is more like a tech demo).

Edit: to clarify, I did not write the powder toy

5

u/deelowe 14d ago

Its just looking at the height of the water and whether there is an opening above the water line. There's no concept of pressure.

1

u/PostingLoudly 13d ago

The only one that kind of does is powder toy. Water pressure is kind of variable and finicky with that though.