My (partial) btSoftBody re-write

Post Reply
lvezzaro
Posts: 10
Joined: Tue Jun 07, 2011 10:25 am

My (partial) btSoftBody re-write

Post by lvezzaro »

Hello, in the last couple of months I've been working on a btSoftBody replacement we could use for our surgical simulations. We found the current implementation to be very hard to understand and extend, and Erwin suggested to start from scratch too. I had very little background on impulse-based physics engines before starting, so forgive me if this isn't that ground-breaking!

Just the fact I've been using mass-spring models and the unmodified sequential impulse approach from Catto's "Iterative Dynamics with Temporal Coherence" should suggest this isn't quite on the bleeding edge.

Image


Anyway, it works for us and it's orders of magnitudes easier to tune and work on this code as it's just about 1000 lines of code and the soft body parameters are a handful. Of course, it is still under heavy development so its performance are undoubtedly inferior to the current btSoftBody implementation. We're still not sure if it's worth tuning this CPU implementation or go straight for a GPU implementation.

I'd like to know what you think, and what kind of features you'd like to see added to make it more compelling as a btSoftBody replacement.

Thank you!

Luca Vezzaro
Altair lab, University of Verona
User avatar
Erwin Coumans
Site Admin
Posts: 4235
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: My (partial) btSoftBody re-write

Post by Erwin Coumans »

It looks great.

If it is only 1000 lines, do you mind open sourcing it under a permissive license (MIT, BSD, zlib etc)?
Thanks!
Erwin
lvezzaro
Posts: 10
Joined: Tue Jun 07, 2011 10:25 am

Re: My (partial) btSoftBody re-write

Post by lvezzaro »

Thank you, Erwin.

It is true it's not much code, but it is the result of about two months of full-time work so in a sense it wasn't cheap for us to develop it.

But we think it will make our life much easier if it were to be integrated into Bullet's code base so we can take advantage of community feedback and contributions, development can proceed faster and bugs are found quicker.

The purpose of my topic here was to see if there was interest in my implementation and what are the chances it could be made part of Bullet.
damian0815
Posts: 4
Joined: Thu Oct 18, 2012 8:29 am

Re: My (partial) btSoftBody re-write

Post by damian0815 »

hey, this looks great! i'd certainly be interested in having a look through it.
joschu
Posts: 4
Joined: Thu Sep 08, 2011 2:49 am

Re: My (partial) btSoftBody re-write

Post by joschu »

I'm really glad to see this nice work on deformable objects in bullet. I'd love to take a look at your code when you're willing to release it.

John
lvezzaro
Posts: 10
Joined: Tue Jun 07, 2011 10:25 am

Re: My (partial) btSoftBody re-write

Post by lvezzaro »

Here is a video of a quick re-write I did of AppSoftBodyDemo. You can find its source as attachment. Notice how volume conservation and bending constraint generation was added by sub-classing.

Image

It is clearly still a work in progress, as shown by the imprecise collision detection and jittering issues. I just wanted to show you the integration with Bullet is not a lie :) At least for 2.80! (I need to figure out how to adapt to the changes made to the rigid body constraint solver to support version 2.81)

I hope I'll be able to fully open source the code soon, but I still don't have an ETA, sorry...
Attachments
SoftDemo2.cpp
(59.8 KiB) Downloaded 563 times
SoftDemo2.h
(5.38 KiB) Downloaded 544 times
damian0815
Posts: 4
Joined: Thu Oct 18, 2012 8:29 am

Re: My (partial) btSoftBody re-write

Post by damian0815 »

hey, this is looking super nice!

i look forward to the open-sourcing :-)
Post Reply