🚶♂️ SMPL-rs
Smpl-rs is the suite of SMPL functionality implemented in Rust over gloss. It has features for creating smpl-bodies, modifying and rendering them
Features
- Run forward passes through SMPL models (betas -> mesh)
- Modify betas and expression parameters of the SMPL model in real time
- Interfaces with gloss for rendering meshes both in native and web
Documentation
- smpl-rs Rust API Documentation: Automatically generated docs for smpl-rs's Rust API
- smpl-rs Rust Examples: smpl-rs's runnable examples in Rust, covering basic usage.
- smpl-rs Python Examples: smpl-rs's runnable examples for the Python bindings. Covers a wide range of features of the Python bindings.
Getting Started
The easiest way to get started with smpl-rs is to install the Python bindings.
$ pip install smpl-rs
Some examples of how to use the python bindings can be found in the python examples linked above.
Data
To use smpl-rs you need to download the SMPL-X data.
- Download the models from here (Download SMPL-X with removed headbun NPZ).
- After this change the paths in the
misc_scripts/standardize_smpl.pyfile to the path where you downloaded the models and where you want to save the standardized models. You will need some additional files provided in thedata/smplxfolder. - Then run as
python misc_scripts/standardize_smpl.pyto standardize the models. Lazy loading will need to be set to the path where you saved the standardized models.
Installation and Dependencies
The main dependency is gloss which will be downloaded and compiled automatically when building this package. You will need rust, and the rest is handled by cargo. To install Rust, simply run the following in your terminal:
$ curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
Some additional dependencies for Linux:
$ sudo apt-get install libvulkan-dev vulkan-tools xorg-dev libxkbcommon-x11-dev
For MacOs, it should run out of the box.
For running the Rust examples
$ cd smpl-rs
$ cargo run --bin smpl_minimal
For running the Python examples
$ cd smpl-rs/bindings/smpl_py
$ pip install gloss-rs smpl-rs
$ ./examples/minimal.py
Quick useful commands
- Run performance tests:
cargo bench -p smpl-core --benches
Some more Information
- The SMPL suite renders using gloss and therefore uses an Entity-Component-System (ECS) framework. For more info on ECS check here. However to be noted that we use [Hecs] for our ECS system but most of them are very similar.
- Components like Animation and Betas are added to entities and that dictates which systems it uses. If you don't want animation on the avatar, just comment out the component for it when creating the entity.
- For adding new functionality to gloss we use callbacks. This is needed because on WASM the rendering loop cannot be explictly controlled.
Metadata
Release files for smpl-rs 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| smpl_rs-0.9.0-pp310-pypy310_pp73-win_amd64.whl | PyPy 3.10 | PyPy 3.10 7.3 | Windows x86-64 | Details |
| smpl_rs-0.9.0-pp39-pypy39_pp73-win_amd64.whl | PyPy 3.9 | PyPy 3.9 7.3 | Windows x86-64 | Details |
| smpl_rs-0.9.0-pp38-pypy38_pp73-win_amd64.whl | PyPy 3.8 | PyPy 3.8 7.3 | Windows x86-64 | Details |
| smpl_rs-0.9.0-cp313-cp313t-win_amd64.whl | CPython 3.13 | CPython 3.13 free-threading | Windows x86-64 | Details |
| smpl_rs-0.9.0-cp38-abi3-win_amd64.whl | CPython 3.8 | abi3 | Windows x86-64 | Details |
| smpl_rs-0.9.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| smpl_rs-0.9.0-cp38-abi3-macosx_11_0_arm64.whl | CPython 3.8 | abi3 | macOS 11.0+ ARM64 | Details |
| smpl_rs-0.9.0-cp38-abi3-macosx_10_14_x86_64.whl | CPython 3.8 | abi3 | macOS 10.14+ x86-64 | Details |
Total release size: 54.1 MB
Release files / smpl_rs-0.9.0-pp310-pypy310_pp73-win_amd64.whl
| Download URL | smpl_rs-0.9.0-pp310-pypy310_pp73-win_amd64.whl |
|---|---|
| Size | 7.0 MB |
| Tags | PyPy 3.10 PyPy 3.10 7.3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
c7afb300ba630651748aa62532f6c567272df1c9bbe10f0aa8a1446f788a9f9d
|
|
BLAKE2b-256 checksum How to use checksums |
d3fa21a88b26bd641b3ababdb78310e24674932a991502f87bad0e8c043e7dfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / smpl_rs-0.9.0-pp39-pypy39_pp73-win_amd64.whl
| Download URL | smpl_rs-0.9.0-pp39-pypy39_pp73-win_amd64.whl |
|---|---|
| Size | 7.0 MB |
| Tags | PyPy 3.9 PyPy 3.9 7.3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2904cceccf1b95f6c9fcb1110128cedec2ccf664c9318d9bb9fd1269ea27633c
|
|
BLAKE2b-256 checksum How to use checksums |
ab27d237216713aa8f0ac7b3f188c44b55f0a5541e6fe6c916c2600a24225ac2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / smpl_rs-0.9.0-pp38-pypy38_pp73-win_amd64.whl
| Download URL | smpl_rs-0.9.0-pp38-pypy38_pp73-win_amd64.whl |
|---|---|
| Size | 7.0 MB |
| Tags | PyPy 3.8 PyPy 3.8 7.3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
fb5cf4e3dbc1bdaba64fe62d4c8a6e6a47303c9ee3f18ca1b60981de9b311d37
|
|
BLAKE2b-256 checksum How to use checksums |
2a9f724c62606e0ad5bedbafb6bb4fe43fb7d124d69df139946f97d9d376c57c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / smpl_rs-0.9.0-cp313-cp313t-win_amd64.whl
| Download URL | smpl_rs-0.9.0-cp313-cp313t-win_amd64.whl |
|---|---|
| Size | 7.0 MB |
| Tags | CPython 3.13 CPython 3.13 free-threading Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8bbd022dc28194da65a6f9990d5f32d3c99aaa86e6dcc60694cc39260d489cf0
|
|
BLAKE2b-256 checksum How to use checksums |
416c9de76d899071eed8b55fee8940258724d5cc5003f3ee272adfe4c5599596
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / smpl_rs-0.9.0-cp38-abi3-win_amd64.whl
| Download URL | smpl_rs-0.9.0-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 7.0 MB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
d066a72dc69c2c263b8fd7836cfa0bd5652d30a4767558cdd1b7cc7bbf592e7b
|
|
BLAKE2b-256 checksum How to use checksums |
2748e4c513827f0e01fa72b18562a7077777ac82594368614037022d0c6d0f5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / smpl_rs-0.9.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | smpl_rs-0.9.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 6.8 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
c22587f5ce45c5bcbcc6a6e272041980365797a007959f50da03384272be2099
|
|
BLAKE2b-256 checksum How to use checksums |
d31b1588edcb5488d43bdf41b90aa68584063141f54b923d1e836ea16325e0e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / smpl_rs-0.9.0-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | smpl_rs-0.9.0-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 5.9 MB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c0be7f8221b7d4954a0fa3535a0b312fee9c34533077a94d6c3b110b1919a078
|
|
BLAKE2b-256 checksum How to use checksums |
13be1fb04ecbdd3052b95ea4329be43140ef072b37e026fb2ab87549f81c5a24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / smpl_rs-0.9.0-cp38-abi3-macosx_10_14_x86_64.whl
| Download URL | smpl_rs-0.9.0-cp38-abi3-macosx_10_14_x86_64.whl |
|---|---|
| Size | 6.4 MB |
| Tags | CPython 3.8 abi3 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
9be09d26cacc15a8fb23701992de21366fcdd040a92413dbe6518a7190c410e8
|
|
BLAKE2b-256 checksum How to use checksums |
8f25ee4d275cbec2bc9943e5dca84821d76a2614924416ab235854b8b73ca06a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|