Soft body physics in 3D on three.js.

kozol.wmv (7.6 MB)

demo: physicsCalc

I like doing 3D, but I like physics even more. So I decided to load physics onto an arbitrary model. Yes, you can wrap any 3D model in physical properties. Yes, this is not exactly a soft body, but many physical objects connected to each other. Geometry is calculated and relative to distances, notes are placed. Yes, there is room to turn around with optimizations and tricks, but so far there is no time for this fun.
All this is based on oimoPhysics, why not on ammo - there is no way to add internal shapes, and in general everything is somehow complicated there, why not on joltPhysics.js - it came out recently, when I started doing it I did not see this engine, well, and then I was somehow too lazy to remake it for it. I did not even consider the other ones. In fact, I did not find a single similar example of a soft body on the web, not a basic shape (ball, box). Yes, the joltPhysics library is very curious, especially the latest bemka with fabric debagrom, maybe the soft model is implemented. But I have not tried it yet. Now I will post this post and try.

8 Likes

Cool :slight_smile: The more the merrier!

Very cool demo! :smiley:

or JoltPhysics.js demo
but both this and your link are the basic form! The question is in the loaded geometry.

Cool. Do you have any skeleton or soft body work?

Wow. That looks great. Have you seen this done with human forms… muscles, or 3d files like obj, and gltf, etc?

In the demo, gltf is loaded, but there is only one geometry. But nothing prevents it from being finalized. And to work out all the details of the 3d model.
Yes, I wanted to make a person (or rather a creature), with a structure of bones>muscles>skin. And even connect it all to the AI ​​in terms of movement. But for now I’m just looking for someone who needs something like this)))))