Files
breeze/docs/sun-salutation-girl.md
waozi 55c43639e2 Follow the classic Sun Salutation, with lunges and switching legs
Sun Salutation now moves through the classic sequence: from the fold one
leg steps back into a low lunge with its knee down, then plank, knees,
chest and chin, cobra and down dog, and a lunge with the other knee down
on the way back up. The hands stay beside the feet from the fold until she
stands, and every other round steps back with the other leg, from a second
set of frames. The four steps whose recorded lines no longer fit say only
the breath until new lines are recorded.
2026-10-19 23:54:15 -03:00

6.4 KiB
Raw Permalink Blame History

Sun Salutation animation rig

The shared pose rig drives all four approved Sun Salutation characters. The original scripts/render-sun-salutation-girl.py remains the offscreen renderer and can render its archived reference character for motion studies:

python3 scripts/render-sun-salutation-girl.py                # video
python3 scripts/render-sun-salutation-girl.py --still 21     # one frame
python3 scripts/render-sun-salutation-girl.py --theme clear  # transparent video
python3 scripts/render-sun-salutation-characters.py          # all four app characters

The video goes to build/sun-salutation-girl/video/light/sun-salutation.mp4 (1536 × 1024, 30 fps, 69 s, one chapter per step) and stills to build/sun-salutation-girl/light/. It needs Python 3 with pycairo, NumPy and Pillow, and FFmpeg with libx264. Rendering is offscreen and deterministic: the same inputs give byte-identical video, and a still matches the same frame of the video, hair included.

Inputs

  • docs/sun-salutation-girl.json holds everything that places her: the poses and their order, hold and transition times, bone lengths, the camera, the stepping stops through the low lunge, the swan-dive arms, the hair strand, the part key points, and the themes. Change poses here.
  • design/sun-salutation/girl-parts/ holds the painted parts, made with Codex's built-in image generation from the reference girl; prompts.json keeps every prompt and design/sun-salutation/girl-source/ the briefs. The head is three layers on one canvas (back hair, face and neck, front hair) so the long hair falls behind a fully painted neck.

How a frame is drawn

The timeline interpolates the rig poses and moves the hip so hands and feet can reach. Arms and legs are two-bone chains; their paintings are warped along the bent bones. Each leg painting carries her seat: above the hip joint it follows the pelvis and bends round into the thigh, so the seat stays smooth even when the hip folds all the way. The top is warped too: its hem flares out over the leggings, more at the back while she is upside down. The seat is a little fuller at the back, widening smoothly around the hip while its front and the lower leg keep their shape. Head and hands move rigidly; the foot drawings rotate and adjust their shape while rolling between contacts. The long lock is a Verlet strand stepped once per video frame from rest at 0 s.

Back to front: far leg and arm (slightly darker), long hair, back hair, near leg, face and neck, top, front hair, near arm. The collar covers the base of the neck as the head turns. The top is always over the leggings: above its hem, anything of the leggings behind her back is clipped away.

Transparent output

The clear theme paints no background, so every pixel keeps its real coverage and the white top stays intact; nothing is keyed out afterwards. --theme clear writes build/sun-salutation-girl/video/clear/sun-salutation.webm (VP9 with an alpha channel) and --still writes PNGs with alpha.

The app's frames

The app plays the flat characters' frames; see the flat renderer.

The app moves with the breath through the classic sequence. Each pose is reached on one breath. The title bar shows only the step number; below it the session shows the pose's name and "Breathe in" or "Breathe out" above a bar that fills while breathing in and empties while breathing out: out in Mountain pose, in to the upward salute, out to the fold, in to the lunge with one knee down, out to step back into plank and in while holding it, out to lower the knees, chest and chin, in to cobra, out to downward dog, in to the lunge with the other knee down, then out, in and out back up to Mountain pose. Only the first round starts with a breath in Mountain pose; later rounds rise straight from the Mountain pose that ended the previous one. Each round switches legs: the next one plays the other side's frames, in which the other leg steps back first. The tempo is the length of one breath, 6 s in the first round easing to 4 s in the last by default.

The move into a pose fills three quarters of its breath, at most 4 s, showing one solid frame at a time, then the pose settles for the rest of the breath. Hands and feet also switch contact drawings without a fade. Frames are separate images so that only the few most recent ones stay loaded.

Transitions

  • Mountain to upward salute, and back down, is a sweep: the praying hands open forward into straight arms that rise in front of her to overhead, so they never pass across her face.
  • Upward salute to forward fold, and back up, is a swan dive: straight arms stay in line with the spine, then sweep to the floor.
  • The hands rest beside the feet in the fold and stay planted there until she stands up again; the feet stay where plank puts them until down dog.
  • Fold to lunge: she bends her knees, then the far foot steps back to where plank's feet will be and its knee goes down, toes tucked, the front shin standing over its ankle, chest lifted and looking forward and up.
  • Lunge to plank: the back knee lifts, then the near foot steps back.
  • Plank to knees, chest and chin: both knees go down first, then the chest and chin, the hips staying a little raised. With the chest on the floor an elbow bending down would pass through it, so it turns up toward her back; the flat renderer blends the two bends, the elbow turning out of the picture.
  • Knees, chest and chin to cobra: she slides forward onto her hips with the tops of her feet down and lifts her chest on bent elbows.
  • Down dog to lunge: the far foot steps forward between the hands, then the near knee goes down; the near foot then steps forward into the fold.
  • otherSide swaps the lunges for the next round, so the near leg steps back first and the far knee goes down in the second lunge.
  • A foot steps while her hips are high: it leads hips that lower and follows hips that rise, skims just off the floor, and the hips lift a little as it passes under them. The leg reaches long instead of kicking up behind her.
  • Cobra to downward dog rolls the toes under and lifts the ankle over them. The instep and flat-foot drawings share the same ankle, toe and heel positions at their solid handoff, using the toe and heel key points in the rig's foot parts. The two renderers use the same contact transforms.
  • A foot in the air points its toes along the shin; each foot keeps its own drawing while the feet are apart.