The Material Point Method (MPM) in Blender!
Here you can download ready-to-use releases, report bugs, and get the source code.
Works in Blender 5.0, 5.1., and 5.2.
You can either
- ❤ buy the extension ❤
- download ZIP from github release page
- build from source
Please refer to the Squishy Volumes User Guide.
The Blender-specific Python extension code is licensed under GPLv3, while the Rust simulation code is licensed under MIT. To avoid confusion, a respective license header is included in each source file.
Third-party licenses can be found in the binary artifacts (Python wheels) included in the extension ZIP files.
Warning
Building is only documented to a certain extend. Ubuntu 24.04 is tested rigorously, and builds on other operating systems are automated in GitHub's workflows. The extension is not meant to be built by the average user.
That being said, you should be fine if you have experience with the involved tools and languages. We would love to hear from you about any issues you might have. We are continually seeking ways to enhance the build system.
git clone git@github.com:Algebraic-UG/squishy_volumes.git
cd squishy_volumes
Important
All subsequent steps assume the checkout directory as working directory.
This isn't technically needed for actual wheel building below since the uvx command takes care of the environment.
But it is needed for the ./rust level cargo build command to succeed.
uv python install 3.11
uv python list 3.11
Copy the path and set the environment variable for PyO3.
For example:
export PYO3_PYTHON=/home/<user>/.local/share/uv/python/cpython-3.11.11-linux-x86_64-gnu/bin/python3.11
See also rebuild_api.sh.
Remove stale wheels
rm python/src/squishy_volumes_extension/wheels/*
Build new wheel, omit --no-default-features for hot reloading.
cd rust/crates/wrap
uvx --python 3.11 maturin build --no-default-features --release --out ../../../python/src/squishy_volumes_extension/wheels/
Update manifest to include new wheel.
cd -
uv run --with toml scripts/update_manifest.py
This command produces a ready-to-install ZIP file.
cd python/src/squishy_volumes_extension
blender --command extension build
You can then install it like before.
TODO: describe how to hot reload while developing
Tip
It's very similar to https://github.com/Algebraic-UG/blend_rust.
See this helpful video.
- Install VS Code.
- Install Python, Python Debugger, and Blender Development.
- Open the repo dir.
- ctrl+shift+P -> Python: Create Environment -> Venv -> Enter interpreter path... -> Select Python that is bundled with Blender.
- In the venv:
python -m pip install fake-bpy-module-latest. - Restart VS Code.
- ctrl+shift+P -> Blender: Build and Start -> Select Blender binary.
The step tests is currently broken.
See #190
cd rust
cargo test --release