How to render multiple objects as a single object for fluid simulation?

484 views Asked by At

i'm try doing fluid simulation using particles in 2d game.but something i can't get it through. situation like this, i have larger particles, which interactive each other physically,and applying constraint on particles, cause it's more like water,then use those particles to collide with environment(e.g wall,obstacles) but draw things doesn't go well,because by using particles-based fluid simulation, it exsits gap,or hole between circle particles, anyway,i would prefer to do some graphics trick to get rid of it.as you know, maybe use blur shader,or something else to smooth particles, but it's definitely infeasible, it makes particle size,radius visualization such changed,undetermined that can't use original information of particle to collide with environment anymore. please give some hint on fluid simulation in 2d games,thank you.

EDIT:

enter image description here

too bad, it's apparently that "water" fluid was composed of several cicrle sprites.....

enter image description here

better but still gaps,holes.

i uploaded the image to illustrate this visually. as the above figures shows, green circle particle was positioned separetely.it dosn't looks like water fluid. blurring the particles it's not my choice. how can i fixed this.

1

There are 1 answers

3
Wagner Patriota On

You can do it solving the Navier-Stokes equation.

Google a little deeper and then you can find some examples and implementations. This is equivalent to the Netwon's F = M x A, but for fluid dynamics.