Kinesics

The wire

The behaviour model does not draw. Sixty times a second it says a whole pose: how much of each muscle of the face, and how each joint is turned. Whatever takes those messages and shows them is a puppet. This page is the contract between the two. Wire number 1.

How it travels

A message

{
  "wire": 1,
  "blend": { "jawOpen": 0.12, "mouthSmileLeft": 0.31, "eyeBlinkLeft": 0.0 },
  "bones": { "head": [3.1, -8.0, 1.2], "leftEye": [-2.0, 6.5, 0],
             "chest": [1.0, 2.2, -0.4], "armL": [4, -30, 2] },
  "pupil": 0.31,
  "flush": 0.0,
  "smooth": 0
}
FieldWhat it isRange
wirewhich wire this is1
blendthe face: how much of each of its 52 shapes, by ARKit's names0 to 1 each
boneseach joint's turn from its rest, by name: [pitch, yaw, roll] in degreessee below
pupilthe pupil's width as a share of the iris'sabout 0.22 to 0.36
flushhow much she blushes0 to 1
smoothseconds the puppet should smooth by; the model sends 0, because how things move is its to say0

A puppet ignores a field, a face shape or a bone it does not have. That is what makes a small body possible.

Turns

The bones

BoneHangs fromWhat turns it
chestthe waistleaning, turning and tilting of the trunk
headneckwhere the head points, less the chest's turn
leftEye, rightEyeheadeach eye from where the head points
collarL, collarRchesta shoulder lifting and coming forward
armL, armRits collarthe upper arm, from straight and 75° below level at the side
forearmL, forearmRits upper armthe elbow, from straight
twistL, twistRits forearmthe forearm turning about its own line
handL, handRits twistthe wrist's bend
index, middle, ring, pinky, thumb + L/R + 1, 2, 3the hand, then the joint beforea finger joint, from a flat hand

What the sender promises

A body of few motors

A robot's head does not have 52 face shapes. A body's description says, for each motor, what of a message moves it, how far it goes and how fast:

{ "name": "neckYaw", "unit": "degrees", "range": [-70, 70], "speed": 240, "rest": 0,
  "from": [{ "bone": "head", "axis": 1, "gain": 1 },
           { "bone": "chest", "axis": 1, "gain": 1 }] }

A motor is a sum of parts of the message, each by a weight: a face value, a bone's turn about one axis, or another number of the message. It is held within its range and its speed, and how often more was asked is counted: that says whether a body is quick and free enough for how people move.

Writing a puppet

Listen on a UDP port, or read lines of a file. For each message, set the face shapes and the bones you have, with the axes and rest pose above, and ignore the rest. The hair, the light and anything else that is not behaviour are the puppet's own. A browser cannot hear UDP: bring the messages to it over a WebSocket or server-sent events with a small relay.