Set up hand tracking
setup_hand_trackingConfigures MediaPipe hand tracking from a webcam, converting hand landmarks into a CHOP for gesture detection and skeleton binding.
Instructions
One-shot MediaPipe hand tracking from a webcam: loads the mediapipe-touchdesigner ENGINE (install with tdmcp install mediapipe-touchdesigner), starts the timeline, locates the engine's hand JSON DAT, and builds an adapter Script CHOP that converts the hand JSON into a canonical max_hands×21-landmark CHOP (channels: tx/ty/tz/confidence/handedness). Use coordinate_space='world' for gesture detection (3D, curled fingers separate in z). The output CHOP at <parent_path>/<adapter_name>/hand is ready for bind_to_channel or create_pose_skeleton. Shares the same engine as setup_body_tracking — both can run in the same project.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tox_path | No | Path to the MediaPipe ENGINE .tox (MediaPipe.tox). Defaults to the package staged by `tdmcp install mediapipe-touchdesigner`, falling back to ~/tdmcp-packages. The same engine is shared with setup_body_tracking. | |
| parent_path | No | COMP to load the engine into. | /project1 |
| max_hands | No | Maximum number of hands tracked (1 or 2). Output CHOP allocates max_hands*21 samples. | |
| coordinate_space | No | 'world' reads worldLandmarks (3D, meters, gesture-safe — curled fingers separate in z). 'image' reads normalised 2D landmarks, centred on the wrist. Use 'world' for gesture detection. | world |
| adapter_name | No | baseCOMP name created under parent_path to house the hand Script CHOP. | mp_hand_adapter |