{"id":13544665,"url":"https://github.com/taichi-dev/taichi_elements","last_synced_at":"2025-04-04T10:02:29.278Z","repository":{"id":40547071,"uuid":"231448642","full_name":"taichi-dev/taichi_elements","owner":"taichi-dev","description":"High-performance multi-material continuum physics engine in Taichi","archived":false,"fork":false,"pushed_at":"2023-02-09T19:39:30.000Z","size":319,"stargazers_count":447,"open_issues_count":19,"forks_count":67,"subscribers_count":26,"default_branch":"master","last_synced_at":"2024-03-15T10:22:34.089Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taichi-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-01-02T19:46:31.000Z","updated_at":"2024-04-14T21:38:02.166Z","dependencies_parsed_at":"2024-04-14T21:48:03.497Z","dependency_job_id":null,"html_url":"https://github.com/taichi-dev/taichi_elements","commit_stats":{"total_commits":245,"total_committers":18,"mean_commits":13.61111111111111,"dds":"0.42040816326530617","last_synced_commit":"2451c9843a7058a1edcd10e448460f4ba509ecc4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taichi-dev%2Ftaichi_elements","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taichi-dev%2Ftaichi_elements/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taichi-dev%2Ftaichi_elements/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taichi-dev%2Ftaichi_elements/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taichi-dev","download_url":"https://codeload.github.com/taichi-dev/taichi_elements/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149505,"owners_count":20891954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T11:00:52.064Z","updated_at":"2025-04-04T10:02:29.234Z","avatar_url":"https://github.com/taichi-dev.png","language":"Python","funding_links":[],"categories":["Simulation","Python","**Simulation**","Applications"],"sub_categories":["Dough","**Simulation**"],"readme":"# Taichi Elements [![Build Status](https://travis-ci.com/taichi-dev/taichi_elements.svg?branch=master)](https://travis-ci.com/taichi-dev/taichi_elements) [![Code Coverage](https://codecov.io/gh/taichi-dev/taichi_elements/branch/master/graph/badge.svg)](https://codecov.io/gh/taichi-dev/taichi_elements)\n*Taichi elements* is a high-performance multi-material continuum physics engine (work in progress).\n\n## Features:\n\n- Cross-platform: Windows, Linux, and OS X\n- Supports multi-threaded CPUs and massively parallel GPUs\n- Supports multiple materials, including water, elastic objects, snow, and sand\n- Supports (virtually) infinitely large simulation domains\n- Supports [sparse grids](https://docs.taichi.graphics/lang/articles/advanced/sparse)\n- Highly efficient and scalable, especially on GPUs\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n## Using `taichi_elements` in Python\n\n\u003cbr\u003e\n\n### Run demo with Python\n\n - Install [taichi](https://github.com/taichi-dev/taichi) with `pip`: `python3 -m pip install taichi`\n - Execute `python3 download_ply.py` to download model files used by the demos\n - Execute `python3 demo/demo_2d.py` and you will see\n\n\u003cimg src=\"https://github.com/yuanming-hu/public_files/raw/master/graphics/elements/demo_2d.gif\"\u003e\n\n - Execute `python3 demo_3d.py` and you will see a 3D simulation visualized in 2D\n - Execute `python3 demo_3d_ggui.py` and you will see a 3D simulation rendered with [GGUI](https://docs.taichi.graphics/lang/articles/misc/ggui). Note that GGUI requires Vulkan so please make sure your platform supports that.\n\n\u003cimg src=\"https://github.com/taichi-dev/public_files/raw/master/taichi_elements/demo_3d_ggui.gif\" style=\"zoom:40%;\" /\u003e\n\n - Execute `python3 demo/demo_2d_sparse_active_blocks.py` to get a visual understanding of Taichi sparse computation\n\n\u003cimg src=\"https://raw.githubusercontent.com/taichi-dev/public_files/master/taichi_elements/sparse_mpm_active_blocks.gif\" height=\"600px\"\u003e\n\n\u003cbr\u003e\n\n### To simulate and render an example 3D scene with Python\n- Make sure you have a modern NVIDIA GPU (e.g. GTX 1080)\n- Execute `python3 download_ply.py` to download model files\n- Run `python3 demo/demo_3d_letters.py` (wait for at least 10 frames)\n   - A binary particle folder with a timestamp in its time (e.g., `sim_2020-07-27_20-55-48`) will be created under the current folder.\n- Example:\n\n ```bash\npython3 render_particles.py \\\n     -i ./path/to/particles \\\n     -b 0 -e 400 -s 1 \\\n     -o ./output \\\n     --gpu-memory 20 \\\n     -M 460 \\\n     --shutter-time 0.0 \\\n     -r 128\n ```\n - Images are in the `output/` folder. For example, 100 million MPM particles simulated in 8 hours on a V100 GPU:\n\n[[Watch on YouTube]](https://youtu.be/klMDVUzFFnk)\n\u003cimg src=\"https://raw.githubusercontent.com/taichi-dev/public_files/master/taichi_elements/100Mparticles.jpg\" height=\"600px\"\u003e\n\n- Here is a one-billion-particle simulation on a GPU with `80` GB memory. Each particle takes 40 bytes, thanks to [quantization](https://github.com/taichi-dev/quantaichi).\n\nhttps://user-images.githubusercontent.com/2309174/162767279-2ced8a2f-38bd-42d6-9bb8-a827144464ff.mp4\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n## Using `taichi_elements` in Blender\n\n\u003cbr\u003e\n\n### Installing Taichi for Blender\n(Not sure if it is the standard approach, but it works for now.)\n - Install Blender `3.4.1`\n - Find the Python3 executable bundled in Blender. Open a console in Blender and type in\n ```python\n import sys\n print(sys.exec_prefix)\n ```\n  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`\n - Install [pip](https://pip.pypa.io/en/stable/installing/) using that Python executable\n - Install Taichi: `./python3.7m -m pip install --upgrade taichi` (Note: as of Oct 8 2021, Taichi version is `v0.8.1`. Please use the latest version.)\n\n\u003cbr\u003e\n\n### Installing taichi_elements (experimental) for Blender\n - Set the environment variable `BLENDER_USER_ADDON_PATH`, e.g. `/home/XXX/.config/blender/2.81/scripts/addons`\n - Go to `utils` folder\n - Execute `python3 install_blender_addon.py` to install the addon\n   - If you are doing development and wish to **k**eep refreshing the installed addon, add an argument `-k`.\n - Restart Blender to reload the addon\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaichi-dev%2Ftaichi_elements","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaichi-dev%2Ftaichi_elements","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaichi-dev%2Ftaichi_elements/lists"}