Coder Social home page Coder Social logo

taichi-dev / soft2d-release Goto Github PK

View Code? Open in Web Editor NEW
49.0 4.0 7.0 10.58 MB

Soft2D: A 2D multi-material continuum physics engine designed for real-time applications.

Home Page: https://www.soft2d.tech/

License: Apache License 2.0

CMake 4.85% C++ 70.24% C 23.08% Shell 0.67% Batchfile 1.16%
fluid fluid-simulation physics physics-2d physics-engine physics-simulation snow-simulation sand-simulation softbody-simulation

soft2d-release's Introduction

soft2d-release

This is soft2d's official repository for the latest releases, user examples, and documentation. The user documentation is hosted here.

Introduction

Soft2D is a 2D multi-material continuum physics engine designed for real-time applications. With soft2d, users can simulate various materials such as fluids, sand, snow, and elastic bodies within their applications. Soft2D runs on GPU, and currently supports Vulkan and Metal backends.

Soft2D is distributed as shared library binary files and header files. These files are under the soft2d/ directory. Additionally, soft2d relies on the Taichi C-API library. The Taichi C-API library is located at dependencies/taichi_c_api/, which has the same directory structure as soft2d/.

Binary Compatibility

Here we list the ABI compatibility of soft2d binary files:

  • Linux: x86-64 (Tested on Ubuntu 20.04 and Ubuntu 22.04)
  • Windows: x86-64 (Tested on Windows 10 with Visual Studio 2022)
  • macOS: arm64-m1 (Tested on Ventura)
  • iOS: aarch64
  • Android: arm64-v8a

User Examples

A preview of user examples.

Under the examples/ directory, we provide a collection of user examples demonstrating the capabilities of soft2d. These examples can run on Linux and Windows with Vulkan installed. All examples have been tested on Ubuntu 20.04/22.04 and Windows 10 with Visual Studio 2022. Follow the steps below to build and run these examples.

Video-version of these examples can be found on Soft2D YouTube channel.

Project Cloning

  • Use git-lfs to clone binary files correctly.
  • Use git submodule to install the necessary third-party dependencies for the Vulkan renderer.
# git clone ...
# cd soft2d-release/
git lfs pull
git submodule update --init --recursive

Vulkan Installation

Please install Vulkan SDK from vulkan-sdk website, and make sure Vulkan-related environment variables (VULKAN_SDK) are properly configured.

Running the Examples

Linux and Windows users can use the following commands to build and run the examples:

Linux

  • Clean the build directory: ./build_linux.sh --clean
  • Run the minimal test (No GUI): ./build_linux.sh --test
  • Run a specific example: ./build_linux.sh --example=<example_name>
    • For instance, to run examples/basic_shapes.cpp, please use the command ./build_linux.sh --example=basic_shapes
  • Build all examples: ./build_linux.sh
    • All output executables will be stored under the build/ directory.

Windows

  • Clean the build directory: .\build_windows.bat --clean
  • Run the minimal test (No GUI): .\build_windows.bat --test
  • Run a specific example: .\build_windows.bat --example=<example_name>
    • For instance, to run examples/basic_shapes.cpp, please use the command .\build_windows.bat --example=basic_shapes
  • Build all examples: .\build_windows.bat
    • All output executables will be stored under the build/Release/ directory.

soft2d-release's People

Contributors

chuandongyan avatar karm0tr1ne avatar ltt1598 avatar yucrazing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.