PGI (Point Guided Interpolation) Based Discreet Fluid-Surface Solver, Any Feedback?

Hello everyone!

Recently, I’ve been looking into better ways to implement real-time fluid simulation in Roblox for use as small to large bodies of water, that can interact realistically to forces without reliance on particles.

With EditableMesh at it’s current state, I wondered if it was possible to create a surface-first fluid simulation from a created mesh.

My solver at its current state, is capable of (from any number of attachments along a flat plane), create a watertight mesh polygon from the boundaries, at any given resolution:





With a solver for those types of boundary-based shapes, I was able to have the “fluid” fill any container at any level.

From that point, It was possible to apply a custom solver to that polygon to simulate fluid, with some extra overhead to provide smooth colours over the surface.

This simulation supports viscosity, particle weight, mass conservation, volume conservation and waveSpeed handling to simulate different surface tensions and fluid densities.

The video below was recorded with the simulation running at 60fps (1/60 dt) on the server. The movement / disturbances applied to the surface are simply pulling up the surface by a force value, not adding volume. The simulation does not accumulate overhead based on if the simulation is moving or not, its cost is the same no matter what state it is in, running at a fast enough pace to consider run-time use as a possibility.


The overall reason I am posting this here; is to listen to any feedback on the looks, or any questions about functionality that can provide me ideas for extra use cases. I will re-iterate however, this solver does not solve volume, and therefore cannot flow freely throughout the world, volume can be added, but that only effects the height it will attempt to achieve on average.

Thank you all in advance for any questions you have, and I look forward to hearing ideas the community has on how to make this more functional!

5 Likes