Subchapter 20.1
references/animated.mdMarkdown3 KBView on GitHub
In a hand-painted or 3D-animated film the character, the world and the camera are one picture, so the layers do not come apart. Decide shot by shot: build what code can carry, and generate the rest.
Say so before starting, in the person’s language. For example:
This film is painted, so I’ll rebuild what I can in code and regenerate the rest from its own frames, shot by shot. The code parts stay editable. The generated shots come back as clips you can replace, not layers you can change.
Work as people.md does, one generated shot per original shot, with these changes:
Read the cuts by eye. Sudden light in a shot can list as a cut. Look at the frames either side of each one: the same picture under different light is one shot. Join its pieces into one guide and pass --allow-cuts.
The plate is the shot’s first frame with its text and logos removed by an image edit.
Generate from the plate, with the shot as the guide:
npx hyperframes media-use generate --type video --reference <plate> --motion <the original shot> \
--aspect <the source's> --seconds <n> --prompt "<the painting style, what moves, the camera>" --out <shot>.mp4--first-frame does not combine with --motion, so the plate goes in --reference. Name the style in the prompt, and blank drawn text in the guide with --mask. Trim the guide to the shot’s own frames: leave out the blended frames of a dissolve at either end, or it comes back as the neighbouring shot.
Frame it by comparing a stable shape at the shot’s start and end with npx hyperframes diff <video> . --at t,t,…, then set scale and position by hand. measure face is for real faces.
Retime it. HeyGen performs the camera’s moves late, so a generated shot rarely lines up as it comes back. Match its moves to the original’s frames and set the clip’s data-media-start and data-playback-rate to fit, shot by shot.
REVERSE.md lists which shots are generated and which layers are code.