Transfers 52 ARKit blendshapes and 15 Oculus visemes from a reference GLB avatar onto a target GLB avatar that lacks them. Includes a web UI with 3D preview and blendshape sliders.
# Clone the repo
git clone https://github.com/YOUR_USERNAME/arkit-blendshape-tool.git
cd arkit-blendshape-tool
# Install Python 3.10+ if needed
sudo apt update && sudo apt install -y python3 python3-venv python3-pip
# Create venv and install deps
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# Run the web UI
python server.pyOpen http://YOUR_SERVER_IP:8000 in your browser.
- Open the app in your browser
- Drop a reference GLB (with ARKit blendshapes, e.g. Avaturn T2) in the left panel
- Drop a target GLB (without blendshapes, e.g. Avaturn T1) in the left panel
- Adjust max distance / falloff if needed
- Click "Transfer Blendshapes"
- Preview the result in the 3D viewport, test with sliders
- Download the output GLB
# Inspect a GLB
python main.py inspect -i avatar.glb
# Transfer blendshapes
python main.py transfer -r reference.glb -t target.glb -o output.glb| Flag | Default | Description |
|---|---|---|
--max-distance |
0.15 | Max distance for vertex correspondence |
--falloff-distance |
0.08 | Distance falloff for displacement blending |
--face-mesh-ref |
auto | Name of face mesh in reference GLB |
--face-mesh-target |
auto | Name of face mesh in target GLB |
Create /etc/systemd/system/blendshape-tool.service:
[Unit]
Description=ARKit Blendshape Tool
After=network.target
[Service]
User=www-data
WorkingDirectory=/opt/arkit-blendshape-tool
ExecStart=/opt/arkit-blendshape-tool/.venv/bin/python server.py
Restart=always
[Install]
WantedBy=multi-user.targetThen:
sudo systemctl daemon-reload
sudo systemctl enable blendshape-tool
sudo systemctl start blendshape-tool- Loads a reference GLB that already has ARKit blendshapes
- Loads a target GLB without blendshapes
- Builds vertex correspondence using KD-tree nearest-neighbor matching
- Transfers morph target displacements with local scale adaptation
- Injects the morph targets into the target GLB as glTF morph targets
Eye blinks, gaze, squint, wide — jaw open/forward/left/right — mouth smile, frown, funnel, pucker, stretch, roll, shrug, press, dimple — brow down/up/inner — cheek puff/squint — nose sneer — tongue out.
viseme_sil, viseme_PP, viseme_FF, viseme_TH, viseme_DD, viseme_kk, viseme_CH, viseme_SS, viseme_nn, viseme_RR, viseme_aa, viseme_E, viseme_I, viseme_O, viseme_U
- Python 3.10+
- A reference GLB with existing ARKit blendshapes and/or Oculus visemes
- Both meshes should represent similar face geometry (same avatar platform preferred)