I wish I had more knowledge to be able to comment on the progress properly, but sadly I don't. All I want you to know is that I admire your work and although unable to describe it, I can see the progress you're making. Keep going, it's awesome.
Currently it’s just less particles with the same physics, but actually, yeah, there are ways I can exclude certain parts to make it much cheaper. MLS MPM uses the velocity gradient to preserve things like vorticity but it’s not as needed when the particles are spread far apart. I will try it out!
How do you compute distance to surface? Is it by tagging blocks as surface blocks (eg when the total volume of a block's contained particles are below some threshold) and then propagating the surface tag to neighbor blocks via scatter or gather... or something else? That would be fast but I would guess that doing it per block would dramatically underestimate distance, thus losing a lot of the potential benefit.
Yeah, you're totally right, it's not as effective as it could be as it is block based. It is more effective in smaller domain sizes where water piles up very high. Or with some additional terrain which would let the water pool up high in certain areas. It's not great with a flat open water surface. At the moment, I combine this with the block/tile's distance to player and whether it is in view.
How much of a win do you get with adaptive particles enabled? Like, what % fewer particles for a given fluid volume, and how much perf does that win you? Does splitting and merging incur much of a cost? (I wonder if you could get away with delaying adaptive changes, assuming churn means lots of transient changes)
I don’t have the exact perf numbers as things are still up in the air. But it does help. Each level halves the particles to occupy a volume going from 8 particles per cell to 1 particle every 8 cells. So current coarsest is 1/64 the particles. Splitting and merging is very low cost, I call it that but actually it is more just random deletion in the coarsening and splitting is just random jitter.