🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Implementing obstacles (solid elements) in an MPM Fluid simulation

Started by
0 comments, last by DragonTear 4 years, 11 months ago

Hello Community,

am trying to utilize this fairly interesting and powerful MPM (material point method) fluid simulation engine for a custom project: https://github.com/kotsoft/FluidCinder/tree/master/src

Sadly while the code does work and seems fast (60k particles at 60fps), it is almost entirely uncommented and the algorithm is a step above my skill level.

The sample code seems to only have collisions with the walls, aka the edges of the node-mesh. However for a game, obviously I need any type of custom solid shapes where the particles are bouncing off. My basic idea so far was to try removing nodes from the grid to artificially create new solid edges this way.

However nodes do not seem to have dedicated x and y positions but the position is determined by their pointer, making my idea less feasible.


Has anyone here ever worked with an MPM engine and could tell how solid objects are usually implemented?

Huge thanks in advance :)

Particles.PNG

This topic is closed to new replies.

Advertisement