I got sucked down a Geometric Algebra rabbit hole a few months ago, which seems like a remarkably concise and intuitive way to work in a very wide variety of geometries, including 2D, 3D, 4D+, non-euclidean etc. I've wondered if GA would make a good foundation for a physics engine...
There are a few small rust libraries that look interesting [1][2], but none with a lot of traction.
Has anyone looked into this?
[1]: https://crates.io/keywords/geometric-algebra
[2]: https://github.com/Lichtso/geometric_algebra
If you dare, a good place to jump in might be Freya Holmér's Why can't you multiply vectors? - https://www.youtube.com/watch?v=htYh-Tq7ZBI - Then https://bivector.net/index.html
I wrote a guide on the Bevy plugin for Rust which you can read here: https://taintedcoders.com/bevy/rapier/
An interesting alternative in the Bevy space is Bevy XPBD which I also wrote about: https://taintedcoders.com/bevy/xpbd/
Dimforge is really doing god's work. I would be so excited if nalgebra + Rust can replace Eigen + C++ for robotics stuff like localization and mapping.
From building a rigid body physics engine decades ago I remember that stacking was a very hard problem. The best solution at the time to avoid objects sinking into the ground was to create a directed acyclic graph, starting with the ground and pushing bodies outward. It required multiple iterations to converge and felt very hacky. Does anyone know if this problem has been solved nowadays? I couldn’t find any mention of stacking in this project.
Rust keeps proving the stereotype true lol. 50 game engines written in rust but only 5 games made in rust.
I tried to build a small web demo with Rapier too https://github.com/iErcann/NotRoblox (no rust)
What I like : - Good documentation compared to AmmoJS (you need to read pybullet)
- Recent
- You can run it server side (Node) & client side (Browser), here I'm running it server side but it's possible to do both and implement client side prediction + reconciliation
- Small bundle (AmmoJS was like 2 MB?)
Really good JS interoperability too: https://www.rapier.rs/docs/user_guides/javascript/getting_st...
I’ll never be able to read "rapier" and not think of https://youtu.be/K_rZ27Jdc00?si=rqibtrXl-Wpa49gr
These guys (Dimforge) used to have a physics engine called nphysics that supported soft bodies and multibodies. It's now been deprecated in favor of Rapier, which doesn't support those or half the other things that nphysics did. As a result, nphysics is so old that it can't be used with the modern ecosystem, but Rapier is so new that it's far less capable.
This has happened before as well, they used to have a fluid simulation library called Salva that supported two-way coupling with nphysics, and ran on all GPUs/CPUs, but that's deprecated in favor of Sparkl which doesn't, and also only supports CUDA. As a result, Salva is about as old as nphysics, but Sparkl is so new that it's also far less capable, and it also has no cross-platform support. Seemingly intentionally! (Rewrite to make this code less cross-platform.)
Hopefully one day the constant rewrites will stop and they'll settle on something that actually supports everything it should. Until then though, I don't see the dimforge ecosystem working out for me if they keep losing features each rewrite. After all, how do I know that Rapier isn't going to get deprecated in favor of something even newer that doesn't support half the features Rapier does?
Sure, give them a break. It's new! It doesn't support all the features that the more mature nphysics does. And that's exactly why the more mature nphysics is completely deprecated and unmaintained in favor of... oh, wait.
These would be unrealistic concerns only if dimforge didn't already have a track record. :(
I get that one day Rapier might be up to feature parity with what nphysics already had five years ago, but that's a completely arbitrary five-year setback for developers who want to build on these features that are currently missing.
I made a simple web game using Rapier that takes advantage of the deterministic physics to prevent cheating by running physics and computing win/loss states on the server (though I stupidly haven’t implemented the high score board yet).
It’s an homage to the old Taito electric arcade game “Ice Cold Beer”
On the same topic I really like Matthias Müller's lectures and simple and readable JS code "Ten Minute Physics"
https://matthias-research.github.io/pages/tenMinutePhysics/i...
What is the main feature? I hope it's not "Rust".
Anyone know how this compares to something like Box2D? (apart from also supporting 3D)
Oh awesome! I was just putting together some utilities for a barebones, no-bundler, vanilla javascript game library, and was wondering what kind of physics engine would work for demonstrating it. This looks perfect! I love that you already have the compatibility libraries available.
Actually, now that I take a look at the webpage, I really love everything this company is doing. Very interested in working with these libraries!
Using rapier along side three js, overall I really like it. But lack of documentation on wasm make me jump back and forth on rust version
I tried to make a robot simulator with rapier, with a mixed sucess: https://grgv.xyz/blog/simulator4/ The performance is great but realism of joints and motors is lacking, and not suitable realistic simulation.
If you are into Svelte we have a nice API for you: https://threlte.xyz/docs/reference/rapier/getting-started
Related to 3D but different from physics engines: for those interested in BREP (boundary representation) CAD kernels, you might be interested in the open source Rust project called Fornjot.
How good is it suited for neuro evolution? i.e.:
* Can it do multiple concurrent headless simulations on GPU?
* Can it handle many Mobs/NPCs interacting with each other? (1.000? 1.000.000?)
* Is there a limit on the frame rate?
The demos don't work on Firefox 123.0 for me
How does it compare to MuJoCo?
How does it compare to Jolt?
[dead]
I built a game using Rapier! Using its deterministic mode, I built an online multiplayer game whereby players take turn slamming bugs against the other team and capture the hill.
It doesn't have a single-player mode yet (writing an AI for it is a bit more challenging than the chess-like I made) but check it out at https://evrimzone.itch.io/crittershowdown and the physics/game logic source code at https://github.com/evrimoztamur/crittershowdown/blob/e4d9a19....
I plan to write a post about how I wired it together and what I learned, but overall very solid library and well-thought of Rust-y API that enabled me to do everything I needed it to.