# Images of an animation

`@recit/character` draws a described character itself, in vector or in pixel. When you want painted
images instead, an image tool of your choice makes them, outside Récit: Récit writes what each image
must show, and tracks every file that comes back. It never calls a model, holds no key and ships no
provider's SDK. This is a preview feature.

## 1. Name the animation in a prompt

A prompt entry whose subject is a described character can name one of its animations (`:::animation`
of the character):

```md
--- id=lorem-hello entry=prompt subject=lorem shot=medium animation=hello aspect=1:1

Lorem greets the reader with one leaf.
```

`recit validate cast.md` refuses an animation the character does not have, and lists the ones it
has.

## 2. Build the prompts and the pose guides

```sh
recit prompts build cast.md --frames            # one prompt per key
recit prompts build cast.md --frames --every 4  # and one frame in four
```

Each image gets a prompt, `prompts/lorem-hello-f005.txt`, named after its frame. Its text is the
prompt of the entry, the identity of the style and of the character word for word, with the pose and
the expression of that frame and a `Motion:` line: `key image: waving`, or
`between rest and waving, 75%` for a frame between two keys. Beside it, its **pose guide**,
`prompts/frames/lorem-hello/lorem-hello-f005.svg`: the posture of that frame in grey on white, no
colour, no shading. Between two keys, `bend` interpolates linearly, like `dx`, `dy` and `scale` (not
along the shortest arc like `rotate`). It says where the parts are; the canonical reference says
what they look like.

`prompts.json` lists every frame prompt with its `frame`, `timeMs`, `key`, `between` (the two poses
and the progress), `guide`, `previous` (the frame before it, for a tool that chains its images) and
`fingerprint`. Nothing asks for every frame of an animation by default: each image costs, and the
fewer images, the more consistent.

## 3. Generate the images, with the tool you choose

Give the tool, for each prompt, its text, the canonical reference of the character and the pose
guide. A seed is optional: a reference keeps a character consistent far better than a seed (see
[Prompts and provenance](/documentation/scenario/provenance)). A tool that takes the previous image
as input follows `previous`. Save each image under the name of its prompt: `lorem-hello-f005.png`.

## 4. Register them

```sh
recit assets register generated/ --origin ai --tool "Lorem Image" --model lorem-2 --license CC-BY-4.0
```

On a folder, every image whose name is a prompt or a frame prompt gets its provenance file
(`lorem-hello-f005.png.json`): the tool and the model as you give them, `origin` (`mixed` when you
retouched it), `aiGenerated`, the author, the licence, the fingerprint of its prompt, and as
references the character's references and the pose guide. An image of another name is listed and
left alone. One image at a time:
`recit assets register lorem-hello-f005.png --prompt lorem-hello-f005`.

## 5. Play them, and publish

A character whose model declares a `frames` render plays the registered images in the order and for
the durations of the animation:

```md
::render{id=generated kind=frames}
```

In a film, the `character` block plays them when the scene names that render (see
[motion](/formats/motion/overview)):

```md
--- id=hello type=character cast=lorem animation=hello render=generated
```

The CLI reads the frame prompts of the bible's animated prompt for that character and animation (the
first one, when several), and puts each image in the film, so the player reads no file. Until an
image exists, or when its prompt or its pose changed since it was registered (it is **stale**), the
vector drawing of the same frame stands in, and `recit validate` warns. With `--strict`, the check
of a publication build, a missing or stale image is an error: what you publish is the images you
generated, each with its provenance.

## Licence and mention

The provenance file is the record of each image: keep it next to the image. `aiGenerated: true`
marks every image made by a model; say so where you publish them, as the platform and the law of
your readers require. The licence of a generated image is the one the tool's terms give you: write
it in `--license`.
