mirror of
https://github.com/calesthio/OpenMontage.git
synced 2026-08-13 12:23:44 +08:00
feat: discoverability + cross-agent slash commands for Ink Theater / Animated Drawing
Makes the doodle-animation capability findable instead of hidden. Routing (OpenMontage-internal): - AGENT_GUIDE: Style Playbooks gets an ink-sketch row + a 'hand-drawn doodle' routing note (it's a style + engine on the animation / character-animation pipelines, NOT a new pipeline). - animation/idea-director + character-animation/character-design-director point to the Ink Theater / Ink Puppet skills for hand-drawn character briefs. Cross-agent slash commands (/ink-art, /animated-drawing) for Claude Code, Copilot, Cursor, and Codex — thin pointers to the canonical skills so they stay in sync. /ink-art = create a vector doodle from scratch (Ink Theater + Ink Puppet mocap); /animated-drawing = animate a SUPPLIED drawing via Meta AnimatedDrawings (raster). New skills/creative/animated-drawing.md documents the Path A setup/run/limits. Codex prompts are user-home only — .codex/prompts/README explains the copy/symlink step. .claude/commands/*.md (Claude Code) .github/prompts/*.prompt.md (Copilot) .cursor/commands/*.md (Cursor) .codex/prompts/*.md + README (Codex; copy to ~/.codex/prompts)
This commit is contained in:
12
.claude/commands/animated-drawing.md
Normal file
12
.claude/commands/animated-drawing.md
Normal file
@@ -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
|
||||
15
.claude/commands/ink-art.md
Normal file
15
.claude/commands/ink-art.md
Normal file
@@ -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 `<div>`s** (HyperFrames does not apply webfonts to SVG `<text>`).
|
||||
- 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
|
||||
12
.codex/prompts/README.md
Normal file
12
.codex/prompts/README.md
Normal file
@@ -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.)
|
||||
12
.codex/prompts/animated-drawing.md
Normal file
12
.codex/prompts/animated-drawing.md
Normal file
@@ -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
|
||||
12
.codex/prompts/ink-art.md
Normal file
12
.codex/prompts/ink-art.md
Normal file
@@ -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 `<div>`s** (HyperFrames doesn't apply webfonts to SVG `<text>`). Validate (`npx hyperframes lint` + `snapshot`) before rendering.
|
||||
|
||||
Request: $ARGUMENTS
|
||||
9
.cursor/commands/animated-drawing.md
Normal file
9
.cursor/commands/animated-drawing.md
Normal file
@@ -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.
|
||||
10
.cursor/commands/ink-art.md
Normal file
10
.cursor/commands/ink-art.md
Normal file
@@ -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 `<div>`s** (HyperFrames doesn't apply webfonts to SVG `<text>`).
|
||||
- Validate (`npx hyperframes lint` + `snapshot`) before rendering.
|
||||
9
.github/prompts/animated-drawing.prompt.md
vendored
Normal file
9
.github/prompts/animated-drawing.prompt.md
vendored
Normal file
@@ -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.
|
||||
10
.github/prompts/ink-art.prompt.md
vendored
Normal file
10
.github/prompts/ink-art.prompt.md
vendored
Normal file
@@ -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 `<div>`s** (HyperFrames doesn't apply webfonts to SVG `<text>`).
|
||||
- Validate (`npx hyperframes lint` + `snapshot`) before rendering.
|
||||
@@ -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
|
||||
|
||||
|
||||
41
skills/creative/animated-drawing.md
Normal file
41
skills/creative/animated-drawing.md
Normal file
@@ -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`).
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user