Skip to Content

Walk and talk

Two people cross a square in opposite directions: one walks with a phone at the ear, the other walks slowly and waves on the way.

The packages refuse this scene today, in their own words on the view below. #3549 fixes it.

Computing the take.

Each person is a chain of typed actions from @automovie/motions. This is what an agent writes for the scene; Composing motion explains the parts.

import type { IAutoMovieMotionHumanBody, IAutoMovieMotionHumanPerformance } from "@automovie/interface";
import { HumanChain, HumanPerformance } from "@automovie/motions";

// kim: body f1, at (-3, 0) m, facing 90°, trained
const kim = HumanChain.subject("kim")
  .act("walk", { to: { x: 3, y: 0, z: 0 } })
  .over((overlay) =>
    overlay
      .act("handToFace", { task: "phone" })
  );

// lou: body m1, at (3, 1.5) m, facing 270°, trained
const lou = HumanChain.subject("lou")
  .act("walk", { to: { x: -3, y: 0, z: 1.5 }, pace: "slow" })
  .over((overlay) =>
    overlay
      .act("gesture", { kind: "wave" })
  );

const scene = kim.with(lou);

// Each body id's motion body, prepared from the site's measures.
declare const bodies: Record<string, IAutoMovieMotionHumanBody>;

const input: IAutoMovieMotionHumanPerformance.IInput = {
  seed: "walk-and-talk",
  performers: [
    { subject: "kim", body: bodies["f1"]!, at: { x: -3, y: 0, z: 0 }, yaw: 90, proficiency: { level: "trained" } },
    { subject: "lou", body: bodies["m1"]!, at: { x: 3, y: 0, z: 1.5 }, yaw: 270, proficiency: { level: "trained" } },
  ],
  composition: scene.node,
};
const performance = new HumanPerformance(input);