diff --git a/.claude/commands/animated-drawing.md b/.claude/commands/animated-drawing.md new file mode 100644 index 00000000..68cee8ed --- /dev/null +++ b/.claude/commands/animated-drawing.md @@ -0,0 +1,12 @@ +--- +description: Animate a SUPPLIED drawing/photo of a character with real motion capture (Meta AnimatedDrawings) → raster GIF/MP4 of that drawing moving. To CREATE a vector doodle from scratch, use /ink-art. +argument-hint: [path to drawing] [motion: dance|walk|jump|wave] +--- + +Read `skills/creative/animated-drawing.md`, then set up and run Meta's open-source **AnimatedDrawings** to animate the supplied drawing with the requested motion. + +- Use this only when the user *has* a humanoid drawing/photo to animate. To create a vector doodle from scratch that draws itself → use `/ink-art` instead. +- Output is **raster** (the original drawing warped) — no vector, no draw-on reveal. Confirm the input is a single humanoid on a plain light background. +- Prefer the turnkey bundled-character path first; the auto-rig path needs Docker + ~670 MB models. + +Drawing + motion: $ARGUMENTS diff --git a/.claude/commands/ink-art.md b/.claude/commands/ink-art.md new file mode 100644 index 00000000..2e5f2e40 --- /dev/null +++ b/.claude/commands/ink-art.md @@ -0,0 +1,15 @@ +--- +description: Hand-drawn ink-on-white doodle animation — a character that draws itself then walks/dances/waves, or a deadpan contraption explainer. Vector, deterministic, rendered via HyperFrames to MP4. +argument-hint: [what to animate] +--- + +Read `skills/creative/ink-theater.md` (the metaphor method, color grammar, mined archetypes) and `ink-theater/README.md` (engine API, determinism, the SVG-text font gotcha), then build the piece described below. + +- Use the **Ink Theater** engine (`ink-theater/ink-theater.js`): variable-width ink strokes, seek-safe boil, closed-form spring eases, FABRIK IK, the contraption grammar. +- For a **character that walks / dances / waves / jumps**, use the **Ink Puppet** mocap system: `InkPuppet.create(...)` → `p.drawIn(tl, ...)` for the self-drawing reveal → `InkPuppet.choreograph(tl, p, [{clip:'wave_hello'},{clip:'dab'},{clip:'jumping'},...])`. **Never hand-tune motion** — add moves by converting a BVH with `ink-theater/mocap/bvh2clip.mjs` (free CMU mocap has walk/run/dance/…). +- Captions = **HTML overlay `
`s** (HyperFrames does not apply webfonts to SVG ``). +- Validate with `npx hyperframes lint` + `snapshot` (eyeball the contact sheet), then render. + +In OpenMontage this runs on the `animation` pipeline (illustration) or `character-animation` pipeline (mocap puppet) — it is a style + engine, not a separate pipeline. + +Request: $ARGUMENTS diff --git a/.codex/prompts/README.md b/.codex/prompts/README.md new file mode 100644 index 00000000..485955a0 --- /dev/null +++ b/.codex/prompts/README.md @@ -0,0 +1,12 @@ +# Codex custom prompts + +Codex only scans **`~/.codex/prompts/`** (user home) for custom prompts — it does **not** read project-level `.codex/prompts/`. These files are versioned here as the source of truth; to use them in Codex, copy or symlink them into your home dir: + +```bash +mkdir -p ~/.codex/prompts +cp .codex/prompts/ink-art.md .codex/prompts/animated-drawing.md ~/.codex/prompts/ +# or symlink so repo edits propagate: +# ln -s "$PWD/.codex/prompts/ink-art.md" ~/.codex/prompts/ink-art.md +``` + +Then restart Codex; `/ink-art` and `/animated-drawing` appear in the `/` menu. (OpenAI is deprecating custom prompts in favor of Codex "skills" — migrate when that stabilizes.) diff --git a/.codex/prompts/animated-drawing.md b/.codex/prompts/animated-drawing.md new file mode 100644 index 00000000..3cf4ad50 --- /dev/null +++ b/.codex/prompts/animated-drawing.md @@ -0,0 +1,12 @@ +--- +description: Animate a SUPPLIED drawing/photo with real mocap (Meta AnimatedDrawings) → raster GIF/MP4. To create a vector doodle from scratch, use /ink-art. +argument-hint: [path to drawing] [motion: dance|walk|jump|wave] +--- + +Read `skills/creative/animated-drawing.md`, then set up and run Meta's open-source AnimatedDrawings to animate the supplied drawing with the requested motion. + +- Only for animating an *existing* humanoid drawing/photo. To create a vector doodle from scratch → use `/ink-art`. +- Output is **raster** (original drawing warped) — no vector, no draw-on reveal. +- Prefer the turnkey bundled-character path; auto-rig needs Docker + ~670 MB models. + +Drawing + motion: $ARGUMENTS diff --git a/.codex/prompts/ink-art.md b/.codex/prompts/ink-art.md new file mode 100644 index 00000000..3d18faa1 --- /dev/null +++ b/.codex/prompts/ink-art.md @@ -0,0 +1,12 @@ +--- +description: Hand-drawn ink doodle animation — a character that draws itself then walks/dances/waves, or a contraption explainer (vector → HyperFrames MP4). +argument-hint: [what to animate] +--- + +Read `skills/creative/ink-theater.md` and `ink-theater/README.md`, then build the hand-drawn ink animation described below. + +- **Ink Theater** engine (`ink-theater/ink-theater.js`): variable-width ink strokes, seek-safe boil, closed-form spring eases, FABRIK IK, contraption grammar. +- For a **character that walks / dances / waves / jumps**, use the **Ink Puppet** mocap system: `InkPuppet.create` → `p.drawIn` (self-drawing reveal) → `InkPuppet.choreograph([{clip:'wave_hello'},{clip:'dab'},…])`. **Never hand-tune motion**; add moves via `ink-theater/mocap/bvh2clip.mjs`. +- Captions = **HTML overlay `
`s** (HyperFrames doesn't apply webfonts to SVG ``). Validate (`npx hyperframes lint` + `snapshot`) before rendering. + +Request: $ARGUMENTS diff --git a/.cursor/commands/animated-drawing.md b/.cursor/commands/animated-drawing.md new file mode 100644 index 00000000..cc9aa311 --- /dev/null +++ b/.cursor/commands/animated-drawing.md @@ -0,0 +1,9 @@ +# /animated-drawing — animate a supplied drawing with real mocap + +Turn a user-supplied drawing/photo of a humanoid into a raster GIF/MP4 of that drawing moving (dance / walk / jump / wave), via Meta's open-source AnimatedDrawings. To *create* a vector doodle from scratch that draws itself, use `/ink-art`. + +Read `skills/creative/animated-drawing.md`, then set up and run AnimatedDrawings on the user's drawing with the requested motion. + +- Only for animating an *existing* humanoid drawing/photo (single figure, plain light background). +- Output is **raster** (original drawing warped) — no vector, no draw-on reveal. +- Prefer the turnkey bundled-character path; auto-rig needs Docker + ~670 MB models. diff --git a/.cursor/commands/ink-art.md b/.cursor/commands/ink-art.md new file mode 100644 index 00000000..fbb4cd24 --- /dev/null +++ b/.cursor/commands/ink-art.md @@ -0,0 +1,10 @@ +# /ink-art — hand-drawn ink doodle animation + +A character that draws itself then walks/dances/waves, or a deadpan contraption explainer. Vector, deterministic, rendered via HyperFrames to MP4. + +Read `skills/creative/ink-theater.md` and `ink-theater/README.md`, then build what the user asks: + +- **Ink Theater** engine (`ink-theater/ink-theater.js`): variable-width ink strokes, seek-safe boil, closed-form spring eases, FABRIK IK, contraption grammar. +- For a **character that walks / dances / waves / jumps**, use the **Ink Puppet** mocap system: `InkPuppet.create` → `p.drawIn` (self-drawing reveal) → `InkPuppet.choreograph([{clip:'wave_hello'},{clip:'dab'},…])`. **Never hand-tune motion**; add moves via `ink-theater/mocap/bvh2clip.mjs`. +- Captions = **HTML overlay `
`s** (HyperFrames doesn't apply webfonts to SVG ``). +- Validate (`npx hyperframes lint` + `snapshot`) before rendering. diff --git a/.github/prompts/animated-drawing.prompt.md b/.github/prompts/animated-drawing.prompt.md new file mode 100644 index 00000000..95ea0fe2 --- /dev/null +++ b/.github/prompts/animated-drawing.prompt.md @@ -0,0 +1,9 @@ +--- +description: Animate a SUPPLIED drawing/photo of a character with real mocap (Meta AnimatedDrawings) → raster GIF/MP4. To create a vector doodle from scratch, use /ink-art. +--- + +Read `skills/creative/animated-drawing.md`, then set up and run Meta's open-source **AnimatedDrawings** to animate the user's supplied drawing with the requested motion (dance / walk / jump / wave). + +- Only for animating an *existing* humanoid drawing/photo. To create a vector doodle from scratch that draws itself → use `/ink-art`. +- Output is **raster** (the original drawing warped) — no vector, no draw-on reveal. +- Prefer the turnkey bundled-character path; the auto-rig path needs Docker + ~670 MB models. diff --git a/.github/prompts/ink-art.prompt.md b/.github/prompts/ink-art.prompt.md new file mode 100644 index 00000000..27be43a7 --- /dev/null +++ b/.github/prompts/ink-art.prompt.md @@ -0,0 +1,10 @@ +--- +description: Hand-drawn ink-on-white doodle animation — a character that draws itself then walks/dances/waves, or a deadpan contraption explainer. Vector, deterministic, HyperFrames → MP4. +--- + +Read `skills/creative/ink-theater.md` and `ink-theater/README.md`, then build the hand-drawn ink animation the user asks for. + +- Use the **Ink Theater** engine (`ink-theater/ink-theater.js`): variable-width ink strokes, seek-safe boil, closed-form spring eases, FABRIK IK, contraption grammar. +- For a **character that walks / dances / waves / jumps**, use the **Ink Puppet** mocap system: `InkPuppet.create` → `p.drawIn` (self-drawing reveal) → `InkPuppet.choreograph([{clip:'wave_hello'},{clip:'dab'},…])`. **Never hand-tune motion**; add moves via `ink-theater/mocap/bvh2clip.mjs`. +- Captions = **HTML overlay `
`s** (HyperFrames doesn't apply webfonts to SVG ``). +- Validate (`npx hyperframes lint` + `snapshot`) before rendering. diff --git a/AGENT_GUIDE.md b/AGENT_GUIDE.md index a94016b6..085a52d3 100644 --- a/AGENT_GUIDE.md +++ b/AGENT_GUIDE.md @@ -616,6 +616,11 @@ Tool rules: | `clean-professional` | Corporate, educational, SaaS | | `flat-motion-graphics` | Social media, TikTok, startups | | `minimalist-diagram` | Technical deep-dives, architecture | +| `ink-sketch` (Ink Theater) | Hand-drawn ink-on-white doodle animation; a character that draws itself, walks, dances; contraption explainers | + +### Hand-drawn "doodle" animation → Ink Theater / Ink Puppet + +For any brief that wants a **hand-drawn ink doodle** look — "a sketch that comes to life", "a pencil / stick figure that walks or dances", "a little character that acts out the idea", whiteboard-doodle explainers — use the **Ink Theater** engine + **Ink Puppet** mocap system (`skills/creative/ink-theater.md`, `ink-theater/README.md`). It is a **style + reusable engine, not a new pipeline**: illustration / contraption pieces run on the `animation` pipeline; a mocap character (draws itself → walks / dances / waves via `InkPuppet.choreograph([...])`) runs on `character-animation`. Cross-tool entry points: **`/ink-art`** (create a vector doodle from scratch) and **`/animated-drawing`** (animate a *supplied* drawing with mocap — raster; `skills/creative/animated-drawing.md`). Never hand-tune character motion — the agent only chooses named mocap clips. ## Layer Map diff --git a/skills/creative/animated-drawing.md b/skills/creative/animated-drawing.md new file mode 100644 index 00000000..e02515b2 --- /dev/null +++ b/skills/creative/animated-drawing.md @@ -0,0 +1,41 @@ +# Animated Drawing — animate a supplied drawing/photo with real mocap + +> Command: `/animated-drawing` · **Path A (raster).** Sibling: `/ink-art` (vector, from scratch). +> Tool: Meta open-source **AnimatedDrawings** (github.com/facebookresearch/AnimatedDrawings — code MIT, repo archived 2025). + +**When to use:** the user *has* a drawing or photo of a **humanoid** character and wants **that image** to move (dance / walk / jump / wave). Output = a raster **GIF (transparent) or MP4** of the original drawing *warped* to the motion. To **create** a vector doodle from scratch that draws itself and moves → use **`/ink-art`** instead. + +**What it does:** auto-rigs the drawing (predicts a 16-joint skeleton), then retargets a BVH mocap clip onto it via As-Rigid-As-Possible mesh warp of the flat texture. It only *moves an already-complete drawing* — there is **no draw-on / self-sketching reveal** (that's `/ink-art`). + +## Two run modes + +**A · Bundled character + preset motion — turnkey, no Docker (verified on Windows):** +```bash +git clone --depth 1 https://github.com/facebookresearch/AnimatedDrawings.git && cd AnimatedDrawings +# the repo pins Python 3.8 + old wheels; get 3.8 via uv: +uv python install 3.8 && uv venv --python 3.8 .venv +uv pip install --python .venv -e . +uv pip install --python .venv "setuptools<81" # repo imports pkg_resources but doesn't declare it +.venv/Scripts/python -c "from animated_drawings import render; render.start('./examples/config/mvc/export_gif_example.yaml')" +``` +~10–12 s/clip on CPU, no GPU/Docker/model download. + +**B · Auto-rig a NEW drawing — heavy (Docker + ~670 MB models, ~16 GB RAM):** +```bash +python image_to_animation.py drawing.png out_dir # detect → segment → rig → retarget → render +``` +Needs the repo's TorchServe container (`docker/`) which downloads `drawn_humanoid_detector.mar` (311 MB) + `drawn_humanoid_pose_estimator.mar` (357 MB). Windows: run the rig stack only via that container (OpenMMLab is Linux-only in practice). + +## Input requirements (auto-rig) +One clearly-drawn **humanoid**, roughly T/A-pose (limbs separated, not overlapping), on a **plain light background** (segmentation is threshold + floodfill), exactly one figure. + +## Config the agent generates (all YAML) +`char_cfg.yaml` (+ `texture.png`, `mask.png`; auto-produced by `image_to_annotations.py`) · a **motion** config (bvh + frames + groundplane) · a **retarget** config (BVH-joint → rig-joint; reuse bundled `fair1_ppf` / `cmu1_pfp` unless the skeleton differs) · an **MVC** config (`controller.MODE: video_render`, `OUTPUT_VIDEO_PATH`, optional `WINDOW_DIMENSIONS` / `CLEAR_COLOR` / `BACKGROUND_IMAGE` / `CAMERA_POS`). + +## Preset motions +`dab`, `jesse_dance`, `jumping`, `jumping_jacks`, `wave_hello`, `zombie` — plus any Mixamo-skeleton BVH. + +## Output & honest limits +GIF (transparent) / MP4 (H.264, `avc1`), resolution from `WINDOW_DIMENSIONS` (examples 500×500). **Raster only** (warps the drawing's pixels — zoom shows stretched texture), **humanoid-only**, **no draw-on reveal**, **crude background**. A delightful "your doodle comes to life" novelty; behind a Docker service for the auto-rig path. Not a general vector engine — for white-ink vector doodles that draw themselves, use `/ink-art`. + +Sample renders from the session eval: `.tmp/animated-drawings/out/` (`char3_dab.gif`, `char1_zombie.mp4`). diff --git a/skills/pipelines/animation/idea-director.md b/skills/pipelines/animation/idea-director.md index 13609c0c..424eb472 100644 --- a/skills/pipelines/animation/idea-director.md +++ b/skills/pipelines/animation/idea-director.md @@ -11,6 +11,7 @@ Do not use this pipeline when the project is really footage-led with a few overl - `docs/animation-best-practices.md` - `skills/creative/animation-pipeline.md` - `skills/creative/storytelling.md` +- `skills/creative/ink-theater.md` — for hand-drawn **ink "doodle"** briefs: a character that draws itself and performs, or a deadpan contraption explainer (Ink Theater engine + Ink Puppet mocap; command `/ink-art`). A stick/pencil character that walks or dances belongs in the `character-animation` pipeline. ## Process diff --git a/skills/pipelines/character-animation/character-design-director.md b/skills/pipelines/character-animation/character-design-director.md index c8f955db..11b665b6 100644 --- a/skills/pipelines/character-animation/character-design-director.md +++ b/skills/pipelines/character-animation/character-design-director.md @@ -5,6 +5,8 @@ Produce `character_design`: a small cast with clear silhouettes, roles, emotions, actions, and style anchors. +> **Hand-drawn ink "doodle" character?** (a stick/pencil figure that draws itself, then walks / dances / waves / jumps) → use the **Ink Puppet** system: `skills/creative/ink-theater.md` + `ink-theater/README.md`. The rig is proportion-agnostic and plays **real mocap** clips via `InkPuppet.choreograph([{clip:'wave_hello'},{clip:'dab'},…])` — the agent only chooses named moves, **never hand-tunes motion**; add moves by converting a BVH with `ink-theater/mocap/bvh2clip.mjs`. Command: `/ink-art`. + ## Process 1. List every character with `id`, role, body type, and style.