Happy new year everyone!
Welcome to the third edition of This month in rustsim. This monthly newsletter will provide you with a summary of important update that occurred within the rustsim organization. This includes in particular updates about the nphysics, ncollide, nalgebra, and alga crates.
Release date: february 3rd 2019
During the path few months, we described several new unreleased features in ncollide and nphysics (in particular related to deformable bodies). This month's issue also describes ongoing developments which are not released yet. All this will be released february 3rd 2019! Here is a summary of the major new features you will get:
nphysics2d and nphysics3d v0.19:
- Support of three different kinds of deformable bodies using three different models: constraints-based, mass-spring based, FEM-based.
- Support of using heightmaps and capsules as shapes.
- Simpler ways (using the builder pattern) of creating a rigid-body, multibody, deformable bodies, and colliders.
- User-data associated to bodies.
ncollide2d and ncollide3d v0.18:
- Support for collision objects with a shape that can change after it has been added to the collision world.
This includes modifying the vertices of a
- Support of heightmap and capsule shapes (more about this later in this post).
- New range-based indexing methods. For example this will allow you to write
matrix.get(4, 5..9)to extract as a vector the rows 5 to 9 of the column at index 4. See the PR from jswrenn for more details.
- All the incremental improvements made since the version 16.0. See the full list on the changelog.
The goal of january 2019 will be to clean things up for this release. Note that updates of the online user-guide will not be released the 3rd of february but all examples on the github repo. will be updated.
Goals for 2019
Here are our main goals for the year 2019:
- Add support for fluid dynamics based on SPH (Smoothed Particle Hydrodynamics).
- Re-implement CCD (Continuous Collision Detection) support.
- Improve overall performances by leveraging SIMD and optional parallelism.
- Work with the amethyst community to make nphysics easier to integrate to their game engine (and ECS in general). Note that they have already started some great work regarding this integration by creating the work-in-progress crate: nphysics-ecs-dumb (kudos to distransient and jojolepro!)
The main goal of ncollide will be to include whatever change is necessary for nphysics to achieve its goal. In particular improvements are to be expected for:
- Computation of time-of-impact between moving shapes.
- Improvement of the broad-phase.
- Addition of a new deformable geometry described as a set of spheres that will be used for fluid particles.
- Performance improvements using SIMD (see that issue).
- Better complex number support by improving some abstractions on the alga crate.
- Basic sparse matrix support by polishing and completing the work done in the sparse branch.
We will also work in porting the rusty-machine crate to nalgebra and transfer it to the rustsim organization as discussed on that issue. Our goal is to offer a steadier maintenance level as well as communication tools (discord and user-forum) so this great crate remains available and useful to the community in a long term. We have already started adding some feature missing from nalgebra to achieve this migration. See that PR.
Progress of current developments
Improvements on nphysics
The two last necessary features have been implemented:
- Support for points of deformable bodies with a fixed position in space so you can attach a deformable body to the ground with no additional computational cost. See the first video bellow.
- Support for constraints-based joints on multibodies. This allows you to attach a deformable body to any other kind
of body using, for example, a
FixedConstraint. See the second video bellow.
Improvements on ncollide
In the deformable branch on ncollide, we added:
- Full support of the
Capsuleshape so you can use it for contact determination.
- Support for the
Heightfieldshape (aka. heigthmaps). Almost everything is implemented (including collision detection). The only missing part is the computation of point-projection. It is possible to define holes in the heightmap by indicating which triangles of which squares are to be ignored.
The following video shows the use of both the
Heightfield shape within nphysics3d and nphysics2d:
Improvements on nalgebra
Two significant contributions were made to nalgebra and nalgebra-glm:
- A new matrix indexing method has been implemented by jswrenn. This makes it easier to extract a slice of a matrix using range notation. Details and examples can be found there.
- Implementation of most variants of perspective and orthographic projections have been added to nalgebra-glm by MindSpunk. See that PR for details on what functions have been added (note that the Cargo features proposed in the PR description have not been merged).
We would like to thank the whole community and contributors. In particular:
- Thanks to jswrenn for his numerous contributions on nalgebra, including the great addition of the new indexing method.
- Thanks to MindSpunk for implementing all the variants of orthographic and perspective projection on nalgebra-glm.
- Thanks to all the other contributors not mentioned explicitly on this list.
- 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 current and new patrons supporting the lead developer of the current crates part of this organization on patreon!