Development calendar and first steps with deformable bodies
Hello everyone !

In order to be more transparent on my ongoing developments, and on the time dedicated to each task, I have setup a public calendar: 

You will find there recurrent weekly events describing which time is dedicated to which kind of task. Basically:

  • 30mn to 1h30 is dedicated most mornings (in working days) to commenting issues, PR, and forum posts.
  • 1.5 days a week are dedicated to research and development (R&D), i.e., implementing new features or improving existing ones.
  • 0.5 days a week is dedicated to actually fixing issue, or performing important reviewing tasks.

Of course, all this is flexible, and it may happen that some R&D time is replaced by bug-fixing time if necessary. You may also find some Saturdays filled as well when I can afford it. I usually fill in the details of each R&D slots on a weekly basis.

I will maintain this type of part-time work on my Rust projects as long as I can financially afford. Thank you all for helping me getting closer to be able to make this possible in the long-term!

Current developments: deformable/soft bodies

As you may have guessed by reading the calendar, or if you noticed the new deformable branchs on nphysics and ncollide, I have started working on deformable bodies. This will include:

  • Finite Element Method-based simulations of linear elasticity (shown is this video using tetrahedral elements).
  • Mass-spring systems (the most frequent soft body implementation on physics engines).
  • All this for  deformable polylines, triangle meshes, and tetrahedral meshes.
  • All this in 2D as well as 3D (deformable volumes will of course only be defined in 3D).
  • Keep in mind that this means ncollide will itself support deformable shapes. For example, this will allow you to modify a TriMesh or a Compound (and even a sphere or a capsule) even after they have been added to the collision world!

I decided to work on this instead of my other announced objectives (like performance improvements) for a couple of reasons. First, my last task was to write the website. After this, I wanted to switch to something really fun because, well, writing a documentation/user guide from scratch was not the most interesting thing to do. Second and more importantly, the integration of deformable bodies will have a significant impact on the nphysics and ncollide internals and public API. So the sooner they are integrated the better because this will prevent those breaking changes to happen in the future! So far, I've written the bulk code, including the definition of deformable bodies inside of nphysics, as well as the definition of deformable collision objects on ncollide. Most of it is fairly untested yet. So far, the most notable impact on user-facing API are:

  • The replacement of Body and BodyPart by trait-objects instead of enums. This will, by the way, allow the user to define their own body types (for example to implement very specific deformation models).
  • The distinction between a BodyHandle and a BodyPartHandle. Until now, body parts and bodies both had handles of the same type. Now there are two types.

The linked video shows some very first results! Keep in mind there are still lots of bugs and stability issues not shown on this very short demo.

Thank you again for your support !