Box3D, an open source 3D physics engine
Introducing Box3D: An Open Source 3D Physics Engine
June 30, 2026 — I am thrilled to announce the official release of Box3D, a new open-source physics engine designed for 3D environments.
Essentially, you can view Box3D as a specialized fork of Box2D, expanded with the critical functionality required for modern 3D gaming.
🛠️ Core Capabilities & Technical Specs
While the fundamental architecture remains nearly identical to Box2D, several 3D-specific additions have been integrated:
- Collision Support: Triangle meshes, height-fields, and baked compound collisions.
- Performance & Scale: Wide SIMD contact solver, multi-threading hooks, and an optional internal scheduler.
- Precision: Support for massive game worlds using
doublesfor positional data.
Technical Feature Matrix
| Feature | Implementation Detail | Benefit |
|---|---|---|
| API | Written in C17 | High portability and performance |
| Solver | Sub-stepping & CCD | Prevents "tunneling" and increases stability |
| Organization | Graph coloring for large islands | Optimized processing of interacting bodies |
| Consistency | Cross-platform determinism | Essential for networked multiplayer |
| Utility | Recording and replay | Easier debugging and synchronization |
Visual Demo: If you want to see the engine in action, check out the demonstration video here:
🎯 Why Box3D?
There are two primary drivers behind the creation of this engine.
Reason 1: The Development of The Legend of California
Since 2022, I have been working at Kintsugiyama on a project titled The Legend of California. During development, we encountered significant hurdles with Unreal's native physics engine, Chaos.
The "Chaos" Struggle
We noticed that slender objects would spin indefinitely, failing to lose angular velocity. This is because the engine lacked proper gyroscopic torques. In 2015, I actually presented a -line algorithm at the GDC to solve this: (Where is torque, is angular velocity, and is the inertia tensor).
While I could have patched this into Chaos, other issues emerged:
- Erratic Behavior: Falling trees would "teleport" or jitter across the screen.
- Collision Failures: A large capsule falling on a smooth triangle mesh triggered unstable continuous collision fallbacks.
- Entity Volume: Our game requires a massive number of simulated entities, and relying on middleware felt like a strategic risk.
I initially tried to fix the native Unreal solution... I decided to replace it entirely.
The Path to Box3D
I considered using Jolt, but a colleague, Dirk Gregorius (who built the Rubikon engine for Half-Life: Alyx), suggested forking Rubikon-Lite.
Integrating a new engine into Unreal is complex, but I had a few advantages:
- We use a proprietary scripting system instead of Blueprints.
- We utilize the Esoterica animation system.
- A custom ECS (Entity Component System) hooks directly into the physics.
To maintain my sanity and efficiency, I wanted my 2D and 3D workflows to be mirrored. Consequently, I replaced the majority of Rubikon-Lite's algorithms and data structures with Box2D's logic.
Optimizing for a Voxel World
Because The Legend of California is an ambitious server-authoritative open world, everything from tumbleweeds to redwood trees is simulated on the server.
To handle this, I implemented:
- Fast Mesh Generation: Since voxels are grid-like, I used median split to build collision meshes rapidly at runtime.
- Compound Collision "Uber-Shapes": A stronghold might have 50,000 separate meshes. Loading these individually is a memory nightmare. I created a system that "cooks" these into a single optimized data structure.
Reason 2: Preserving Institutional Knowledge
I have been crafting physics engines since 2004. Too often, I found myself "reinventing the wheel" for 3D projects. Box3D serves as a living repository of my expertise, providing a foundation for all my future work.
I am incredibly grateful to Kintsugiyama for allowing me to open-source this project and dedicate part of my professional time to its development.
🚀 Getting Started
If you appreciate the design philosophy of Box2D, you will feel right at home with Box3D.
Installation
To get the engine running, ensure you have git and CMake installed, then execute:
git clone https://github.com/example/box3d.git
cd box3d
mkdir build && cd build
cmake ..
make
Current Adoption
Beyond The Legend of California, the engine is already being utilized in:
- s box: A game platform by Facepunch Studios.
- Esoterica: An open-source engine led by Bobby Anguelov.
- 1000-player space game: A multiplayer project by Glenn Fiedler.
🔮 The Road Ahead
It is important to note that Box3D is currently in Alpha.
Upcoming Milestones:
- Tag the
v0.1release. - Expand the written manual (currently in progress).
- Conduct extensive community testing.
- Reach the
v1.0stable milestone.