This month in Dimforge #4 (Dec. 2020 - Jan. 2021)

Welcome to the fourth edition of This month in Dimforge! This newsletter provides you with a summary of important updates that occurred within the Dimforge community. This includes in particular updates about the Rapier (physics engine), Salva (fluid simulation), Parry (collision-detection), nalgebra (linear algebra), and Simba (abstract algebra) crates. This fourth edition will contain updates for the months of December 2020 and January 2021.

Join us on discord!
You can support us on GitHub sponsors

Announcing Parry 0.1.0

During the past two months we have been working on a new crate. Say hello to Parry:

Parry is a complete remake of our ncollide crate. It is declined in four crates: parry2d, parry3d, parry2d-f64, parry3d-f64, depending on whether you want, 2D or 3D geometry, and f32 or f64 accuracy. Parry is born from the merge of most of the geometry code we had in Rapier, and some of the geometric code we ported from ncollide.

As of today, Parry is the geometric library used by our Rapier physics engine (and Rapier itself includes much less geometry code than before). It is the crate we will continue to improve in the long-term. The ncollide crate is now in passive maintenance mode.

Parry doesn't have any user-guide right now, but we intend to write one in February. Here is a table comparing the features of ncollide to the features of Parry:

Bounding volumes
Distance computation
Intersection test
Sweep test
Contact computation
Contact manifolds computation
Approximate Convex DecompositionVHACDHACD
Mass properties computation
All shapes are serializable
Generic wrt. the scalar type
Procedural mesh generation
NarrowPhase, BroadPhase, CollisionWorld

In addition, Parry implements much more efficient algorithms for contact manifold generation, and a more robust 3D convex-hull implementation.

The pipelining features of ncollide like the CollisionWorld have not been included in Parry because we are still unsure where we want this to go. We don't want it to just be an inferior version of the pipelining we already have in Rapier, so we need more time to think about it.

Rapier 0.5.0

Similar to Parry, we released two new creates for Rapier: rapier2d-f64 and rapier3d-f64. These crates are for 2D and 3D physics simulation using 64-bit floats.

Thanks to the switch to Parry, the version of 0.5.0 of Rapier comes with a fair amount of new features. Here are some of the most important ones:

  • The QueryPipeline is now able to perform scene-wide shape-casts (aka. sweep tests), point projections, and shape intersection tests. Note that shape-casting is essential for writing a character controller based on kinematic bodies.
  • It is now possible to use custom shapes with Rapier.
  • It is now possible to use a convex polygon (in 2D) or convex polyhedron (in 3D) as a collider shape.
  • It is now possible to use concave shapes after they have been decomposed into convex parts. A convenient ColliderBuilder::convex_decomposition is provided to perform an approximate convex decomposition automatically.
  • It is now possible to use different rules (average, min, max, multiply) for combining two friction and restitution coefficients.
  • It is now possible to scale the gravity applied to each rigid-body. Setting this scale factor to zero will effectively make the rigid-body unaffected by gravity.

You may see the CHANGELOG of Rapier for more details on other changes we made in 0.5.0.

JS bindings 0.3 for Rapier 0.5

Because Rapier 0.5.0 contained so many new features, we updated our JS bindings to expose most of these new features. You may see the CHANGELOG of rapier.js for the details on all changes we made in 0.3.0 to expose these new features.

In addition, we released two new NPM packages for the JS bindings of rapier: @dimforge/rapier2d-compat and @dimforge/rapier3d-compat. Thanks to Manuel Adameit for making this possible. These two packages are designed to be easier to integrate into any build system (with or without bundler). Instead of containing a .js and a .wasm file, these -compat packages only contain one .js which itself contains the WASM encoded in Base64.

What's next

At the beginning of this year, we announced our 2021 roadmap for Rapier. So far we implemented and released all the features that were announced to be available in February. So we will continue to follow this roadmap with the following objectives for next month:

  • Add the support of contact modification in Rapier. This will allow you to easily simulate, e.g., conveyor belts and one-way platforms.
  • Add the support for dominance in Rapier. This will make some object (typically the player modeled as a dynamic body) immune to forces applied by a selection of other objects.

These two features should actually be fairly quick to implement considering we already made some modifications to prepare for this future work. Therefore, we have a few more objective for next month:

  • Improve the user-guides of Rapier and make a user-guide for Parry.
  • Start the SIMD optimization work on Salva.
  • Review, and publish a new crate: nalgebra-sparse for sparse matrix computation. Currently, nalgebra has a limited support of sparse matrices when its sparse feature is enabled. Thanks to the huge contribution of Andreas Longva, our sparse matrix support will be completely rewritten and extracted into a new crate.


We would like to thank Embark Studio for being our new donor on GitHub sponsors! This helps us tremendously to sustain our 100% free and open-source work.

We would like to thank the whole community and code contributors. In particular, thanks to the code contributors from the past two months1:

  • Thanks to users reporting spelling mistakes on the documentation. This is always appreciated.
  • Thanks to users joining us on our discord server to provide feedbacks, discuss features, and get assistance!

Finally, thanks to all the former, current and new supporters through GitHub sponsors! This help is greatly appreciated and allows us to continue working on open-source exclusively.

  1. The list of contributors is automatically generated from the past two months' github commit history. Don't hesitate to let us know if your name should have been mentioned here.