Realtime Mesh Deform

I have a wheel suspension working (wheels bounce up and down correctly), but I would like to deform a conveyor-like mesh that has a number of edge loops along it where the wheels are.

So how would I do this?
-Bones and vertex groups?
-Moving vertices with python?
-Some kind of Soft Body physics?

(Soft Bodies would be mainly used for cloths so they are probably not the answer)

Please reply what you think.


KD Tree + List = get the closest X points and displace them and put them on a list,

each frame as it’s moved points not near the cylinder return to default over time then fall off list.

I use similar code in this thread*

I would think you could also do something similar with Rigid body joint constraint however this might be a bit performance heavy. It depends on how many ‘planks’ you want to have.

EDIT: This would be more suited for a draw bridge or something similar, its not really mesh deformation at all.

It all depends how sophisticated you want to get. Is it just an effect or is it a fundamental requirement of your game/simulation? Does it need to be accurate or can it be an approximation?

  • Soft bodies work in some cases (and indeed do what you have in the image above), but forces don’t tend to propagate very far along them. They are also rather mesh resolution dependent.
  • You can simulate it as a bunch of linked rigid bodies. I’ve done this quite frequently.
  • Solutions in python tend to be slow, particularly if you intend on recalculating the physics each frame to keep collisions accurate.
  • Bones and vertex groups take a lot of work to set up.

If you come up with a good way, I’d like to hear it. It is possible that a combination of linked rigid bodies and a weighted bone mesh could yield nice results.

I’ve successfully simulated chains of >150 length with the rigid body method. Even with the substeps at maximum performance was fine on an i7 4790

I don’t need any calculations of physics or such, those are done by the wheels. It’s more artistic and to make the game look good rather than for a simulation.