Soft2D
A 2D multi-material continuum physics engine designed for real-time applications.
|
Soft2D is a 2D multi-material continuum physics engine designed for real-time applications. With soft2d, users can simulate various deformable objects, such as fluids, sand, snow, and elastic bodies within their applications.
Soft2D runs on GPU, leveraging the Taichi AOT (Ahead-of-Time) system for enhanced portability. The host logic of soft2d is written in C++, and for user convenience, we offer a comprehensive suite of easy-to-use interfaces in C language.
Download link: soft2d-release.
A minimal example of soft2d is shown as the following C++ code:
Note: The above snippet can not be executed directly as the
WorldConfig
is not fully specified. A minimal runnable example can be found here.
More user examples can be found in the github repository soft2d-release.
Soft2D currently supports Vulkan and Metal backends. The table below illustrates the engine's compatibility across various platforms. For any specific requests regarding platform compatibility, feel free to contact us.
Backend | Linux | Windows | MacOS | iOS | Android |
---|---|---|---|---|---|
CPU | |||||
Vulkan | Y | Y | Y | ||
Metal | Y | Y | |||
CUDA | P | P | |||
OpenGL | |||||
DirectX |
For the convenience of game developers, we also provide a free-to-access unity plugin - Soft2D for Unity, which allows users to build simulation scenes in a low-code way.