Real-time webcam-based motion capture for Blender using MediaPipe and OpenCV
Transform your webcam into a motion capture studio! Live Mocap captures your body movements in real-time and retargets them to any Blender armature β no expensive suits or sensors required.
- π₯ Real-Time Capture β Non-blocking, live motion tracking at 30 FPS
- 𦴠Auto Bone Mapping β Automatic detection for Rigify, Unity, and common rigs
- πΎ Save/Load Mappings β Reuse bone configurations across projects
- ποΈ Smoothing Filters β EWMA smoothing for natural, jitter-free motion
- π Confidence Gating β Reject low-quality tracking data automatically
- π¦Ά Foot Lock Filter β Reduce foot sliding in animations
- βΊοΈ Live Recording β Insert keyframes in real-time
- π¬ Bake to Action β Export captured motion as reusable Actions
- π· Camera Feed Overlay β Optional viewport preview of webcam feed
- π§ Modular Design β Easy to extend and customize
- Blender 3.6 or higher (4.x recommended)
- Webcam (built-in or USB)
Open a terminal/command prompt and navigate to Blender's Python directory:
Windows:
cd "C:\Program Files\Blender Foundation\Blender 4.x\4.x\python\bin"
python.exe -m pip install opencv-python mediapipemacOS:
cd /Applications/Blender.app/Contents/Resources/4.x/python/bin
./python3.11 -m pip install opencv-python mediapipeLinux:
cd /path/to/blender/4.x/python/bin
./python3.11 -m pip install opencv-python mediapipe-
Copy the
live_mocap_addonfolder to your Blender add-ons directory:- Windows:
%APPDATA%\Blender Foundation\Blender\4.x\scripts\addons\ - macOS:
~/Library/Application Support/Blender/4.x/scripts/addons/ - Linux:
~/.config/blender/4.x/scripts/addons/
- Windows:
-
Restart Blender
- Zip the
live_mocap_addonfolder - In Blender: Edit β Preferences β Add-ons β Install
- Select the
.zipfile - Restart Blender
- Go to Edit β Preferences β Add-ons
- Search for "Live Mocap"
- Enable Animation: Live Mocap
- In the 3D Viewport, press
Nto open the sidebar - Click the Mocap tab
- Select your armature in the scene
- Click Select Target in the Mocap panel
- Click Auto-Fill Bone Map to automatically map landmarks to bones
- Click Start Capture
- Your webcam will activate and your character will mirror your movements!
- Click Start Recording to insert keyframes
- Perform your movements
- Click Stop Recording when done
- Click Bake to Action to create a reusable Action
| Section | Description |
|---|---|
| Target | Select armature, adjust scale and offset |
| Bone Mapping | Configure landmark β bone assignments |
| Capture | Camera settings, FPS, module toggles |
| Record | Start/stop keyframing, bake to Action |
| Filters | Smoothing, confidence threshold, foot lock |
| Utilities | Reset pose, help dialog, dependency check |
Works out of the box with:
- Rigify rigs
- Unity Humanoid rigs
- Standard naming conventions (spine, arm, leg, etc.)
- Click + to add a mapping
- Select a MediaPipe landmark (e.g.,
LEFT_SHOULDER) - Select the target bone
- Enable the checkbox to activate
- Save Map: Export your bone configuration as JSON
- Load Map: Import a saved configuration
| Setting | Default | Description |
|---|---|---|
| Camera Index | 0 | Webcam device number |
| Target FPS | 30 | Capture frame rate |
| Pose Module | β | Enable body tracking |
| Hands Module | β | Enable hand tracking |
| Face Module | β | Enable face tracking |
| Filter | Default | Description |
|---|---|---|
| Smoothing | 0.5 | EWMA smoothing factor (0 = no smoothing, 1 = max) |
| Confidence | 0.5 | Minimum confidence threshold |
| Foot Lock | β | Reduce foot sliding artifacts |
live_mocap_addon/
βββ __init__.py # Blender add-on entry point
βββ addon_prefs.py # User preferences
βββ properties.py # Data models (PropertyGroups)
β
βββ operators/ # User actions (15 operators)
β βββ capture_start.py # β Main modal operator
β βββ autofill_map.py # Auto bone mapping
β βββ record_start.py # Start keyframing
β βββ ...
β
βββ panels/ # UI components
β βββ main.py # Main N-panel
β βββ ...
β
βββ runtime/ # Live capture systems
β βββ capture.py # OpenCV camera
β βββ trackers.py # MediaPipe tracking
β βββ retarget.py # Landmark β bone math
β βββ filters.py # Smoothing, confidence, foot lock
β βββ ...
β
βββ io/ # File operations
β βββ json_maps.py # Save/load bone mappings
β βββ export.py # FBX export
β
βββ utils/ # Shared utilities
βββ coords.py # Coordinate transforms
βββ naming.py # Bone name matching
- Click Help / Dependency Check in the panel
- If OpenCV or MediaPipe shows β, reinstall using the commands above
- Make sure you're using Blender's bundled Python, not system Python
- Check that no other application is using the webcam
- Try a different camera index (0, 1, 2...)
- Verify camera permissions (especially on macOS)
- Ensure good lighting (natural light works best)
- Stand back so your full body is visible
- Wear contrasting colors against your background
- Increase smoothing factor for jittery motion
- Lower target FPS to 24 or 20
- Disable unused modules (hands, face)
- Close other resource-intensive applications
- Animation Pre-viz β Quick blocking and movement reference
- Indie Game Dev β Affordable motion capture for characters
- Education β Learn animation and rigging concepts
- Content Creation β VTuber-style live animation
- Prototyping β Rapidly test animation ideas
- Multi-person tracking
- Hand gesture recognition
- Facial expression capture
- IK solving integration
- Video file input (not just webcam)
- Motion retargeting presets
| Document | Description |
|---|---|
| QUICKSTART.md | 10-minute setup guide |
| STRUCTURE.md | Code architecture |
| DEVELOPMENT.md | Developer guide |
| PROJECT_OVERVIEW.md | Complete project overview |
Contributions are welcome! Here's how to get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
See DEVELOPMENT.md for extension points and code guidelines.
This project is licensed under the MIT License β see the LICENSE file for details.
- MediaPipe β Google's ML framework for real-time pose detection
- OpenCV β Open source computer vision library
- Blender β The free and open-source 3D creation suite
- Rokoko Studio Live β Inspiration for plugin architecture
Built with β€οΈ for the Blender community
Happy Motion Capturing! π¬β¨