Skip to main content

libuipc

PyPI version Downloads Documentation Issues License

A Cross-Platform Modern C++20 Library of Unified Incremental Potential Contact — both C++ and Python APIs.

Website ➡️ spirimirror.github.io/libuipc-web ・ Samples ➡️ github.com/spiriMirror/libuipc-samples

teaser

Libuipc is a library that offers a unified GPU incremental potential contact framework for simulating the dynamics of rigid bodies, soft bodies, cloth, threads and fluids, and their strong couplings. It ensures accurate, penetration-free frictional contact and is naturally differentiable. Libuipc aims to provide robust and efficient forward and backward simulations, making it easy for users to integrate with machine learning frameworks, inverse dynamics, robotics, and more.

We are actively developing Libuipc. Feedback and contributions are welcome!

Table of Contents

What is libuipc?

libuipc is organized in three layers: a friendly scene API on top, a reusable simulation core in the middle, and a fully-parallel CUDA backend underneath.

  • Simulation Interface — Python and C++ APIs for building scenes: geometry IO (OBJ/MSH/URDF/glTF), constitutions (SNK elasticity, Baraff-Witkin cloth, shell bending, ABD affine bodies, joint systems), contact tabulars, animation scripting, and a Polyscope-based GUI.
  • Simulation Core — scene/world/engine abstractions with the incremental-potential Newton solver: implicit time integration, line search with continuous collision detection, frictional contact with scene-adaptive tolerances, and a scene-adaptive kappa corridor.
  • CUDA Backend — GPU PCG linear solver with StiffGIPC MAS (Multi-Level Additive Schwarz) preconditioner, stackless-BVH collision detection, and per-constitution GPU kernels. By default, a conditional CUDA Graph controls the PCG loop on the GPU, with block replay as the fallback on runtimes without conditional nodes.

Why libuipc

  • Easy & Powerful: Libuipc provides an intuitive and unified way to create and access vivid simulation scenes. It supports a variety of object types, including threads, cloth, shells, soft bodies, rigid bodies and fluids (coming soon), and constraints can be added with ease.
  • Fast & Robust: Libuipc is designed to run fully in parallel on the GPU, achieving high performance and enabling large-scale simulations. It features a robust and accurate frictional contact model that effectively handles complex frictional scenarios without penetration.
  • High Flexibility: Libuipc provides APIs in both Python and C++ and supports both Linux and Windows systems.
  • Differentiation roadmap: Libuipc provides differentiable simulation APIs for backward optimizations. (Will Release Soon!)

Catalogue

Runnable examples live in libuipc-samples/examples/ — each is a self-contained main.py with a GUI (run/stop) and most support --headless [N] benchmarking. Highlights:

Stiff-GIPC Benchmark Suite (46–51)

The portable small/standard/stress workloads and same-environment comparison protocol are documented in Testing and Benchmarks.

Robotics

FEM & Cloth

Rigid Bodies, Joints & Coupling

Installation

Python (PyPI)

pip install pyuipc

The release pipeline builds Windows / Linux, Python 3.10–3.14 wheels with CUDA 12.8. Wheels built from the current source carry the CUDA runtime code they use and require a compatible NVIDIA driver, not a locally installed CUDA Toolkit. For GPUs served by a packaged SASS image, the driver floor is 525.60.13 on Linux and 528.33 on Windows; newer CUDA 13 drivers remain backward compatible under NVIDIA's CUDA compatibility model. Those are the CUDA 12.x minor-compatibility floors when the GPU selects a packaged SASS image. A GPU that must JIT the packaged CUDA 12.8 PTX requires at least driver 570.124.06 on Linux or 572.61 on Windows.

New wheels contain native code for compute capabilities 7.5, 8.0, 8.6, 8.9, and 12.0, plus compute-8.9 PTX for forward JIT on other newer GPUs. The doctor distinguishes a selected native SASS image from the PTX path and applies the matching driver floor. Diagnose an installation before running a scene:

python -m uipc doctor
python -m uipc doctor --probe-cuda

From Source

Prerequisites: CMake ≥ 3.26, Python ≥ 3.11, CUDA ≥ 12.4, and vcpkg (XMake ≥ 3.0.5 if you prefer that build path).

# 1) vcpkg (once): clone + bootstrap, then point CMake at the toolchain
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg && ./bootstrap-vcpkg.bat   # Linux: ./bootstrap-vcpkg.sh
# set CMAKE_TOOLCHAIN_FILE=<vcpkg>/scripts/buildsystems/vcpkg.cmake

# 2) clone (samples come along as a submodule)
git clone https://github.com/spiriMirror/libuipc.git --recurse-submodules
cd libuipc && mkdir build && cd build

# 3) configure + build (NVCC is slow — use all cores)
cmake -S .. -DUIPC_BUILD_PYBIND=1
cmake --build . --config Release -j8   # Linux: add -DCMAKE_BUILD_TYPE=Release

With UIPC_BUILD_PYBIND=ON, the Python binding is built and installed into the active Python environment. If the install step fails, finish it manually with cd build/python && pip install .; to target a specific venv, pass -DUIPC_PYTHON_EXECUTABLE_PATH=<python.exe>.

On Linux, a conda environment is recommended: conda env create -f conda/env.yaml && conda activate uipc_env, then conda env config vars set CMAKE_TOOLCHAIN_FILE=<vcpkg>/scripts/buildsystems/vcpkg.cmake before the build commands above.

XMake alternative: xmake f -c && xmake build -j8 (Python binding: xmake f --pybind=true --python_system=true --python_version=3.11.x -c).

Check the install: cd python && python uipc_info.py.

Full guide (incl. Docker and CUDA/driver compatibility notes): Build & Install. For the samples' uv-based workflow, see the libuipc-samples README.

Quick Start (Python)

from uipc.core import Engine, World, Scene
from uipc.geometry import SimplicialComplexIO, ground, label_surface, label_triangle_orient, flip_inward_triangles
from uipc.constitution import StableNeoHookean, ElasticModuli

engine = Engine("cuda", "output")
world  = World(engine)
scene  = Scene(Scene.default_config())
scene.contact_tabular().default_model(0.2, 1e8)

mesh = SimplicialComplexIO().read("bunny.msh")
label_surface(mesh)
label_triangle_orient(mesh)
mesh = flip_inward_triangles(mesh)
StableNeoHookean().apply_to(mesh, ElasticModuli.youngs_poisson(1e6, 0.49), mass_density=1e3)

scene.objects().create("bunny").geometries().create(mesh)
scene.objects().create("ground").geometries().create(ground(-1.0))

world.init(scene)
for _ in range(100):
    world.advance()
    world.retrieve()

Optional: enable the MAS preconditioner for stiff FEM scenes with one config line — config["linear_system"]["fem_preconditioner"] = "mas".

Inspect the validated configuration contract (defaults, units, ranges, selectors, lifecycle, and backend consumers) with python -m uipc config-schema, or read the Scene Configuration Reference.

Contributing & Support

  • Bugs & features: file an Issue; questions and ideas go to Discussions.
  • Pull requests are welcome — CI runs the full simulation suite, please keep it green.
  • For maintainers: .cursor/ holds AI-assisted build/test/commit/PR commands and style rules; agent_docs/ documents the architecture.

News

2026-11-24: Many thanks to NVIDIA for contributing the CUDA optimizations in PRs #512–#517. Their work substantially improved libuipc’s end-to-end simulation performance.

2026-8-24: We preliminarily optimized the CUDA backend, improving the framework's simulation performance across the board — and Libuipc v1.0 will be ready soon!

2026-3-29: Thanks Genesis AI for contributing AL-IPC (Augmented Lagrangian IPC) integration, a Minimal Coordinate Articulated Joint System (ExternalArticulationConstraint) for affine bodies, and the CIBuildWheel cross-platform PyPI packaging pipeline.

2026-2-13: Cursor AI-assisted development support — see .cursor/ for built-in commands and rules.

2026-2-7: pip install pyuipc on PyPI (Win/Linux, Python 3.10–3.13, CUDA 12.8).

2025-11-01: The prototype implementation of Libuipc was open-sourced (Stiff-GIPC) as our performance benchmark reference.

2025-5-23: StiffGIPC presented at SIGGRAPH 2025.

2024-11-25: Libuipc v0.9.0 (Alpha) published — feedback welcome via Issues and PRs!

License & Acknowledgments

libuipc is released under the Apache License 2.0 (see LICENSE).

This project is led by Kemeng Huang and Professor Taku Komura (The University of Hong Kong), in collaboration with Professor Minchen Li (Carnegie Mellon University), with comprehensive support from TransGP. It builds upon the GPU IPC project, originally developed and continuously optimized by Kemeng Huang. We also thank the many open-source contributors, with special thanks to Xinyu Lu, who initially worked with us at TransGP and helped a lot in this project.

Citation

If you use Libuipc in your project, please cite our works:

@article{stiffgipc2025,
      author = {Huang, Kemeng and Lu, Xinyu and Lin, Huancheng and Komura, Taku and Li, Minchen},
      title = {StiffGIPC: Advancing GPU IPC for Stiff Affine-Deformable Simulation},
      year = {2025},
      publisher = {Association for Computing Machinery},
      volume = {44},
      number = {3},
      issn = {0730-0301},
      doi = {10.1145/3735126},
      journal = {ACM Trans. Graph.},
      month = may,
      articleno = {31},
      numpages = {20}
}
@article{gipc2024,
      author = {Huang, Kemeng and Chitalu, Floyd M. and Lin, Huancheng and Komura, Taku},
      title = {GIPC: Fast and Stable Gauss-Newton Optimization of IPC Barrier Energy},
      year = {2024},
      publisher = {Association for Computing Machinery},
      volume = {43},
      number = {2},
      issn = {0730-0301},
      doi = {10.1145/3643028},
      journal = {ACM Trans. Graph.},
      month = {mar},
      articleno = {23},
      numpages = {18}
}

Metadata

Release files for pyuipc 0.0.30

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pyuipc 0.0.30
File Actions
pyuipc-0.0.30-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for pyuipc-0.0.30-cp314-cp314-win_amd64.whl
pyuipc-0.0.30-cp314-cp314-manylinux_2_34_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.34+ x86-64 Details for pyuipc-0.0.30-cp314-cp314-manylinux_2_34_x86_64.whl
pyuipc-0.0.30-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for pyuipc-0.0.30-cp313-cp313-win_amd64.whl
pyuipc-0.0.30-cp313-cp313-manylinux_2_34_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.34+ x86-64 Details for pyuipc-0.0.30-cp313-cp313-manylinux_2_34_x86_64.whl
pyuipc-0.0.30-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for pyuipc-0.0.30-cp312-cp312-win_amd64.whl
pyuipc-0.0.30-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details for pyuipc-0.0.30-cp312-cp312-manylinux_2_34_x86_64.whl
pyuipc-0.0.30-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for pyuipc-0.0.30-cp311-cp311-win_amd64.whl
pyuipc-0.0.30-cp311-cp311-manylinux_2_34_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.34+ x86-64 Details for pyuipc-0.0.30-cp311-cp311-manylinux_2_34_x86_64.whl
pyuipc-0.0.30-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for pyuipc-0.0.30-cp310-cp310-win_amd64.whl
pyuipc-0.0.30-cp310-cp310-manylinux_2_34_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.34+ x86-64 Details for pyuipc-0.0.30-cp310-cp310-manylinux_2_34_x86_64.whl

Total release size: 650.5 MB

Release files / pyuipc-0.0.30-cp314-cp314-win_amd64.whl

Download URL pyuipc-0.0.30-cp314-cp314-win_amd64.whl
Size 65.5 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
9ba3e21f497d8351c7ad4dc3c09b3e567141bbf854dd32d8fccb8a62de96e002
BLAKE2b-256 checksum
How to use checksums
80b930a33725d553859cba825b1315740b2e3aac13b8ef727a385f4a1d709972
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / pyuipc-0.0.30-cp314-cp314-manylinux_2_34_x86_64.whl

Download URL pyuipc-0.0.30-cp314-cp314-manylinux_2_34_x86_64.whl
Size 65.0 MB
Tags CPython 3.14 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
73f177cff390da335488539231c6c913e9892c9ea9a8c4c0bd59739ebcaced59
BLAKE2b-256 checksum
How to use checksums
48290ad9f8651abec7dbda72b66b73b0825abd54d75d08347eeac16743c95979
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / pyuipc-0.0.30-cp313-cp313-win_amd64.whl

Download URL pyuipc-0.0.30-cp313-cp313-win_amd64.whl
Size 65.0 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
96643406b1489d1fdb5e97afb3790acdfa984dfbe40314395455e91d6902c973
BLAKE2b-256 checksum
How to use checksums
057df4b7c0a3209444ce5de333d1a9f76cb19cfec35f43e0109961f28e3c0aaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / pyuipc-0.0.30-cp313-cp313-manylinux_2_34_x86_64.whl

Download URL pyuipc-0.0.30-cp313-cp313-manylinux_2_34_x86_64.whl
Size 65.0 MB
Tags CPython 3.13 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
e42355445fd04f60a12f6bc83272ecc612b77d64de2739f37c69107541240d85
BLAKE2b-256 checksum
How to use checksums
eb566a605c2095b80460f738e02e55e0c313b242eeb02cb350d6a2b4554feacf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / pyuipc-0.0.30-cp312-cp312-win_amd64.whl

Download URL pyuipc-0.0.30-cp312-cp312-win_amd64.whl
Size 64.9 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
23762e6aa0ba2a32ffb90314dafc112940277df71a8b37131eb3b341f79430cd
BLAKE2b-256 checksum
How to use checksums
251f55ac3d46eedb5885a364b8f6f7cb32f6f6c7f61a6e43a3f858fe91990607
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / pyuipc-0.0.30-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL pyuipc-0.0.30-cp312-cp312-manylinux_2_34_x86_64.whl
Size 65.0 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
03b0a42f7a3b5da0f33464dddd64cf8e3b2fde05f4e283e2f2963f537bc23c66
BLAKE2b-256 checksum
How to use checksums
9bcfc77421d574393af8d56e46903c350d621b17e35bc1f67014a5d7edb2dbde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / pyuipc-0.0.30-cp311-cp311-win_amd64.whl

Download URL pyuipc-0.0.30-cp311-cp311-win_amd64.whl
Size 64.9 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
ce04cf07d18857247104ad20d54ae15e913604881b307d798a646d3f3e2c964b
BLAKE2b-256 checksum
How to use checksums
ef12c01847caaf6539ac612e082e11dd37fed43e40100c7c98946417bf30d19f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / pyuipc-0.0.30-cp311-cp311-manylinux_2_34_x86_64.whl

Download URL pyuipc-0.0.30-cp311-cp311-manylinux_2_34_x86_64.whl
Size 65.0 MB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
b55a9a0f99f95155e12e26b3d6d6a5823b92a126762e2629afec1b32ebcc9498
BLAKE2b-256 checksum
How to use checksums
00e5ab75af2ac908c993d23c35fdfcf0491f36dfed9cb24cc9a129cfb7c03558
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / pyuipc-0.0.30-cp310-cp310-win_amd64.whl

Download URL pyuipc-0.0.30-cp310-cp310-win_amd64.whl
Size 64.9 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
eda3735b6de9d29e78254367e4f8c091d0aa883e9595a56e08b041a570409533
BLAKE2b-256 checksum
How to use checksums
8d92274cd1163d1fb7c2cb0d818876a315a90546fc4ebada12f803e4020ca662
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / pyuipc-0.0.30-cp310-cp310-manylinux_2_34_x86_64.whl

Download URL pyuipc-0.0.30-cp310-cp310-manylinux_2_34_x86_64.whl
Size 65.0 MB
Tags CPython 3.10 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
c70cb13ff0a06d378d03ca7f5f1dcda7a77453ae4b2f4a01727750877e9ac324
BLAKE2b-256 checksum
How to use checksums
fc36491b73abdfe0c5980a8baa78bf7ca265d08633be949efc48b82d7aa4ba40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for pyuipc 0.0.30

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 10 files in this release have been uploaded with provenance metadata.

Select from 10 files

Attestation for pyuipc-0.0.30-cp314-cp314-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.30 This release

10 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page