Bullet
LiquidFun
Our great sponsors
Bullet | LiquidFun | |
---|---|---|
40 | 12 | |
11,765 | 4,632 | |
1.7% | 0.6% | |
3.4 | 0.0 | |
7 days ago | 11 months ago | |
C++ | C++ | |
GNU General Public License v3.0 or later | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Bullet
-
Does anyone know any good open source project to optimize?
I suspect most C++ physics libraries like Box2D (https://github.com/erincatto/box2d) or Bullet3 (https://github.com/bulletphysics/bullet3) could really benefit a lot from SIMD.
- After months of work, I'm excited to share the first release of Godot Jolt, an extension that integrates the Jolt physics engine into Godot, demonstrated using GDQuest's RoboBlast
-
X4's Upcoming Multiplayer Features Are a Huge Step Forward
No, they replaced Bullet with Jolt. That is considerably more than "some adjustment", regardless of what you think of the result.
-
Brick Breaker
Vulkan graphics via Intel GVK, and physics via Bullet
-
Ive been programming for four years and I told my dad to watch long videos and complete your own projects to learn most efficiently. He thinks he’s ready to tackle any project after a ten minute video…
The first two have a bunch of great examples, and I’m tying them together by refactoring some of the THREE examples to fit the ECS paradigm defined in AFrame. then upping the ante by adding physics using AMMO, which is more challenging since it’s only a partial implementation of Bullet, and already poorly documented (yet popular) physics engine.
- Recommended Physics Engine?
-
C# Game engine - suggestions
Integrate a 3D physics engine like Bullet3D
-
Convenient CPU feature detection and dispatch in the Magnum Engine
Bullet: https://github.com/bulletphysics/bullet3/blob/5ae9a15ecac7bc7e71f1ec1b544a55135d7d7e32/src/LinearMath/btCpuFeatureUtility.h
-
Legged Robots in Ignition / Gazebo
If you are not constrained to using Gazebo as the simulation environment, I would also suggest pybullet. (Here)[https://github.com/bulletphysics/bullet3/blob/master/examples/pybullet/examples/quadruped.py] is the quadruped simulation script, it is super simple to get it running and also meets your requirements(as mentioned in the question)
-
Newton Dynamics vs Bullet Physics for Game Engine?
Someone I know is fond of using the term 'bus factor' when discussing libraries like these, as in "how many people need to get killed by a bus in order for the project to die?" Both Newton and Bullet have a bus factor of 1, meaning 1 particular guy needs to get hit and the lion's share of commit contributions comes to an end, although Bullet bus factor is probably slightly higher than Newton.
LiquidFun
- Most Popular C[++] Open-Source Physics Engines
-
Show HN: WASM and WebGL Fluid Simulation
Author here. This demo showcases liquidfun-wasm[0], my effort to revive liquidfun[1] (a fork which adds fluid simulation and soft-body physics to Box2D[2]).
to make liquidfun-wasm, I repurposed my existing box2d-wasm[3] and pointed it at a different release of Box2D — a commit obtained by rebasing liquidfun over 7 years of upstream Box2D changes[4]. the end result is that liquidfun is now distributed in WebAssembly and with TypeScript typings for the first time. The TypeScript typings are generated from WebIDL bindings via my webidl-to-ts[5] compiler.
this demo in particular aims to bring to the Web the shaders from the liquidfun EyeCandy demo[6], and show how fast JS can run if you avoid incurring the garbage collector (the main loop tries not to allocate objects). the demo repurposes gravity and drag calculations that I'd used previously in my Lunar Survey experiment[7] (a Mario Galaxy homage).
[0] https://github.com/Birch-san/box2d-wasm/releases/tag/liquidf...
[1] http://google.github.io/liquidfun/
[2] https://github.com/erincatto/box2d
[3] https://github.com/Birch-san/box2d-wasm
[4] https://github.com/Birch-san/box2d-wasm/releases/tag/v4.0.0-...
[5] https://github.com/Birch-san/box2d-wasm/tree/master/webidl-t...
[6] https://github.com/google/liquidfun/blob/master/liquidfun/Bo...
Liquidfun [0] diverged from Box2D at v2.3.0, circa November 2013.
liquidfun-wasm [1] is my effort to rebase the liquidfun contributions onto latest Box2D, v2.4.1 (October 2020), and to distribute it in WebAssembly with TypeScript typings.
this work is detailed in liquidfun-wasm's first release notes. [2]
I've also enabled WASM SIMD acceleration (via LLVM's autovectorizer) on supported devices. Haven't yet measured what performance difference this makes.
yeah, I've played around with a few approaches for running the timestep and for some reason I don't feel like I get the same results as liquidfun.js.
their loop [0] is pretty simple; it's scheduled by `requestAnimationFrame`, advances time by 1/60th of a second, and runs their default of 3 particle iterations. it completes the physics simulation within 3.9–5.5ms, which is easily in time for the 16ms deadline. the rendering is WebGL, which I assume fits easily into that 16ms budget too.
my loop [1] is more complicated; I don't hardcode the timestep to 1/60 seconds, because requestAnimationFrame may be scheduled less frequently than that. so instead I advance time by the time elasped since I was last scheduled. hm, I think there's a mistake there — `lastMs = nowMs` is probably on the wrong side of the physics calculation.
there's an additional technique I use: I put a `Math.min()` over the simulation interval, so that I don't attempt to simulate more than 20ms (this can happen if you get scheduled infrequently due to hot CPU or backgrounding the app) — simulating too much time will make us fail our frame deadline anyway.
furthermore, if we are calculating more than 1/60th of a second, I employ more particle iterations (i.e. 3 particle iterations for every 1/60th of a second that passes). this gave me good results, but turns out it is based on incorrect assumptions (iterations are unrelated to timestep)[3]. moreover, I may be making mistakes in my decision of whether to round this fraction up/down.
if too few particle iterations for a timestep: the particles will bounce. if too many: the particles will look too incompressible[4]. I think that's the "solid-like" structure you're describing.
the main reason I complicated this is because the last one I did[5] made me feel motion-sick. I think if "every 1/60th, or 1/30th, or 1/20th of a second: you simulate a 1/60th of a second of time": the result (if you're not scheduled consistently) is that the world speed keeps changing. I think liquidfun.js's approach should be vulnerable to this, but for some reason it looks fine to me. maybe they get scheduled more consistently than me (even though by my measurements, my physics runs slightly faster, so should be able to achieve similar results).
I think I need to remind myself of what happens if I program the timestep in the simple way that liquidfun.js did. will try that out at some point.
[0] https://github.com/google/liquidfun/blob/master/liquidfun/Bo...
[1] https://github.com/Birch-san/liquidfun-play-2/blob/master/sr...
[2] https://github.com/Birch-san/liquidfun-play-2/blob/master/sr...
[3] http://google.github.io/liquidfun/Programmers-Guide/html/md_...
[4] http://google.github.io/liquidfun/Programmers-Guide/html/md_...
yes, I compiled with -msimd128 to enable LLVM's auto-vectorization. I distribute both SIMD and non-SIMD, and the entrypoint picks whichever distribution your browser supports. for box2d-wasm, SIMD acceleration resulted in a 0.6–0.9% performance boost [0] when simulating a pyramid of boxes.
liquidfun-wasm is a fork with additional algorithms for performantly simulating particles. I have not yet built a benchmark to measure the particle code, but do intend to. I am optimistic that liquidfun's particle code could auto-vectorize better than the general Box2D code.
the Google engineers considered how to take advantage of SIMD, to the extent that they even ship a NEON SIMD algorithm[1]. I don't believe my compiler config will use that NEON algorithm (and will instead fallback to the general algorithm [2]). that's probably not a missed opportunity; many NEON features are not supported[3]. but since the engineers were thinking about SIMD, hopefully the non-NEON algorithm will try to make good use of the CPU and memory layout too, and auto-vectorize well.
[0] https://github.com/Birch-san/box2d.ts/pull/1
[1] https://github.com/google/liquidfun/blob/master/liquidfun/Bo...
[2] https://github.com/google/liquidfun/blob/master/liquidfun/Bo...
[3] https://emscripten.org/docs/porting/simd.html#compiling-simd...
-
[AskJS] How could I implement realistic fluids simulations (SPH?) in my video game?
It should be possible to produce simulations like the ones they produced in JS: http://google.github.io/liquidfun/
-
Hello!
He was involved in an open-source project titled LiquidFun, which was released late in 2013 and unfortunately only went through 3 versions, ending developmentin mid 2014. https://github.com/google/liquidfun/releases
What are some alternatives?
PhysX - NVIDIA PhysX SDK
Box2D - Box2D is a 2D physics engine for games
CHRONO - High-performance C++ library for multiphysics and multibody dynamics simulations
Newton Dynamics - Newton Dynamics is an integrated solution for real time simulation of physics environments.
ODE
mujoco - Multi-Joint dynamics with Contact. A general purpose physics simulator.
Simbody - High-performance C++ multibody dynamics/physics library for simulating articulated biomechanical and mechanical systems like vehicles, robots, and the human skeleton.
Godot - Godot Engine – Multi-platform 2D and 3D game engine
reactphysics3d - Open source C++ physics engine library in 3D
raylib - A simple and easy-to-use library to enjoy videogames programming
Chipmunk - A fast and lightweight 2D game physics library.