JoltPhysics README

The project's README from github.com/jrouwe/JoltPhysics. As one markdown file: README.md.

CLA assistant Build Status Quality Gate Status Bugs Code Smells Coverage

Jolt Physics

A multi core friendly rigid body physics and collision detection library. Suitable for games and VR applications. Used by Horizon Forbidden West and Death Stranding 2: On the Beach.

Horizon Forbidden West Cover Art Death Stranding 2 Cover Art

Ragdoll Pile
A YouTube video showing a ragdoll pile simulated with Jolt Physics.

For more demos and videos go to the Samples section.

Design considerations

Why create yet another physics engine? Firstly, it has been a personal learning project. Secondly, I wanted to address some issues that I had with existing physics engines:

Features

Supported platforms

Required CPU features

Documentation

To get started, look at the HelloWorld example. A HelloWorld example using CMake FetchContent is also available to show how you can integrate Jolt Physics in a CMake project.

Every feature in Jolt has its own sample. Running the Samples application and browsing through the code is a great way to learn about the library!

To learn more about Jolt go to the latest Architecture and API documentation. Documentation for a specific release is also available.

Some algorithms used by Jolt are described in detail in my GDC 2022 talk: Architecting Jolt Physics for 'Horizon Forbidden West' (slides, slides with speaker notes, video).

Compiling

If you want to run on Platform Blue you'll need to provide your own build environment and PlatformBlue.h due to NDA requirements. This file is available on the Platform Blue developer forum.

For build instructions go to the Build section. When upgrading from an older version of the library go to the Release Notes or API Changes sections.

Performance

If you're interested in how Jolt scales with multiple CPUs and compares to other physics engines, take a look at this document.

Folder structure

Bindings for other languages

Integrations in other engines

See a list of projects that use Jolt Physics here.

License

The project is distributed under the MIT license.

Contributions

All contributions are welcome! If you intend to make larger changes, please discuss first in the GitHub Discussion section. For non-trivial changes, we require that you agree to a Contributor Agreement. When you create a PR, CLA assistant will prompt you to sign it.

Note that all PRs will be squashed before merging, so there's no need to force-push to git to keep the history clean.

JoltPhysics (jrouwe/JoltPhysics)

Searching Database…

这是什么?Jolt Physics 是一个对多核友好的刚体物理与碰撞检测库,使用 C++ 编写,面向游戏和 VR 应用。它是 'Horizon Forbidden West' 和 'Death Stranding 2: On the Beach' 背后的引擎。
这是完整的游戏引擎,还是只是一个可以接入其他项目的物理库?它是一个独立的物理与碰撞检测库,而不是完整的游戏引擎。它旨在嵌入你自己的游戏或引擎中,并且已经与 Godot、Source Engine 和 Unreal 集成。
我该如何把它加入我的项目?可以使用 CMake 构建,也可以通过 CMake FetchContent 引入,方式参见 HelloWorld 示例。它可以使用 Visual Studio 2022+、Clang 16+ 或 GCC 12+,以 C++17 标准编译。
我构建它需要额外的外部库吗?不需要。Jolt 只依赖标准模板库,不使用 RTTI 或异常,因此只需一个符合标准的 C++17 编译器即可。
如果我需要联网物理,模拟是否具有确定性?模拟是确定性的,因此你只需复制输入,就能在远程客户端上复现模拟结果。不过 README 指向单独的 'Deterministic Simulation' 文档,说明此保证的确切限制。
它实际支持哪些平台和 CPU?支持 Windows、Linux、FreeBSD、Android、macOS 和 iOS,覆盖 x86/x64/ARM/RISC-V/PowerPC 架构,另外还支持 MSYS2 MinGW64 以及单独的 WebAssembly 构建。在 x86/x64 上,最低 CPU 要求为 SSE2;ARM64 使用 NEON。
它能处理布料或头发等软体,而不仅仅是刚体吗?可以。它支持软体模拟(边、弯曲、压力和牵拉约束,适用于布料或球类等物体),还支持基于 Cosserat 杆、由 GPU 驱动的发丝模拟。
我能在 C++ 以外的语言中使用 Jolt 吗?可以。社区已经提供了 C、C#、Java/Kotlin、JavaScript、Rust、Python、Zig 和 Jai 的绑定。
作者为什么又写了一个物理引擎?它最初是作者的个人学习项目,旨在解决作者在现有引擎中看到的并发问题,例如让碰撞查询和物体加载能够在多线程下安全运行,而无需锁住整个模拟。
我可以模拟哪些类型的物体和约束?刚体形状包括球体、盒子、胶囊体、凸包、网格和高度场;约束种类丰富,包括铰链、滑块、锥形、齿轮、滑轮、摆扭和 6 自由度约束;还支持轮式、履带式和摩托车等车辆的完整模拟。
What are similar projects?box2d, bullet3, cocos2d-x, box3d, taskflow, OpenRCT2, bgfx, assimp
Creator
jrouwe
Size
30.7 MB
Stars
11.8K
Age
5y
Commits · 90 Days