3 ms·
Fantastic read! Not to diminish the original contribution here, but I got curious and started looking for similar projects on the native (in my case iOS / Metal
by alexfringes 8y ago
Fantastic read! Not to diminish the original contribution here, but I got curious and started looking for similar projects on the native (in my case iOS / Metal) side that aren't part of the usual suspects like game engines.
These two are kind of fun to play with:
https://github.com/andreipitis/FluidDynamicsMetal https://github.com/andreipitis/FluidDynamicsMetal
https://github.com/hagmas/MobileFluidSimulation https://github.com/hagmas/MobileFluidSimulation
Both based on this approach, detailed here by Nvidia:
http://developer.download.nvidia.com/books/HTML/gpugems/gpugems_ch38.html http://developer.download.nvidia.com/books/HTML/gpugems/gpug...
The technique this is based on doesn't create those satisfying tension effects but is more similar to paint flowing on a surface of water, so from a tangibility perspective I'd still love to find something closer to this post's work that runs natively.
- slavik81 8y agoThere are two difficulties you'd encounter adapting those techniques to this simulation: 1. The curved boundary is somewhat annoying to handle when your simulation is done using square grid cells. 2. Empty space introduces some really annoying boundary conditions. You'll notice that those two examples fill the entire region with fluid. It's entirely doable, but the boundary conditions probably triple the implementation effort when compared to a square box entirely full of fluid. As a wise man once said, "90% of the work in fluid simulations is dealing with boundary conditions."
- peeke 8y agoYou might find this post by Jamie Wong interesting: http://jamie-wong.com/2016/08/05/webgl-fluid-simulation/ http://jamie-wong.com/2016/08/05/webgl-fluid-simulation/ Doesn't seem to work on mobile though
- mmaldacker 8y agohttps://github.com/mmaldacker/Vortex2D https://github.com/mmaldacker/Vortex2D It should work on macOS/iOS via MoltenVK, but I haven't tested it extensively. It's a hybrid simulation with particles for the advection and a grid to ensure incompressibility.