Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Soft-soft collisions and self-collisions #789

Open
josephrocca opened this issue Dec 12, 2023 · 3 comments
Open

[Feature Request] Soft-soft collisions and self-collisions #789

josephrocca opened this issue Dec 12, 2023 · 3 comments

Comments

@josephrocca
Copy link

josephrocca commented Dec 12, 2023

Hello, I'm very excited by Jolt's soft body support! Here it is mentioned:

Soft bodies can only collide with rigid bodies, collisions between soft bodies are not implemented yet.

I'm wondering if soft-soft collisions (including self-collisions) are on the near-term road map?


Please ignore this if there's not really anything interesting to say/compare here, but: Tangentially, in terms of trade-offs relative to Jolt's approach, I'm wondering if anyone knows how MuJoCo's new "flex" based soft bodies work? I don't have much experience here, but it doesn't look like XPBD?

MuJoCo has also had a "rigid body composite" thing for a while - basically lots of rigid tetrahedrons connected by springs to emulate a soft body IIUC. Whereas with this new "flex" stuff the tetrahedrons (or lines or triangles - "simplicial complexes") themselves are squishy, so you can use fewer elements to achieve a similar result (though overall performance for same "effective fidelity" - in terms of FPS - currently seems similar-ish, but I haven't done extensive tests).

@josephrocca
Copy link
Author

Also I haven't tried creating my own models yet, but think MuJoCo uses (or requires use of) gmsh and I also saw this comment:

To convert from tri-mesh to tet-mesh we used fTetWild.

and they end up with a tet-mesh that has more fidelity closer to the surface of the model, like this:

image

I'm wondering if an example/sample could be made showing a comparable process in Jolt? I.e. starting with a surface mesh (or an SDF, perhaps) and ending with a simple demo that drops a couple of them on top of one another (once soft-soft collision is supported).

@jrouwe
Copy link
Owner

jrouwe commented Dec 12, 2023

Soft body physics is still in development but I haven't had much time to work on it lately.

Soft body vs soft body is something that I eventually want to support, but there are a lot of other things that have higher priority such as:

  • Further optimizing and parallelizing the simulation
  • Optimizing collision tests against soft body (= currently O(number of surface triangles))
  • Collision listener callbacks
  • Implementing missing interfaces like AddLinearImpulse etc.
  • Supporting buoyancy

I'm wondering if an example/sample could be made showing a comparable process in Jolt?

I have put this on my list.

Tangentially, in terms of trade-offs relative to Jolt's approach, I'm wondering if anyone knows how MuJoCo's new "flex" based soft bodies work?

I haven't really looked into this, so I can't say much about this.

@ThomasCartier
Copy link

ThomasCartier commented Dec 16, 2023

I literally gave it a try and was really happy with the result so far
Screenshot_20231216_160131

It's complicated to see through, but yeah, past self collisions which are lacking, the animation looks beautiful.
Well done; really.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants