14-09-2020, 08:43 AM
(This post was last modified: 14-09-2020, 08:51 AM by josemendez.)
(14-09-2020, 08:23 AM)sanyam Wrote: But I also want to add different kinds of paint which will push around the previous paint particles when poured on to them.
This is what the smearing/smudge tool does in most painting programs, isn't it? This is much faster to do in a shader, considering you're limiting yourself to an essentially 2D canvas.
Even if you wanted to get really fancy, with effects similar to the paint pouring technique:
Using 2D velocity fields to displace the paint would still be so much simpler and faster than a full blown 3D particle based fluid simulation. You might want to look into 2D shader based fluid simulators such as Cocuy if you want a ready-made solution that does this.
if you want to roll your own, Alan Zucconi has a great tutorial series on how to do 2D simulation using shaders:
https://www.alanzucconi.com/2016/03/02/s...mulations/
https://www.alanzucconi.com/2016/03/09/s...h-shaders/
These two links will get you 70% of the way. Once you've got a basic simulation going on, Josh Stam's stable fluids will do the rest:
https://www.researchgate.net/publication...ble_Fluids