https://github.com/st-tech/ppf-contact-solver
A contact solver for physics-based simulations involving ๐ shells, ๐ชต solids and ๐ชข rods.
https://github.com/st-tech/ppf-contact-solver
cloth collision contact physics simulation
Last synced: 5 days ago
JSON representation
A contact solver for physics-based simulations involving ๐ shells, ๐ชต solids and ๐ชข rods.
- Host: GitHub
- URL: https://github.com/st-tech/ppf-contact-solver
- Owner: st-tech
- License: apache-2.0
- Created: 2024-11-21T02:20:52.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-05-18T03:27:21.000Z (6 days ago)
- Last Synced: 2026-05-18T04:55:40.439Z (6 days ago)
- Topics: cloth, collision, contact, physics, simulation
- Language: Python
- Homepage:
- Size: 22.3 MB
- Stars: 1,614
- Watchers: 21
- Forks: 95
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
# ZOZO's Contact Solver ๐ซถ
A contact solver for physics-based simulations
involving ๐ shells, ๐ชต solids and ๐ชข rods. All made by [ZOZO, Inc.](https://corp.zozo.com/en/), the largest fashion e-commerce company in Japan.
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/getting-started.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/run-all-once.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/run-all-once-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/make-docs.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/build-docker.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/release-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/blender.yml)

> ๐ค We **highly** respect that readers expect to hear the author's original voice and tone, which we work to retain throughout. Our use of LLMs is clarified in [(Markdown)](./articles/llm_transparency.md).
## ๐ Quick Look
๐จ Simulate remotely from our [Blender add-on](https://st-tech.github.io/ppf-contact-solver) (screenshots taken on macOS; you can also run locally if you have a modern NVIDIA GPU on Windows or Linux)
๐ Or double click `start.bat` (Windows) or run a Docker command (Linux/Windows) to get it running

๐ Click the URL and explore our examples

## โจ Highlights
- **๐ช Robust**: Contact resolutions are penetration-free. No snagging intersections.
- **โฒ Scalable**: An extreme case includes beyond 180M contacts. Not just one million.
- **๐ฒ Cache Efficient**: All on the GPU runs in single precision. No double precision.
- **๐ฅผ Not Rubbery**: Triangles never extend beyond strict upper bounds (e.g., 1%).
- **๐ Finite Element Method**: We use FEM for deformables and symbolic force jacobians.
- **โ๏ธ Highly Stressed**: We run GitHub Actions to run stress tests [10 times in a row](#๏ธ-ten-consecutive-runs).
- **๐ Massively Parallel**: Both contact and elasticity solvers are run on the GPU.
- **๐ช Windows Executable**: No installation wizard shown. Just unzip and run [(Video)](https://zozo.box.com/s/9rthkw122fyss5qxuf5mie9xywg7jzdz).
- **๐ณ Docker Sealed**: All can be deployed fast. The image is ~1GB.
- **๐ JupyterLab Included**: Open your browser and run examples right away [(Video)](https://zozo.box.com/s/jgd6ijfmwee04vvnnfzapq7m2eq7cxy8).
- **๐ Documented Python APIs**: Our Python code is fully [docstringed](https://st-tech.github.io/ppf-contact-solver/jupyterlab_api/module_reference.html) and lintable [(Video)](https://zozo.box.com/s/52atrfn70vn8u07iwzbyrrz5ameczo03).
- **โ๏ธ Cloud-Ready**: Our solver can be seamlessly deployed on major cloud platforms.
- **๐จ Blender Add-on**: Simulate remotely and fetch results locally, even on macOS.
- **๐ค MCP Support**: Let a LLM run simulations for you using natural language.
- **โจ Stay Clean**: You can remove all traces after use.
- **๐ Permissive License**: Apache 2.0 allows commercial and proprietary use.
> โ ๏ธ Built for offline uses; not real time. Some examples may run at an interactive rate.
## ๐ Table of Contents
- [๐ Change History](#-change-history)
- [๐ Technical Materials](#-technical-materials)
- [โก๏ธ Requirements](#๏ธ-requirements)
- [๐จ Getting Started](#-getting-started)
- [๐ช Windows Native Executable](#-windows-native-executable)
- [๐ณ Docker (Linux and Windows)](#-docker-linux-and-windows)
- [๐ How To Use](#-how-to-use)
- [๐จ Blender Add-on](#-blender-add-on)
- [๐ JupyterLab](#-jupyterlab)
- [๐ Python APIs and Parameters](#-python-apis-and-parameters)
- [๐ Obtaining Logs](#-obtaining-logs)
- [๐ผ๏ธ Catalogue](#๏ธ-catalogue)
- [๐จ Blender Add-on Examples](#-blender-add-on-examples)
- [๐ JupyterLab Examples](#-jupyterlab-examples)
- [๐ฐ Budget Table on AWS](#-budget-table-on-aws)
- [๐๏ธ Large Scale Examples](#๏ธ-large-scale-examples)
- [๐ GitHub Actions](#-github-actions)
- [โ๏ธ Ten Consecutive Runs](#๏ธ-ten-consecutive-runs)
- [๐ฆ Action Artifacts](#-action-artifacts)
- [๐ก Deploying on Cloud Services](#-deploying-on-cloud-services)
- [๐ฆ Deploying on vast.ai](#-deploying-on-vastai)
- [๐ฆ Deploying on Scaleway](#-deploying-on-scaleway)
- [๐ฆ Deploying on Amazon Web Services](#-deploying-on-amazon-web-services)
- [๐ฆ Deploying on Google Compute Engine](#-deploying-on-google-compute-engine)
- [๐ค Community Works](#-community-works)
- [๐งฉ Blender Add-ons](#-blender-add-ons)
- [๐บ Videos](#-videos)
- [๐ฐ Articles](#-articles)
- [๐ฃ Sharing Your Work](#-sharing-your-work)
- [๐ผ Commercial Use and Beyond](#-commercial-use-and-beyond)
- [๐ฌ Contributing](#-contributing)
- [๐ Acknowledgements](#-acknowledgements)
### ๐ Advanced Contents
- ๐ง Setting Up Your Development Environment [(Markdown)](./articles/develop.md#-setting-up-your-development-environment)
- ๐ Bug Fixes and Updates [(Markdown)](./articles/bug.md)
## ๐ Change History
- (2026.04.30) Added a Blender Add-on support. See the [documentation](https://st-tech.github.io/ppf-contact-solver).
- (2025.12.18) Added native Windows standalone executable build support [(Video)](https://zozo.box.com/s/9rthkw122fyss5qxuf5mie9xywg7jzdz).
- (2025.11.26) Added [large-woven.ipynb](./examples/large-woven.ipynb) [(Video)](https://zozo.box.com/s/kc81msjfo4yw9eozn8i8bean0gbph0pj) to [large scale examples](#๏ธ-large-scale-examples).
- (2025.11.12) Added [five-twist.ipynb](./examples/five-twist.ipynb) [(Video)](https://zozo.box.com/s/36h8jpu5vcgc5t4xln2l68afj7izsx4h) and [large-five-twist.ipynb](./examples/large-five-twist.ipynb) [(Video)](https://zozo.box.com/s/v62q7cbfnpl3hufwwy2nmewyes2w1iw6) showcasing over 180M count. See [large scale examples](#๏ธ-large-scale-examples).
- (2025.10.03) Massive refactor of the codebase [(Markdown)](./articles/refactor_202510.md). Note that this change includes breaking changes to our Python APIs.
- (2025.08.09) Added a hindsight note in [eigensystem analysis](./articles/eigensys.md) to acknowledge prior work by [Poya et al. (2023)](https://romeric.github.io/).
- (2025.05.01) Simulation states now can be saved and loaded [(Video)](https://zozo.box.com/s/7v0exrbptvfli4o4z91pqtmz0tehdn62).
More history records
- (2025.04.02) Added 9 examples. See the [catalogue](#๏ธ-catalogue).
- (2025.03.03) Added a [budget table on AWS](#-budget-table-on-aws).
- (2025.02.28) Added a [reference branch and a Docker image of our TOG paper](#-technical-materials).
- (2025.02.26) Added Floating Point-Rounding Errors in ACCD in [hindsight](./articles/hindsight.md).
- (2025.02.07) Updated the [trapped example](./examples/trapped.ipynb) [(Video)](https://zozo.box.com/s/lnnyeqrvm86rxnwyjxhojfj0jgm5nphn) with squishy balls.
- (2025.03.03) Added a [budget table on AWS](#-budget-table-on-aws).
- (2025.02.28) Added a [reference branch and a Docker image of our TOG paper](#-technical-materials).
- (2025.02.26) Added Floating Point-Rounding Errors in ACCD in [hindsight](./articles/hindsight.md).
- (2025.02.07) Updated the [trapped example](./examples/trapped.ipynb) [(Video)](https://zozo.box.com/s/lnnyeqrvm86rxnwyjxhojfj0jgm5nphn) with squishy balls.
- (2025.1.8) Added a [domino example](./examples/domino.ipynb) [(Video)](https://zozo.box.com/s/p5ksfqja1ew3c6vntco5zq6g0kgf7xoo).
- (2025.1.5) Added a [single twist example](./examples/twist.ipynb) [(Video)](https://zozo.box.com/s/4phoyyeertd2mcfv436kp2ojmo1x0eio).
- (2024.12.31) Added full documentation for Python APIs, parameters, and log files [(GitHub Pages)](https://st-tech.github.io/ppf-contact-solver).
- (2024.12.27) Line search for strain limiting is improved [(Markdown)](./articles/bug.md#new-strain-limiting-line-search)
- (2024.12.23) Added [(Bug Fixes and Updates)](./articles/bug.md)
- (2024.12.21) Added a [house of cards example](./examples/cards.ipynb) [(Video)](https://zozo.box.com/s/7c114pua0107xkz4nc3bwfdzpkhgn1o9)
- (2024.12.18) Added a [frictional contact example](./examples/friction.ipynb): armadillo sliding on the slope [(Video)](https://zozo.box.com/s/15r5o7rrowwtbrsrjjpj35v8xt92ufhr)
- (2024.12.18) Added a [hindsight](./articles/hindsight.md) noting that the tilt angle was not $30^\circ$, but rather $26.57^\circ$
- (2024.12.16) Removed thrust dependencies to fix runtime errors for the driver version `560.94` [(Issue Link)](https://github.com/st-tech/ppf-contact-solver/issues/1)
## ๐ Technical Materials
#### ๐ **A Cubic Barrier with Elasticity-Inclusive Dynamic Stiffness**
- ๐ Published in [ACM Transactions on Graphics (TOG) Vol.43, No.6](https://dl.acm.org/doi/abs/10.1145/3687908)
- ๐ฅ Main video [(Video)](https://zozo.box.com/s/ylyv8798ue38ra5vqo2dgjhx48edy6j9)
- ๐ฅ Additional video examples [(Directory)](https://zozo.box.com/s/inyyosspazk7z79zf9yeikt4xxy641g3)
- ๐ฅ Presentation videos [(Short)](https://zozo.box.com/s/fv07obu61ajn8s8s6ub9i7j9id5h4l2v) [(Long)]()
- ๐ Main paper [(PDF)](https://zozo.box.com/s/ckss1ejz0lbw848pg1qo7eqtvujsogy5) ([Hindsight)](./articles/hindsight.md)
- ๐ Supplementary PDF [(PDF)](https://zozo.box.com/s/ylqjobig0bq55eox5evjt49u2tcyqljm)
- ๐ค Supplementary scripts [(Directory)](https://zozo.box.com/s/m6h1t5eykdsuynx7kqr3wqi9789pfl9n)
- ๐ Singular-value eigenanalysis [(Markdown)](./articles/eigensys.md)
##### ๐ Reference Implementation
The main branch is undergoing frequent updates and will deviate from the paper.
To retain consistency with the paper, we have created a new branch ```sigasia-2024```.
- ๐ ๏ธ Only maintenance updates are planned for this branch.
- ๐ซ General users *should not* use this branch as it is not optimized for best performance.
- ๐ซ All algorithmic changes listed in this [(Markdown)](./articles/bug.md) are excluded from this branch.
- ๐ฆ We also provide a pre-compiled Docker image: ```ghcr.io/st-tech/ppf-contact-solver-compiled-sigasia-2024:latest``` of this branch.
- ๐ [Template Link for vast.ai](https://cloud.vast.ai?ref_id=85288&template_id=0c7544fb5eda5ac95bf945c6b1249175)
## โก๏ธ Requirements
- ๐ฅ A modern NVIDIA GPU (CUDA 12.8 or newer)
- ๐ป x86 architecture (arm64 is not supported)
- ๐ณ A Docker environment (see [below](#-docker-linux-and-windows)) or ๐ช Windows 10/11 for native executable (see [below](#-windows-native-executable))
- ๐จ Blender 5+ (only if you intend to use the Blender add-on)
## ๐จ Getting Started
Whether you plan to use the Blender add-on or the JupyterLab interface, the solver engine itself must first be deployed. The steps below apply to both.
> โ ๏ธ Do not run `warmup.py` locally. If you do, you are very likely to hit failures and find it difficult to cleanup.
#### ๐ช Windows Native Executable
For Windows 10/11 users, a self-contained executable (~320MB) is available.
No Python, Docker, or CUDA Toolkit installation is needed.
All should simply work out of the box [(Video)](https://zozo.box.com/s/9rthkw122fyss5qxuf5mie9xywg7jzdz).
> ๐ค If you are cautious, you can review the [build workflow](https://github.com/st-tech/ppf-contact-solver/actions/workflows/release-win.yml) to verify safety yourself.
We try to maximize transparency; **we never build locally and upload.**
1. Install the latest NVIDIA driver [(Link)](https://www.nvidia.com/en-us/drivers/)
2. Download the latest release from [GitHub Releases](https://github.com/st-tech/ppf-contact-solver/releases) and unzip
3. Double click `start.bat`
JupyterLab frontend will auto-start. You should be able to access it at .
#### ๐ณ Docker (Linux and Windows)
Install a NVIDIA driver [(Link)](https://www.nvidia.com/en-us/drivers/) on your host system and follow the instructions below specific to the operating system to get a Docker running:
๐ง Linux | ๐ช Windows
----|----
Install the Docker engine from here [(Link)](https://docs.docker.com/engine/install/). Also, install the NVIDIA Container Toolkit [(Link)](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). Just to make sure that the Container Toolkit is loaded, run `sudo service docker restart`. | Install the Docker Desktop [(Link)](https://docs.docker.com/desktop/setup/install/windows-install/). You may need to log out or reboot after the installation. After logging back in, launch Docker Desktop to ensure that Docker is running.
Next, run the following command to start the container. If no edits are needed, just copy and paste:
##### ๐ช Windows (PowerShell)
```bash
$MY_WEB_PORT = 8080 # JupyterLab port on your side
$MY_BLENDER_PORT = 9090 # Solver port for the Blender add-on
$IMAGE_NAME = "ghcr.io/st-tech/ppf-contact-solver-compiled:latest"
docker run --rm -it `
--name ppf-contact-solver `
--gpus all `
-p ${MY_WEB_PORT}:${MY_WEB_PORT} `
-p ${MY_BLENDER_PORT}:${MY_BLENDER_PORT} `
-e WEB_PORT=${MY_WEB_PORT} `
$IMAGE_NAME # Image size ~1GB
```
##### ๐ง Linux (Bash/Zsh)
```bash
MY_WEB_PORT=8080 # JupyterLab port on your side
MY_BLENDER_PORT=9090 # Solver port for the Blender add-on
IMAGE_NAME=ghcr.io/st-tech/ppf-contact-solver-compiled:latest
docker run --rm -it \
--name ppf-contact-solver \
--gpus all \
-p ${MY_WEB_PORT}:${MY_WEB_PORT} \
-p ${MY_BLENDER_PORT}:${MY_BLENDER_PORT} \
-e WEB_PORT=${MY_WEB_PORT} \
$IMAGE_NAME # Image size ~1GB
```
The image download shall be started.
Our image is hosted on [GitHub Container Registry](https://github.com/st-tech/ppf-contact-solver/pkgs/container/ppf-contact-solver-compiled) (~1GB).
JupyterLab will then auto-start.
Eventually you should be seeing:
```
==== JupyterLab Launched! ๐ ====
http://localhost:8080
Press Ctrl+C to shutdown
================================
```
Next, open your browser and navigate to . The port `8080` can change if you change the `MY_WEB_PORT` variable.
Keep your terminal window open.
Now you are ready to go! ๐
#### ๐ Shutting Down
To shut down the container, just press `Ctrl+C` in the terminal.
The container will be removed and all traces will be cleaned up. ๐งน
> If you wish to keep the container running in the background, replace `--rm` with `-d`. To shutdown the container and remove it, run `docker stop ppf-contact-solver && docker rm ppf-contact-solver`.
#### ๐ง Advanced Installation
If you wish to build the docker image from scratch, please refer to the cleaner installation guide [(Markdown)](./articles/install.md).
## ๐ How To Use
We provide two frontends: a Blender add-on and a JupyterLab interface. The Blender add-on lets you build scenes and run simulations entirely within Blender's UI, while JupyterLab lets you script everything in Python from your browser. Both communicate with the same solver engine, so pick whichever you like.
In both cases, you can interact with the simulator on your laptop while the actual simulation runs on a remote headless server over the internet.
This means that **you don't have to own NVIDIA hardware**, but can rent it at [vast.ai](https://vast.ai) for less than $0.5 per hour.
That said, if you do have a modern NVIDIA GPU on a local Windows or Linux machine, you can also run the solver directly on it.
Actually, this [(Video)](https://zozo.box.com/s/jgd6ijfmwee04vvnnfzapq7m2eq7cxy8) was recorded on a [vast.ai](https://vast.ai) instance.
The experience is good! ๐
### ๐จ Blender Add-on
Our Blender add-on aims to offer a familiar UI that best feels like everything works locally, but under the hood, it communicates with a remote server where **all** simulations run, and then the results are fetched back.
This provides a unique experience where users can leverage powerful **remote** GPUs while working seamlessly in their local Blender environment. Remarkably, our Blender add-on works even on **macOS** systems ๐, unlike other CUDA-based physics simulator add-ons that require local NVIDIA GPUs.
More importantly, **you can work on a laptop without worrying about draining the battery fast**. ๐
Follow this page [How to Install](https://st-tech.github.io/ppf-contact-solver/blender_addon/getting_started/install.html) to learn how to install the add-on. For a thorough walk through workflow, we refer to our documentation below:
Here are some highlights:
#### ๐ Docs Look
We maintain a [full docs site](https://st-tech.github.io/ppf-contact-solver) with workflow guides and recorded walkthroughs for the add-on:

Workflow documentation page. (Link)
Video tutorials page. (Link)
#### ๐ผ๏ธ UI Look
Here are a couple of screenshots of the add-on running inside Blender:

Kite scene set up in Blender. (full-size)
Zebra scene set up in Blender. (full-size)

#### ๐ค From Natural Language to Simulation (via MCP)
We expose all of the add-on's tools through an MCP server, so any LLM (Claude, Codex, etc.) can drive the whole pipeline from a natural language prompt. Scene building, parameter tweaks, and running the simulation all happen without UI clicks. Here are two examples:

Codex (left) driving Blender (right) through the add-on's MCP server.
A prompt: drape a sheet over a sphere and make an animation video mp4 render 300 frames.
#### ๐ From a Python Script to Simulation
You can also drive the entire pipeline from a Python script inside Blender's scripting editor. This is handy for procedural scene setup and batch variant generation. Below is a full example that drapes a sheet over a sphere:
```python
import addon_utils
import importlib
import bpy
# Look up the add-on module under whichever extension repository Blender
# installed it into and grab the public solver API.
addon = next(m for m in addon_utils.modules() if m.__name__.endswith(".ppf_contact_solver"))
solver = importlib.import_module(f"{addon.__name__}.ops.api").solver
# Reset any prior state.
solver.clear()
# Create a sphere (the static collider) at the origin.
bpy.ops.mesh.primitive_ico_sphere_add(subdivisions=4, radius=0.5, location=(0, 0, 0))
bpy.context.object.name = "Sphere"
# Create a 2x2 sheet just above the sphere as a 64x64 grid.
bpy.ops.mesh.primitive_grid_add(x_subdivisions=64, y_subdivisions=64, size=2, location=(0, 0, 0.6))
sheet = bpy.context.object
sheet.name = "Sheet"
# Pin the two corners on the -x edge via a vertex group.
vg = sheet.vertex_groups.new(name="Corners")
corner_indices = [
i for i, v in enumerate(sheet.data.vertices)
if v.co.x < -0.99 and abs(abs(v.co.y) - 1.0) < 0.01
]
vg.add(corner_indices, 1.0, "REPLACE")
# Build solver groups.
cloth = solver.create_group("Cloth", type="SHELL")
cloth.add("Sheet")
cloth.param.enable_strain_limit = True
cloth.param.strain_limit = 0.05
cloth.param.bend = 1
ball = solver.create_group("Ball", type="STATIC")
ball.add("Sphere")
# Pin the two sheet corners.
cloth.create_pin("Sheet", "Corners")
# Scene parameters.
solver.param.frame_count = 100
solver.param.step_size = 0.01
```
Here's how the script runs inside Blender [(full-size)](https://zozo.box.com/s/m86w3jyprvz5dug2pr7k73bozdbgldfl):

For the full `solver.*` surface, see the [Blender Python API guide](https://st-tech.github.io/ppf-contact-solver/blender_addon/integrations/python_api.html).
### ๐ JupyterLab
Our frontend is accessible through a browser using our built-in JupyterLab interface.
All is set up when you open it for the first time.
Results can be interactively viewed through the browser and exported as needed.
Our Python interface is designed with the following principles in mind:
- **๐ ๏ธ In-Pipeline Tri/Tet Creation**: Depending on external 3D/CAD softwares for triangulation or tetrahedralization makes dynamic resolution changes cumbersome. We provide handy `.triangulate()` and `.tetrahedralize()` calls to keep everything in-pipeline, allowing users to skip explicit mesh exports to 3D/CAD software.
- **๐ซ No Mesh Data Included**: Preparing mesh data using external tools can be cumbersome. Our frontend minimizes this effort by allowing meshes to be created on the fly or downloaded when needed.
- **๐ Method Chaining**: We adopt the method chaining style from JavaScript, making the API intuitive to understand and read smoothly.
- **๐ฆ Single Import for Everything**: All frontend features are accessible by simply importing with `from frontend import App`.
Here's an example of draping five sheets over a sphere with two corners pinned.
We have more examples in the [examples](./examples/) directory. Please take a look! ๐
```python
# import our frontend
from frontend import App
# make an app
app = App.create("drape")
# create a square mesh resolution 128 spanning the xz plane
V, F = app.mesh.square(res=128, ex=[1, 0, 0], ey=[0, 0, 1])
# add to the asset and name it "sheet"
app.asset.add.tri("sheet", V, F)
# create an icosphere mesh radius 0.5
V, F = app.mesh.icosphere(r=0.5, subdiv_count=4)
# add to the asset and name it "sphere"
app.asset.add.tri("sphere", V, F)
# create a scene
scene = app.scene.create()
# define gap between sheets
gap = 0.01
for i in range(5):
# add the sheet asset to the scene with an vertical offset
obj = scene.add("sheet").at(0, gap * i, 0)
# pick two corners
corner = obj.grab([1, 0, -1]) + obj.grab([-1, 0, -1])
# pin the corners
obj.pin(corner)
# set the strict limit on maximum strain to 5% per triangle
obj.param.set("strain-limit", 0.05)
# add a sphere mesh at a lower position with jitter and set it static collider
scene.add("sphere").at(0, -0.5 - gap, 0).jitter().pin()
# compile the scene and report stats
scene = scene.build().report()
# preview the initial scene, shows image left
scene.preview()
# create a new session with the compiled scene
session = app.session.create(scene)
# set session params
session.param.set("frames", 100).set("dt", 0.01)
# build this session
session = session.build()
# start the simulation and live-preview the results, shows image right
session.start().preview()
# also show streaming logs
session.stream()
# or interactively view the animation sequences
session.animate()
# export all simulated frames in (sequences of ply meshes + a video)
session.export.animation()
```

#### ๐ Python APIs and Parameters
- Full API documentation is available on our [GitHub Pages](https://st-tech.github.io/ppf-contact-solver/jupyterlab_api/module_reference.html). The major APIs are documented using docstrings and compiled with [Sphinx](https://www.sphinx-doc.org/en/master/)
We have also included [`jupyter-lsp`](https://github.com/jupyter-lsp/jupyterlab-lsp) to provide interactive linting assistance and display docstrings as you type. See this video [(Video)](https://zozo.box.com/s/52atrfn70vn8u07iwzbyrrz5ameczo03) for an example.
The behaviors can be changed through the settings.
- A list of parameters used in `param.set(key,value)` is documented here: [(Simulation Parameters)](https://st-tech.github.io/ppf-contact-solver/jupyterlab_api/simulation_parameters.html) [(Material Parameters)](https://st-tech.github.io/ppf-contact-solver/jupyterlab_api/material_parameters.html).
> โ ๏ธ Please note that our Python APIs are subject to breaking changes as this repository undergoes frequent iterations. If you need APIs to be fixed, please fork.
## ๐ Obtaining Logs
Logs for the simulation can also be queried through our Python APIs. Here's an example of how to get a list of recorded logs, fetch them, and compute the average.
```python
# get a list of log names
logs = session.get.log.names()
print(logs)
assert "time-per-frame" in logs
assert "newton-steps" in logs
# get a list of time per video frame
msec_per_video = session.get.log.numbers("time-per-frame")
# compute the average time per video frame
print("avg per frame:", sum([n for _, n in msec_per_video]) / len(msec_per_video))
# get a list of newton steps
newton_steps = session.get.log.numbers("newton-steps")
# compute the average of consumed newton steps
print("avg newton steps:", sum([n for _, n in newton_steps]) / len(newton_steps))
# Last 8 lines. Omit for everything.
print("==== log stream ====")
for line in session.get.log.stdout(n_lines=8):
print(line)
```
Below are some representatives.
`vid_time` refers to the video time in seconds and is recorded as `float`.
`ms` refers to the consumed simulation time in milliseconds recorded as `int`.
`vid_frame` is the video frame count recorded as `int`.
| **Name** | **Description** | **Format**
|---------------|----------------|------------
| time-per-frame | Time per video frame | `list[(vid_frame,ms)]` |
| matrix-assembly | Matrix assembly time | `list[(vid_time,ms)]` |
| pcg-linsolve | Linear system solve time | `list[(vid_time,ms)]` |
| line-search | Line search time | `list[(vid_time,ms)]` |
| time-per-step | Time per step | `list[(vid_time,ms)]` |
| newton-steps | Newton iterations per step | `list[(vid_time,count)]` |
| num-contact | Contact count | `list[(vid_time,count)]` |
| max-sigma | Max stretch | `list(vid_time,float)` |
The full list of log names and their descriptions is documented here: [(GitHub Pages)](https://st-tech.github.io/ppf-contact-solver/jupyterlab_api/log_channels.html).
Note that some entries have multiple records at the same video time. This occurs because the same operation is executed multiple times within a single step during the inner Newton's iterations. For example, the linear system solve is performed at each Newton's step, so if multiple Newton's steps are executed, multiple linear system solve times appear in the record at the same video time.
If you would like to retrieve the raw log stream, you can do so by
```python
# Last 8 lines. Omit for everything.
for line in session.get.log.stdout(n_lines=8):
print(line)
```
This will output something like:
```text
* dt: 1.000e-03
* max_sigma: 1.045e+00
* avg_sigma: 1.030e+00
------ newton step 1 ------
====== contact_matrix_assembly ======
> dry_pass...0 msec
> rebuild...7 msec
> fillin_pass...0 msec
```
If you would like to read `stderr`, you can do so using `session.get.stderr()` (if it exists).
This returns `list[str]`.
All the log files are updated in real-time and can be fetched right after the simulation starts; you don't have to wait until it finishes.
## ๐ผ๏ธ Catalogue
### ๐จ Blender Add-on Examples
These scenes are all built with our [add-on](#-blender-add-on). The simulation itself runs on a remote solver, or directly on your local machine if you have a modern NVIDIA GPU on Windows or Linux.
You set the geometry, constraints, and parameters from Blender's UI, and the saved `.blend` carries everything the add-on needs.
||||
|---|---|---|
|[kite.blend](https://zozo.box.com/s/j5tg9hy7nf1fdea1yg0s6holzwwus77t) [(Video)](https://zozo.box.com/s/7siwyp04s1vs48znwnt5vx1vhgodyr4h)|[crumple.blend](https://zozo.box.com/s/69ysygaqfud3bba8v3w33eqcbfn6l76u) [(Video)](https://zozo.box.com/s/ddrqqq87gpn0mekqx0yaukez87casten)|[puff.blend](https://zozo.box.com/s/mfc64djyjyunuhnmn51rm4jexxenx0si) [(Video)](https://zozo.box.com/s/8dpuoqbg80vxvxwsga36nz1633vx4k6u)|
||||
|[press.blend](https://zozo.box.com/s/n1upezi7j0eufmrsief4qh252of7g1nq) [(Video)](https://zozo.box.com/s/nt8s46e6kke9poruvxmtxv5v56p2ysit)|[zebra.blend](https://zozo.box.com/s/qcos081dolarpczz8mheegvwqalxcnu2) [(Video)](https://zozo.box.com/s/rvcqynftqk27fczplafm0wgt95xmhb1k)|[curtain.blend](https://zozo.box.com/s/f8775589v2jd3nnmm7dzjrfy44xmbuhl) [(Video)](https://zozo.box.com/s/e558genjdno7jz9m0svojte5eco6q7tm)|
||||
The simulated portion (objects, groups, pins, and solver parameters) is generated by a script you drop into Blender's Scripting editor. Cameras, lighting, and any non-simulated props are still set up in Blender's UI. Each script is linked above its thumbnail.
|||||
|---|---|---|---|
|[cards.py](./examples/blender/cards.py) [(Video)](https://zozo.box.com/s/3xihxxigc6atsoss4vrh72qppgdvihy5)|[five-twist.py](./examples/blender/five-twist.py) [(Video)](https://zozo.box.com/s/71a22jxs5r68wk08j283p4fwj1q4543u)|[noodle.py](./examples/blender/noodle.py) [(Video)](https://zozo.box.com/s/orx2xs715i15l4urmnxns8qs9djhntvs)|[woven.py](./examples/blender/woven.py) [(Video)](https://zozo.box.com/s/16pmmgkpk6r18ae90cwjaknod6cd7y2w)|
|||||
### ๐ JupyterLab Examples
All these examples run on our Python frontend through JupyterLab. Click any notebook to see how the scene is built, or click the video link to watch the result.
|||||
|---|---|---|---|
|[woven.ipynb](./examples/woven.ipynb) [(Video)](https://zozo.box.com/s/0kgqmurmahwpvufuplbse9f83lsd7cjs)|[stack.ipynb](./examples/stack.ipynb) [(Video)](https://zozo.box.com/s/cy0pmlu5wwzmhri2qhrereqgobbv4eh6)|[trampoline.ipynb](./examples/trampoline.ipynb) [(Video)](https://zozo.box.com/s/syi5q1ywgtwrqx1f9xcjgz5m4jzagdra)|[needle.ipynb](./examples/needle.ipynb) [(Video)](https://zozo.box.com/s/zlrb6xk4gg4yjm2tspyv6u2n8vlo3dyb)|
|||||
|[cards.ipynb](./examples/cards.ipynb) [(Video)](https://zozo.box.com/s/7c114pua0107xkz4nc3bwfdzpkhgn1o9)|[codim.ipynb](./examples/codim.ipynb) [(Video)](https://zozo.box.com/s/o3en7lkzz2xhi0i9hzfdidau7pp7nco2)|[hang.ipynb](./examples/hang.ipynb) [(Video)](https://zozo.box.com/s/lcgnivq93ahvp1uccw91t13ht6qggopx)|[trapped.ipynb](./examples/trapped.ipynb) [(Video)](https://zozo.box.com/s/lnnyeqrvm86rxnwyjxhojfj0jgm5nphn)|
|||||
|[domino.ipynb](./examples/domino.ipynb) [(Video)](https://zozo.box.com/s/p5ksfqja1ew3c6vntco5zq6g0kgf7xoo)|[noodle.ipynb](./examples/noodle.ipynb) [(Video)](https://zozo.box.com/s/wvsn7byr4yv80wixi5cs8mgoubco6kp4)|[drape.ipynb](./examples/drape.ipynb) [(Video)](https://zozo.box.com/s/fuisqc3wpnynd46mvdc7z2gat7mkjw07)|[five-twist.ipynb](./examples/five-twist.ipynb) [(Video)](https://zozo.box.com/s/36h8jpu5vcgc5t4xln2l68afj7izsx4h)|
|||||
|[ribbon.ipynb](./examples/ribbon.ipynb) [(Video)](https://zozo.box.com/s/qxsx2it6kvd6p5ufqtmge6pd63lmhcny)|[curtain.ipynb](./examples/curtain.ipynb) [(Video)](https://zozo.box.com/s/ii938zyr4ytks5bnpbch3ystztuqq8mu)|[fishingknot.ipynb](./examples/fishingknot.ipynb) [(Video)](https://zozo.box.com/s/56dqf3fmnd0qr9pptqe8u8mw8vooh01p)|[friction.ipynb](./examples/friction.ipynb) [(Video)](https://zozo.box.com/s/15r5o7rrowwtbrsrjjpj35v8xt92ufhr)|
|||||
|[belt.ipynb](./examples/belt.ipynb) [(Video)](https://zozo.box.com/s/7ovalnjrptprcib7z0hj85lvr3yuhroz)|[fitting.ipynb](./examples/fitting.ipynb) [(Video)](https://zozo.box.com/s/pdcswk4ytzqgo98cjo91ensprgxz2umm)|[roller.ipynb](./examples/roller.ipynb) [(Video)](https://zozo.box.com/s/5156ez3b7rsvldqbgxsd7irhwp7mo2nc)|[yarn.ipynb](./examples/yarn.ipynb) [(Video)](https://zozo.box.com/s/3ly6riq5id8y9ukvbpnfnlro3qttylxw)|
|||||
### ๐ฐ Budget Table on AWS
Below is a table summarizing the estimated costs for running our examples on a NVIDIA L4 instance `g6.2xlarge` at Amazon Web Services US regions (`us-east-1` and `us-east-2`).
- ๐ฐ Uptime cost is approximately $1 per hour.
- โณ Deployment time is approximately 8 minutes ($0.13). Instance loading takes 3 minutes, and Docker pull & load takes 5 minutes.
- ๐ฎ The NVIDIA L4 delivers [30.3 TFLOPS for FP32](https://www.nvidia.com/en-us/data-center/l4/), offering approximately 36% of the [performance of an RTX 4090](https://www.nvidia.com/en-us/geforce/graphics-cards/40-series/rtx-4090/).
- ๐ฅ Video frame rate is 60fps.
| **Example** | **Cost** | **Time** | **#Frame** | **#Vert** | **#Face** | **#Tet** | **#Rod** | **Max Strain** |
|--------------|-------|-------|-----|--------|--------|--------|---------|-----|
| trapped | $0.37 | 22.6m | 300 | 263K | 299K | 885K | ```N/A``` | ```N/A``` |
| twist | $0.91 | 55m | 500 | 203K | 406K | ```N/A``` | ```N/A``` | ```N/A``` |
| stack | $0.60 | 36.2m | 120 | 166.7K | 327.7K | 8.8K | ```N/A``` | 5% |
| trampoline | $0.74 | 44.5m | 120 | 56.8K | 62.2K | 158.0K | ```N/A``` | 1% |
| needle | $0.31 | 18.4m | 120 | 86K | 168.9K | 8.8K | ```N/A``` | 5% |
| cards | $0.29 | 17.5m | 300 | 8.7K | 13.8K | 1.9K | ```N/A``` | 5% |
| domino | $0.12 | 4.3m | 250 | 0.5K | 0.8K | ```N/A``` | ```N/A``` | ```N/A``` |
| drape | $0.10 | 3.5m | 100 | 81.9K | 161.3K | ```N/A``` | ```N/A``` | 5% |
| curtain | $0.33 | 19.6m | 300 | 64K | 124K | ```N/A``` | ```N/A``` | 5% |
| friction | $0.17 | 10m | 700 | 1.1K | ```N/A``` | 1K | ```N/A``` | ```N/A``` |
| hang | $0.12 | 7.5m | 200 | 16.3K | 32.2K | ```N/A``` | ```N/A``` | 1% |
| belt | $0.19 | 11.4m | 200 | 12.3K | 23.3K | ```N/A``` | ```N/A``` | 5% |
| codim | $0.36 | 21.6m | 240 | 122.7K | 90K | 474.1K | 1.3K | ```N/A``` |
| fishingknot | $0.38 | 22.5m | 830 | 19.6K | 36.9K | ```N/A``` | ```N/A``` | 5% |
| fitting | $0.03 | 1.54m | 240 | 28.4K | 54.9K | ```N/A``` | ```N/A``` | 10% |
| noodle | $0.14 | 8.45m | 240 | 116.2K | ```N/A``` | ```N/A``` | 116.2K | ```N/A``` |
| ribbon | $0.23 | 13.9m | 480 | 34.9K | 52.9K | 8.8K | ```N/A``` | 5% |
| woven | $0.58 | 34.6m | 450 | 115.6K | ```N/A``` | ```N/A``` | 115.4K | ```N/A``` |
| yarn | $0.01 | 0.24m | 120 | 28.5K | ```N/A``` | ```N/A``` | 28.5K | ```N/A``` |
| roller | $0.03 | 2.08m | 240 | 21.4K | 22.2K | 61.0K | ```N/A``` | ```N/A``` |
#### ๐๏ธ Large Scale Examples
Large scale examples are run on a [vast.ai](https://vast.ai) instance with an RTX 4090.
These examples are not included in GitHub Action tests since they can take days to finish.
| | | |
|---|---|---|
| [large-twist.ipynb](./examples/large-twist.ipynb) [(Video)](https://zozo.box.com/s/awtqwo572t7ixuy04va478zn6f69djlr) | [large-five-twist.ipynb](./examples/large-five-twist.ipynb) [(Video)](https://zozo.box.com/s/v62q7cbfnpl3hufwwy2nmewyes2w1iw6) | [large-woven.ipynb](./examples/large-woven.ipynb) [(Video)](https://zozo.box.com/s/kc81msjfo4yw9eozn8i8bean0gbph0pj) |
|  |  |  |
| Example | Commit | #Vert | #Face | #Rod | #Contact | #Frame | Time/Frame |
|---|---|---|---|---|---|---|---|
| large-twist | [cbafbd2](https://github.com/st-tech/ppf-contact-solver/tree/cbafbd2197fc7f28673386dfaf1e8d8a1be49937) | 3.2M | 6.4M | ```N/A``` | 56.7M | 2,000 | 46.4s |
| large-five-twist | [6ab6984](https://github.com/st-tech/ppf-contact-solver/commit/6ab6984d95f67673f1ebfdc996b0320123d88bed) | 8.2M | 16.4M | ```N/A``` | 184.1M | 2,413 | 144.5s |
| large-woven | [4c07b83](https://github.com/st-tech/ppf-contact-solver/commit/4c07b834b299e49bb08797940e9f0869789301b8) | 2.7M | ```N/A``` | 2.7M | 8.9M | 946 | 436.8s |
๐ Large scale examples take a very long time, and it's easy to lose connection or close the browser.
Our frontend lets you close and reopen it at your convenience. Just recover your session after you reconnect.
Here's an example cell how to recover:
```python
# In case you shutdown the server (or kernel) and still want
# to restart, do this.
# Do not run other cells used to create this scene.
# You can also recover this way if you closed the browser.
# Just directly run this in a new cell or in a new notebook.
from frontend import App
# recover the session
session = App.recover("app-name")
# resume if not currently running
if not App.busy():
session.resume()
# preview the current state
session.preview()
# stream the logs
session.stream()
```
## ๐ GitHub Actions
We implemented GitHub Actions that test all of our examples except for large scale ones, which take from days to weeks to finish.
We perform explicit intersection checks at the end of each step, which raises an error if an intersection is detected.
**This ensures that all steps are confirmed to be penetration-free if tests pass.**
The runner types are described as follows:
### [](https://github.com/st-tech/ppf-contact-solver/actions/workflows/getting-started.yml)
The tested runner of this action is the Ubuntu NVIDIA GPU-Optimized Image for AI and HPC with an NVIDIA Tesla T4 (16 GB VRAM) with Driver version ``570.133.20``.
This is not a self-hosted runner, meaning that each time the runner launches, all environments are fresh. ๐ฑ
### [](https://github.com/st-tech/ppf-contact-solver/actions/workflows/run-all-once.yml) [](https://github.com/st-tech/ppf-contact-solver/actions/workflows/run-all-once-win.yml)
We use the GitHub-hosted runner, but the actual simulation runs on a `g6e.2xlarge` AWS instance.
Since we start with a fresh instance, the environment is clean every time.
We take advantage of the ability to deploy on the cloud; this action is performed in parallel, which reduces the total action time.
### [](https://github.com/st-tech/ppf-contact-solver/actions/workflows/blender.yml)
This action exercises our [Blender add-on](#-blender-add-on) on free GitHub-hosted Linux and macOS runners in parallel. Blender 5.1.1 is installed from the official Blender Foundation mirror, the Rust solver is built in CPU-emulated mode (no CUDA required), and the add-on is installed as a Blender 5 extension. A headless test rig then runs the full scenario registry covering add-on UI flows.
### ๐ฆ Action Artifacts
We generate zipped action artifacts for each run. These artifacts include:
- **๐ Logs**: Detailed logs of the simulation runs.
- **๐ Metrics**: Performance metrics and statistics.
- **๐น Videos**: Simulated animations.
Please note that these artifacts will be deleted after a month.
### โ๏ธ Ten Consecutive Runs
We know that you can't judge the reliability of contact resolution by simply watching a single success video example.
To ensure greater transparency, we implemented GitHub Actions to run many of our examples via automated GitHub Actions, not just once, but **10 times in a row** for both Docker and Windows.
This means that **a single failure out of 10 tests is considered a failure of the entire test suite!**
Also, we apply small jitters to the position of objects in the scene, so **at each run, the scene is slightly different.**
##### ๐ช Windows Native
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/drape-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/cards-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/curtain-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/friction-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/hang-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/needle-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/stack-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/trampoline-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/trapped-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/twist-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/five-twist-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/domino-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/belt-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/codim-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/fishingknot-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/fitting-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/noodle-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/ribbon-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/woven-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/yarn-win.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/roller-win.yml)
##### ๐ง Linux
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/drape.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/cards.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/curtain.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/friction.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/hang.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/needle.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/stack.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/trampoline.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/trapped.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/twist.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/five-twist.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/domino.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/belt.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/codim.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/fishingknot.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/fitting.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/noodle.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/ribbon.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/woven.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/yarn.yml)
[](https://github.com/st-tech/ppf-contact-solver/actions/workflows/roller.yml)
## ๐ก Deploying on Cloud Services
Running our solver on the cloud has a few practical advantages:
- **๐ฐ Pay only when you use it**: Spin up an instance, run your experiment, and delete it when you're done. You pay for hours, not for a GPU sitting on your desk.
- **๐ Scale on demand**: If you have a deadline, just launch multiple instances and run experiments in parallel. No waiting in a queue.
- **๐ค Share with collaborators**: Send the JupyterLab link to a remote teammate and they can watch the simulation right alongside you.
- **๐ Cloud-grade security**: You inherit whatever security the provider gives you, which is usually a lot more than you'd set up yourself.
- **๐ Reproducible environments**: Users and developers share the same kernel and driver, making bug reproduction more reliable than across heterogeneous local setups.
- **๐ ๏ธ No hardware maintenance**: No driver updates, no thermal management, and no replacement costs when hardware fails.
Below, we describe how to deploy our solver on major cloud services. These instructions are up to date as of late 2024 and are subject to change.
> โ ๏ธ For all the services below, don't forget to delete the instance after use, or you'll be charged for nothing. ๐ธ
### ๐ฆ Deploying on [vast.ai](https://vast.ai)
- Select our template [(Link)](https://cloud.vast.ai?ref_id=85288&template_id=29158e5c91e1b4b9543b6a027a837979).
- Create an instance and connect via SSH with port forwarding, e.g. `ssh -L 8080:localhost:8080 root@ -p `, then open `http://localhost:8080` in your browser.
### ๐ฆ Deploying on [Scaleway](https://www.scaleway.com/en/)
- Set zone to `fr-par-2`
- Select type `L4-1-24G` or `GPU-3070-S`
- Choose `Ubuntu Jammy GPU OS 12`
- *Do not skip* the Docker container creation in the installation process; it is required.
- This setup costs approximately โฌ0.76 per hour.
- CLI instructions are described in [(Markdown)](./articles/cloud.md#-scaleway).
### ๐ฆ Deploying on [Amazon Web Services](https://aws.amazon.com/en/)
- Amazon Machine Image (AMI): `Deep Learning Base AMI with Single CUDA (Ubuntu 22.04)`
- Instance Type: `g6.2xlarge` (Recommended)
- This setup costs around $1 per hour.
- *Do not skip* the Docker container creation in the installation process; it is required.
### ๐ฆ Deploying on [Google Compute Engine](https://cloud.google.com/products/compute)
- Select `GPUs`. We recommend the GPU type `NVIDIA L4` because it's affordable and accessible, as it does not require a high quota. You may select `T4` instead for testing purposes.
- Do **not** check `Enable Virtual Workstation (NVIDIA GRID)`.
- We recommend the machine type `g2-standard-8`.
- Choose the OS type `Deep Learning VM with CUDA 12.4 M129` and set the disk size to `50GB`.
- As of late 2024, this configuration costs approximately $0.86 per hour in `us-central1 (Iowa)` and $1.00 per hour in `asia-east1 (Taiwan)`.
- Port number `8080` is reserved by the OS image. Set `$MY_WEB_PORT` to `8888`. When connecting via `gcloud`, use the following format: `gcloud compute ssh --zone "xxxx" "instance-name" -- -L 8080:localhost:8888`.
- *Do not skip* the Docker container creation in the installation process; it is required.
- CLI instructions are described in [(Markdown)](./articles/cloud.md#-google-compute-engine).
## ๐ค Community Works
### ๐งฉ Blender Add-ons
Alongside our [official Blender add-on](#-blender-add-on), the following community add-ons are also available:
- [AndoSim](https://github.com/Slaymish/AndoSim)
- [ArzteZ-PPF-solver](https://github.com/tavcitavci-sys-tavci-ui/ArzteZ-PPF-solver)
### ๐บ Videos
- [*The Worst Bug In Games Is Now Gone Forever*](https://www.youtube.com/watch?v=VOORiyip4_c) by [Two Minute Papers](https://www.youtube.com/@TwoMinutePapers).
- [*Visual Components - ZOZO's Contact Solver Handshanking*](https://www.youtube.com/watch?v=k000SaPXK4Q) by [idkfa](https://www.youtube.com/@idkfa3).
### ๐ฐ Articles
- [*New Simulation Method To Achieve Accuracy In Collision Physics*](https://80.lv/articles/new-simulation-method-to-achieve-accuracy-in-collision-physics) by Amber Rutherford on [80 Level](https://80.lv/).
- [*New Research Might Have Finally Solved the Clipping Bug*](https://www.live-laugh-love.world/blog/game-collision-bugs-solution/) by LLL Inc.
### ๐ฃ Sharing Your Work
Our work still needs many improvements, and our documentation and tutorial videos are not very sophisticated.
The author would greatly appreciate it if you made your own tutorial videos, write-ups, or blog posts about the solver, and posted them online on YouTube, your blog, social media, or anywhere else.
## ๐ผ Commercial Use and Beyond
This project is released under the [Apache License 2.0](./LICENSE). In plain terms, you may use, modify, and redistribute the code in commercial products, including proprietary software, without paying royalties or open-sourcing your own code. You only need to preserve the license notice and the attribution required by the license.
If you build something on top of this solver, we would love to hear about it, but you are not obligated to disclose anything.
## ๐ฌ Contributing
We appreciate your interest in opening pull requests, but we are not ready to accept external contributions because doing so involves resolving copyright and licensing matters with [ZOZO, Inc.](https://corp.zozo.com/en/) For the time being, please open issues for bug reports under the terms described below. If you wish to extend the codebase, please fork the repository and work on it.
By submitting an Issue or suggestion to this repository, you agree that your contribution is provided under the terms of the [Apache License, Version 2.0](./LICENSE). Any bug reports or feature proposals you provide will be deemed to be licensed to us and the community on a royalty-free, unrestricted basis for the purpose of improving this software.
See [CONTRIBUTING.md](./CONTRIBUTING.md) for details.
Thank you!
## ๐ Acknowledgements
The author thanks [ZOZO, Inc.](https://corp.zozo.com/en/) for permitting the release of the code and the team members for assisting with the internal paperwork for this project.
This repository is owned by [ZOZO, Inc.](https://corp.zozo.com/en/)