Skip to main content

SMPL-X Mannequin

mannequin-x provides two lightweight figures driven by SMPL-X body and hand rotations:

  • armor is the repo's segmented rigid mannequin, available in three LODs.
  • wooden is a skinned wooden mannequin at its source resolution.

Both designs accept the same Pose. Ten SMPL-X shape coefficients resize their bones and geometry. The NumPy runtime includes the required shape calibration, so it does not need SMPL-X model files.

pip install mannequin-x

Python API

import numpy as np

from mannequin import Mannequin

shape = np.zeros(10, dtype=np.float32)
shape[0] = 1.5

model = Mannequin("wooden", shape=shape)
pose = model.rest_pose()
pose.body[17, 2] = 0.8

vertices = model.vertices(pose)
faces = model.faces
joint_transforms = model.joint_transforms(pose)

Create armor with Mannequin("armor", lod=0). Armor supports LODs 0, 1, and 2. The wooden model has one resolution, so it does not accept lod.

rest_pose() returns a mutable Pose with five arrays:

  • body: [..., 21, 3] SMPL-X body rotations
  • hands: [..., 30, 3] left and right hand rotations
  • root_rotation: [..., 3] world rotation
  • pelvis_rotation: [..., 3] pelvis rotation about the pelvis joint
  • translation: [..., 3] world translation

root_rotation rotates the whole figure around the SMPL-X origin. pelvis_rotation rotates the body around the pelvis without moving the pelvis. Rotations use axis-angle vectors. Leading batch dimensions are supported. Jaw, eye, and expression parameters are absent because neither mannequin has matching geometry or joints.

Shape is identity state, not motion state. Set it at construction or call model.reshape(shape). Pose evaluation then stays concise:

model.reshape(new_shape)
vertices = model.vertices(pose)
links = model.link_transforms(pose)

Viser

Install the optional viewer dependency with pip install mannequin-x[viser].

import viser

from mannequin import Mannequin, add_to_scene

server = viser.ViserServer()
model = Mannequin("wooden")
handle = add_to_scene(server.scene, "/mannequin", model)

handle.set_pose(model.rest_pose())
handle.set_position((1.0, 0.0, 0.0))
handle.set_shape(new_shape)
handle.set_palette("sage")

Pass one of sand, ivory, charcoal, sage, clay, slate, or wood to add_to_scene(..., palette=...) or handle.set_palette(...). Wooden meshes use Viser's native add_mesh_skinned(), so pose updates send bone transforms instead of vertex buffers.

Run the live comparison against a local neutral SMPL-X model:

uv run python examples/compare.py /path/to/SMPLX_NEUTRAL.npz

The viewer shows armor, wooden, and full SMPL-X figures with matched motion, random hand poses, shape controls, front and side views, a T-pose button, and a shared palette. The SMPL-X file remains external to the package.

three.js

authoring/export_glb.py exports rigid armor as a nested GLB joint hierarchy. The root extras contain the SMPL-X body and hand parameter mapping. See examples/threejs.html.

Assets

The editable armor source is authoring/mannequin.blend.

src/mannequin/assets/wooden.npz retains its source vertices and skin weights, converts coordinates, triangulates faces, and maps 52 source bones onto this package's joint hierarchy. Rebuild it with authoring/import_wooden.py.

authoring/bake_calibration.py uses the NumPy SMPL-X implementation from body-models to bake the joint, ground-plane, head, and height response for the first ten shape coefficients. Pass it a local SMPLX_NEUTRAL.npz; the runtime does not depend on body-models or the SMPL-X file. The wooden torso keeps its source proportions.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mannequin_x-0.1.1.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mannequin_x-0.1.1-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file mannequin_x-0.1.1.tar.gz.

File metadata

  • Download URL: mannequin_x-0.1.1.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mannequin_x-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0b0899bd1bd43c4c31efc47f7b8793df1f9886fcce1fbeeb413b35a5d13b2bc7
MD5 f64471d20069675df242714e89039124
BLAKE2b-256 60b8913b369afb09fbf2ecc11430b598f38fc971b9b0b202fbcc08255266a1e6

See more details on using hashes here.

File details

Details for the file mannequin_x-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mannequin_x-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mannequin_x-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3f41d499f93d5845b5e1352cfb23ed4e59dea4e55199a394d9989fabb9cccb4f
MD5 6706821c2844e86738a4cb53ad0a8af2
BLAKE2b-256 5d0ce389030b606769e8384200f7d27dd5ac6baf95e47a49378308b041f7a93d

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.2

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

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