Communitygithub.com

paper-cutout-animation

Make vertical (1080x1920) paper-cutout / cut-paper craft explainer videos — every element is a sheet of coloured cardstock with a hand-cut wobbly edge, paper-fibre texture, white cut margin and a soft drop shadow, animated stop-motion style "on twos" with split-pin puppet characters and Thai or English paper label strips. Use when the user asks for a paper cutout / paper craft / cut-paper / stop-motion paper animation, a "กระดาษตัด" style clip, or a kids' science explainer in that look.

What is paper-cutout-animation?

paper-cutout-animation is a Claude Code agent skill that make vertical (1080x1920) paper-cutout / cut-paper craft explainer videos — every element is a sheet of coloured cardstock with a hand-cut wobbly edge, paper-fibre texture, white cut margin and a soft drop shadow, animated stop-motion style "on twos" with split-pin puppet characters and Thai or English paper label strips. Use when the user asks for a paper cutout / paper craft / cut-paper / stop-motion paper animation, a "กระดาษตัด" style clip, or a kids' science explainer in that look.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/hadafisama180-glitch/paper-cutout/tree/HEAD/.claude/skills/paper-cutout-animation

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Paper-cutout stop-motion animation

Reference implementation (copy, then change the world / timeline / text):

FileWhat it is
paper_cutout/papercut.pyengine: shapes, hand-cut edges, paper texture, shadows, labels, camera, encoder
paper_cutout/puppet.pyrealistic human puppet (front view): FK skeleton + ~45 paper pieces, poses, blinking
paper_cutout/rain_story.py31 s Thai water-cycle story: title -> evaporation -> condensation -> rain (kid opens umbrella) -> river run-off -> rainbow

Run with python3 rain_story.py out.mp4, or --preview DIR to dump 12 stills first. Full render ≈ 1.5 s per unique frame (≈ 9 min for 31 s at 12 poses/s).

The look, and where each part comes from

  1. Everything is a piece = list of closed polygons + colour + z. Painted in list order (first = bottom). Union shapes (cloud = circles + a rounded rect) are just several polygons in one piece, so they share one outline, one shadow, one colour.
  2. Hand-cut edge (cut): resample the outline every ~6 px and offset it along the normal by a few low-frequency sines + tiny noise, seeded by the piece name, so the wobble is stable across frames (it's the same sheet). Use rough=False for tiny punched dots (eyes, mouths).
  3. Shadow: mask shifted down-right by z*(0.55, 1.0), Gaussian blur 1.5+0.9z, multiply by 1-0.38*s. Bigger z = sheet lifted on foam tape. Background bands z 0-3, scenery 4-8, characters 4-7, clouds 12, HUD 12-14.
  4. White cut margin (border=px): polygon drawn again with a thick outline in cream under the colour — the "cut around a printed sticker" look. Use on hero objects (sun, cloud, umbrella, drops, river), not on everything.
  5. Paper texture: one 2x-canvas multiplicative map (mottling + grain + short fibre strokes) sampled at a per-piece offset so neighbours don't share grain. shade>0 darkens the inner edge (slightly curled paper).
  6. Masks are 2x supersampled and drawn only in each piece's bbox crop — that's what keeps it fast at full 1080x1920.
  7. Stop-motion: encode renders at ANIM_FPS=12 and holds each pose for 2 frames; boil re-places each piece by ±0.7 px / ±0.25° per pose; global light flicker ±1 %, warm vignette.

Building scenes

  • Shape helpers: circle, ellipse(…, a0, a1) (half-ellipse = umbrella/hair), rect, rrect, band (rainbow stripes / arcs), wave_strip (layered sea/sky, animate phase in opposite directions per layer), ribbon(path, w, taper) (river, steam curls, heat waves, stick), teardrop, star_burst (sun rays, grass tufts), xform(pts, tx, ty, rot, s, pivot).
  • People: use puppet.py, not blobs. P = puppet.pose(x, y, height), set fields, pieces, J = puppet.draw("kid", P, fi). What makes it read as a real person rather than a chibi:
    • proportions ≈ 8-year-old: head ≈ 1/5.5 of height, legs ≈ half;
    • two-segment limbs (capsule tapered thigh/shin, upper arm/forearm) with elbows and knees; angles 0 = down, 90 = screen right, 180 = up;
    • hands = palm + finger mitten + darker thumb; socks, shoes with a white sole;
    • clothes as separate sheets: shorts with two legs, T-shirt, sleeves over the upper arm with a darker cuff, collar ribbon, pocket;
    • egg-shaped face (narrow chin), ears with inner ear, back hair + jagged fringe + shine, darker "shadow paper" under the fringe and the chin;
    • eyes = white + iris + pupil + glint + lash line; eyebrows; nose; blush; mouths smile | open | o | flat | frown;
    • life: breath, sway, lean, weight shift on the legs, blink_at(t), look (pupils), face_up (features slide up when looking up), head_tilt, brows (-1 worried .. +1 happy).
    • Props in the hand: use J["rwr"] + puppet.d(J["rfdir"])*11 (palm centre) and insert the prop before kid.rhand so the fingers wrap over it.
    • Layer order matters for the face: face -> shadow paper -> eyes/brows/ nose/mouth -> fringe. A shadow piece added after the eyes hides them.
  • Growing things: grow scale (cloud), sweep angle (rainbow band a1), truncate a path (river ribbon over the first n samples).
  • Colour changes over time with lerp_col (sky and cloud greying in rain).
  • Camera (Camera.apply(piece, par)): pan/zoom per beat from a key list; par < 1 for far layers gives parallax; HUD labels skip the camera.
  • Text = label(): a cream paper strip with antialiased Loma Bold text, rotated a few degrees; headline drops in with back_out, flies off tilted at the end of the beat; caption rises from the bottom. Loma has Thai; keep captions to 2 short lines (≈ 20 Thai chars) at 40 px, headlines 50-78 px.

Gotchas

  • piece names seed the cut shape and the boil: give every piece a unique, stable name (drop{j}, not a random one) or edges will flicker.
  • Teardrop / thin ribbons with width < 4 px vanish after supersampling — fade them out by scaling width to ~0 and then skip (if sz > 0.05).
  • Keep particles born after their start time (rain uses a phase check) or the first frame of a beat shows them mid-air.
  • A flat polygon bottom edge that meets another layer shows a hard shelf; extend layers past each other (sea starts at x=150, under the mountain).
  • Check the contact sheet before a full render: ffmpeg -pattern_type glob -i 'dir/f_*.png' -vf "scale=270:-1,tile=6x2" sheet.png.
  • Audio: none in the reference; mux narration with encode(..., audio=wav) (see tools/tts_omnivoice.py for Thai voice-over).

Related Skills