alchaincyf/huashu-art-motion
艺术动画skill:35种艺术风格、9种解说语法,用代码让画动起来。
huashu‑art‑motion – Code‑driven artistic animation
What it is – A collection of code, data and tooling that lets a coding agent generate short, frame‑accurate animation clips in a variety of artistic styles. The repository ships:
| Component | What you get |
|---|---|
| 35 style “recipe cards” | Parameter sets, motion motifs and transition definitions for styles ranging from cave paintings to Van Gogh, Bauhaus, 8‑bit, vaporwave, etc. |
| Engine & libraries | A self‑contained animation engine (scripts/engine/) with brushes, renderers, post‑processing, camera helpers, audio synthesis templates, etc. |
| Scene scripts | One ready‑to‑run scene per style (scripts/engine/scenes/). |
| Explainer‑video grammars | 9 JSON‑driven “grammar” templates (Kurzgesagt, Vox, whiteboard, story‑time, kinetic‑type, 3Blue1Brown, keynote UI, finance‑chart, presenter) that map a narration spec to a timed clip. |
| Long‑scroll demo | A skeleton where a character walks through successive paintings, with three sample worlds (Egyptian mural → Monet → 8‑bit). |
| Utility scripts | breakdown.py (turn a reference video into a cut‑grid + motion heatmap), qa.py (automatic quality metrics), audio‑generation helpers, font‑subsetting, etc. |
| Documentation | 12 method‑guide markdown files, style‑card markdown, grammar specs, and a SKILL.md that explains how a coding‑agent should select the right docs. |
How it works (high‑level)
- Pick a style – Choose one of the 35 recipe cards. Each card defines brush settings, colour palettes, a signature transition and a short‑film “template”.
- Write a spec – For explainer‑video grammars you provide a JSON that lists narration lines, timing, and optional assets (e.g., a character image). The engine turns the spec into a frame‑accurate timeline.
- Render – Run the provided Python entry point (
scripts/engine/render.py) with the chosen scene or grammar. The script uses uv for dependency management, ffmpeg for video encoding, and Playwright Chromium for headless canvas rendering. - QA – After rendering,
qa.pyevaluates stability, cost per frame, motion smoothness and textual overlay consistency. It can be run by a separate agent to verify the output. - Compose – The generated MP4 (or PNG sequence with alpha) can be stitched together, added to a voice‑over pipeline, or used as a visual element in a larger production.
Getting started (quick steps)
# 1. Clone and install dependencies
git clone https://github.com/alchaincyf/huashu-art-motion.git
cd huashu-art-motion
uv sync # installs uv, ffmpeg, playwright etc.
uv run --with playwright playwright install chromium
# 2. Render a single frame of the Van Gogh style
uv run --with playwright python scripts/engine/render.py \
--solo 09_postimp --stills 0.3 --out demo_van_gogh.png
# 3. Render a full explainer clip (finance‑chart grammar)
uv run --with playwright python scripts/engine/render.py \
--spec scripts/engine/examples/t3_finance_chart.json \
--out finance_chart.mp4
The --solo flag selects a scene; --spec points to a grammar JSON.
Who might use this?
- Content creators who want programmatic, style‑consistent animation for YouTube explainer videos.
- AI‑agents (e.g., Claude, GPT‑4o) that can be given a task like “make a 5‑second Van Gogh transition for a cat walking across a canvas” and then invoke the appropriate recipe and render script.
- Researchers exploring procedural art generation, style transfer pipelines, or automated video QA.
- Educators demonstrating how code can drive visual storytelling across art‑history periods.
Limitations & scope
- The repository supplies code and data only; you must provide any voice‑over audio or custom character assets.
- Rendering relies on a headless Chromium canvas; performance depends on your hardware.
- The ninth “presenter” grammar is a reference implementation and expects you to supply your own character frames.
License
- Core code and documentation: MIT (free to modify and redistribute).
- Fonts: various SIL OFL licenses.
- Stroke‑data: Arphic Public License.
- The author’s cartoon avatar and demo‑video imagery are for demonstration only and not covered by the MIT grant.
TL;DR
huashu-art-motion is a skill‑package that turns a coding‑agent’s high‑level description into animated clips across 35 artistic styles, with ready‑made scene scripts, style recipes, and explainer‑video grammars. It is a genuine, code‑centric project at the intersection of generative art, procedural animation, and AI‑driven content pipelines.
Related
- Project
- Project
- Project
- Project