Move Mesh with Particles

Is it possible to move mesh vertices to the nearest particle of a given type, but also don’t allow the particles to leave the mesh. And make the particles occupy space inside the mesh, like sand filling the mesh, but instead of sand there would be particles.

I was thinking this would simulate soft body physics. Would this work?

Niagara has a static mesh location module, the particles will stay within the mesh.

Not quite sure what happens when you start to manipulate the mesh though. You would need the mesh location module in the update section, but it may not respond to mesh updates.

If you are moving the verts using the material, the particles could not respond.

And yet, this sounds like a really good baseline idea to simulate anything from cloth to smoke to water…

@ OP
You may be better off implementing Nvidia game works or similar.
The procedure they use is actually similar in theory. Its just built with highly performing separate modules that essentially don’t rely on the Niagara system at all.

When a vertex is moved, it should prioritize particles who are on the outside, rather than those on the inside. Maybe check to see how many neighbors the particle has? The particles on the outside should have less neighbors.

Also two verts shouldn’t try to occupy the same particle. Maybe get an average of nearby particle positions instead as well.

Can this be done on skeletal meshes rather than static meshes?

Can also be used with skeletal meshes, yes. But try the basics first.

If you want a lot of control over how it prioritizes particles, you can copy and edit the module. It’s very much like blueprinting…

Maybe, but the speed of execution must be close to 10x in excess when compared…

I know particles inside a skeletal mesh can move outside of it when directed to.
The skeletal mesh is basically just being traced against (I think in a volume computation rather than an individual trace level).

But at that point, why not just use a pre-simulated alembic cache?

1 Like