🎉 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!

Kinetic sand simulation

Started by
3 comments, last by coderchris 4 years ago

I want to simulate Kinetic sand's behavior in my game. I could implement operations such as slicing and cutting using simple mesh cutting algorithms but I want to implement complicated operations such as follows:

Ref video link:

1. Squishing (Time frame 1:37 to 1:40 in the ref video)

2. Scooping (Time frame 8:53 to 8:57 in the ref video)

I have the following questions:

1. What physics simulation algorithms can be used to implement the above 2 operations?

2. I want to implement this concept for mobile devices. Will it be computationally heavy to simulate such physics on mobile devices? if yes, are there any workaround solutions for this type of simulations?

I would appreciate any suggestions and thoughts on this topic. Thank you.

Advertisement

you can begin with soft particle hydrodynamics approach

how does molecules behave ? i have no idea and dont want really to dig in

I remember this SPH tutorial which has performance numbers for low end desktop GPU: https://wickedengine.net/2018/05/21/scalabe-gpu-fluid-simulation/

I assume adding sticky constraints to model this kind of sand would make it slower, maybe something like 25%.
Unfortunately i have no idea how mobile GPUs compare to desktop in compute performance.

This game was ported to mobile: https://www.claybookgame.com/ So you see it's possible probably.

Octane_Test said:
2. I want to implement this concept for mobile devices. Will it be computationally heavy to simulate such physics on mobile devices? if yes, are there any workaround solutions for this type of simulations?

EDIT: wrong quote but can't edit. I wanted to answer theis: ‘1. What physics simulation algorithms can be used to implement the above 2 operations?’:

There are basically 2 options for fluid simulation, particle based (SPH https://imdoingitwrong.wordpress.com/2010/12/14/why-my-fluids-dont-flow/) and volume based like this: https://www.researchgate.net/publication/2560062_Real-Time_Fluid_Dynamics_for_Games

I guess SPH seems much better for you to model the sticky behavior.

SPH could work for this as JoeJ said.

Material point method (MPM) may also be a good fit. Here is a recent variant of it that does really well with sand type simulations:

https://github.com/yuanming-hu/taichi_mpm

This topic is closed to new replies.

Advertisement