Softbody in WebGL/Three.js?

3.8k views Asked by At

Is there any way to integrate softbody physics with WebGL or threejs? Could I integrate for example PhysX engine somehow?

I need to move a 3d rigid body within a 3d soft body and have the soft body deform in response. The soft body would ideally have similar plastic properties as clay.

Is what I'm trying to achieve even possible?

Any advice or direction would be greatly appreciated.

3

There are 3 answers

1
Kailijan On

Maybe take a look at this one: http://chandlerprall.github.io/Physijs/

1
Falk Thiele On

There are already some 3D physic engines like ammo.js, cannon.js, oimo.js or goblin physics. You will find that all of those are struggling with soft bodies.

The bullet engine of which is ammo.js based can do soft bodies, but (officially) it has not been implemented yet. See https://github.com/kripken/ammo.js/issues/83 and https://github.com/kripken/ammo.js/issues/13.

In cannon.js there is no official example about soft bodies. But there is also a github topic in which someone posted this softbody demo http://egraether.com/demos/soft/index.html over 2 years ago.

In the other ones I havent found something similar. I didnt list Physijs because it is just a wrapper for ammo.js.

1
Alexander Buzin On

Example made using whitestorm.js . Stable version of this engine will come soon. Beta (near stable) is available at github right now.

EDIT

Not this you are looking for?