Defluid - 2D fluid simulation

I’ll take a look after lunch and see if I can help out, probably (hopefully) something simple :slight_smile:

3 Likes

So I would like to apply new effects to Defluid: add water wave effect that I easily adapted on sprite, but have problems on how to adapt it on top of model? I’m probably missing again some crucial information.

So, in Defluid I have a defluid model with a special material on which I draw base texture and metaball texture. The output is that metaballs are “blending” together giving a fluid effect. Now I want something like this:

I mean, I want to probably draw a base texture (model with texture -rocks or whatever is on the background), on top of it draw metaballs that will cut everything that is out of them (black lines) and blend everything inside (blue lines). Then again on top of that draw a water wave effect, like I drawn on top of sprite (with fragment program). At the end, in render script I would like to draw base - everything else, a level and on top of the base I would like to draw the water - metaballs with water waves.

I think it should be like that, but actually, I have no idea how to do it, it’s too hard for me right now :frowning: so if you would like to help me I would really appreciate steps description and explanation on how to achieve such effect :blush:

Link is broken

https://defold.com/community/projects/139337/

https://defold.com/assets/defluid/

Is there a github page for it?

:frowning: No, but actually, I used it in https://github.com/paweljarosz/water-sources. I will probably need to update Defluid asset and push it on github separately. But anyway, guys, do you have any idea on the shader I talked above?

1 Like