Skip to content

High-performance continuum physics engine in Taichi (work in progress)

Notifications You must be signed in to change notification settings

taichi-gardener/taichi_elements

 
 

Repository files navigation

Taichi Elements

High-Performance Multi-Material Continuum Physics Engine (work in progress).

The solver is being developed using Taichi, therefore it is cross-platform and supports multithreaded CPUs and massively parallel GPUs.

The short-term plan is

  • To build a reusable multimaterial (water/elastic/snow/sand/mud) simulator
  • To integrate the simulator into Blender

How to run (without Blender)

  • Install Taichi with pip
  • python3 demo_2d.py and you will see

  • python3 demo_3d.py and you will see a 3D simulation visualized in 2D.

Installing Taichi for Blender

(Not sure if it is the standard approach, but it works for now.)

  • Find the Python3 executable bundled in Blender. Open a console in Blender and type in
import sys
print(sys.exec_prefix)

The output looks like /XXX/blender-2.81a-linux-glibc217-x86_64/2.81, which means python3 is located at /XXX/blender-2.81a-linux-glibc217-x86_64/2.81/python/bin/python3.7

  • Install pip using that Python executable
  • Install Taichi: ./python3.7m -m pip install taichi-nightly

Installing taichi_elements (experimental) for Blender

  • Set the environment variable BLENDER_USER_ADDON_PATH, e.g. /home/XXX/.config/blender/2.81/scripts/addons
  • Execute python3 install_blender_addo.py to install the addon
    • If you are doing development and wish to keep refreshing the installed addon, add argument -k.
  • Restart Blender to reload the addon

About

High-performance continuum physics engine in Taichi (work in progress)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%