Generate a multi-frame animation with AI
The AI Assistant can build a whole animation, not just a single still frame. You describe the scene and what moves in it; the assistant sets up the timeline, paints the scenery once, carries it across every frame, and animates the parts that move.
This guide covers what to ask for, what the assistant does under the hood, and how to fix the results when a frame comes out wrong. For single-frame edits, see AI-assisted editing. The complete action list is in the AI actions reference.
![]()
When to use this
Section titled “When to use this”Reach for AI animation when the movement is ambient — weather, water, flicker, drift, a light that pulses. Those are repetitive to draw by hand and the assistant produces them in one action per effect.
For character movement — a walk cycle, a swing, a jump — draw the key poses yourself and use tweens to fill the gaps. The assistant can place keyframes, but posing a character is judgement work you’ll want to do by hand.
Ask for the whole animation, not a still
Section titled “Ask for the whole animation, not a still”The difference is in the prompt. Say how long the loop should be and what moves:
Create a 12-frame animated scene on this 256×256 canvas: a detailed pixel art forest with a river in the foreground, set in the evening under a storm. Rain falling throughout, and a lightning strike that flashes on one frame with an afterglow on the next.
Naming a frame count matters. Without one the assistant will often produce a single frame, because “a forest with rain” describes a picture, not a loop. Eight to twelve frames suits weather and ambient loops; four to six is enough for a simple two-state blink; sixteen to twenty-four is worth it only when the motion needs to feel smooth. Every frame is a full set of cels, so longer is not better.
What the assistant does
Section titled “What the assistant does”Understanding the five steps makes the failures easy to diagnose.
- Builds the timeline first. One
setFrameCountaction creates every frame and sets the frame duration. 90ms per frame reads as smooth motion; 150–250ms gives a slower, chunkier loop. - Creates layers back-to-front, separating static from moving. Scenery gets its own layers; each moving element gets a layer in front. This split is what makes the animation possible at all.
- Paints the whole scene on frame 0. Full art direction — gradients, depth, shading, detail — exactly as it would for a still image.
- Carries each static layer across every frame with
copyLayerToFrames. - Animates the moving layers with one swept action per effect, then sets timing and adds an animation tag.
Static and moving belong on different layers
Section titled “Static and moving belong on different layers”A layer that holds both a still river and its moving ripples cannot be animated: carrying it across frames would freeze the ripples, and animating it would erase the river. The assistant splits them, and a good prompt helps it:
Put the still water on a
Riverlayer and the moving ripples on a separateRippleslayer in front of it.
The same applies to a lightning flash. The light belongs on its own layer, and — because lightning back-lights a landscape — that layer needs to sit behind the scenery so the trees stay silhouetted against a bright sky. A flash layer in front paints over the forest.
Effects the assistant can animate
Section titled “Effects the assistant can animate”| You want | What it uses |
|---|---|
| Rain or snow | drawRain swept across every frame; it advances and loops on its own |
| A lightning strike | drawLightning on one or two frames, plus drawFlash for the light it throws |
| Drifting clouds, flowing water, scrolling stars | any drawing primitive plus a per-frame drift that wraps, so the loop closes |
| Shimmer, sparkle, rustling foliage | scattered marks that re-seed each frame |
| A colour pulse | a gradient redrawn per frame with shifting colours |
| A character or object moving | keyframes on three to five frames, then generateTween |
Rain loops seamlessly on its own as long as its fall speed is a whole number of falls per loop. If you see a visible jump when the animation wraps, that’s the cause — ask for a whole-number speed.
Check the result frame by frame
Section titled “Check the result frame by frame”![]()
Step through the timeline before you accept the result. Three failures account for most problems:
Only frame 1 has the scene. A static layer wasn’t carried across. Name it and ask again: “copy the Forest layer from frame 1 onto frames 2 through 12.”
Blank or transparent patches between bands. The scenery layers don’t overlap — there’s a gap between, say, the bottom of the forest and the top of the riverbank. Ask for the background layer to extend further down behind everything; it costs nothing because it sits behind the scenery.
The flash washes the scene out. The overlay is too strong or on the wrong layer. Ask for a lower strength, and for the sky flash to sit behind the scenery rather than in front.
Tune it with follow-up prompts
Section titled “Tune it with follow-up prompts”Adjust one thing at a time rather than regenerating. The assistant works against the project as it stands, so these compose:
- “The rain is too heavy — halve the number of drops and shorten the streaks.”
- “Move the lightning strike to frame 8 and put the afterglow on frame 9.”
- “Make the river ripples drift more slowly.”
- “The evening sky is too blue. Warm the horizon band towards orange.”
- “Add an animation tag
stormcovering the whole loop, direction Forward.”
Every AI action is undoable with Ctrl+Z, so an experiment costs you nothing.
Limits
Section titled “Limits”The assistant will not build more than 64 frames in one project — beyond that the frame data grows large enough to slow the editor and the save. For a long sequence, draw keyframes and generate the in-betweens instead.
Detailed scenes take a while to appear. A twelve-frame scene is roughly twenty-five actions, several of which paint every frame in turn, so give it time before assuming it has stalled.
Related
Section titled “Related”- AI-assisted editing — single-frame edits and prompting basics
- AI actions — the full action vocabulary
- Layers, frames & the timeline — how the timeline is structured
- Generate in-between frames — tweening between key poses
- Slice animations with tags — naming exportable ranges
- Export a GIF or sprite sheet — getting the loop out
