> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pixelate.tomblack.ca/llms.txt
> Use this file to discover all available pages before exploring further.

# Animation capture

> Capture one or more AnimationClips into sliced sprite sheet atlases.

Use animation capture for walk cycles, attacks, idle loops, effects, and any object that needs multiple frames.

## Setup

<Steps>
  <Step title="Turn on Animation">
    In the `PixelateCaptureManager` inspector, check the **Animation** section. This switches the capture from static image to animation.
  </Step>

  <Step title="Assign an animated target">
    Set **Target** to the GameObject that has the `Animator` used by your clips. When the capture manager is selected, Pixelate isolates the target and its children so other scene objects do not appear in previews or captures.
  </Step>

  <Step title="Add source clips">
    Add one or more entries to **Source Clips**. Each entry has a clip and a speed value.
  </Step>

  <Step title="Set frames per second">
    Choose how many frames Pixelate samples per second of animation. The default is `12`.
  </Step>

  <Step title="Preview frames">
    Use **Preview Frame** and the preview controls to check poses before capture.
  </Step>

  <Step title="Click Capture">
    Pixelate captures every Source Clip and exports each one into its own folder.
  </Step>
</Steps>

<Note>
  If **Animation** is enabled but no Source Clips are assigned, Pixelate falls back to a static image capture.
</Note>

## Output

For a target named `Hero` and a clip named `Run`, Pixelate creates:

| File                      | When created                                   |
| ------------------------- | ---------------------------------------------- |
| `Hero/Run/Hero_Run.png`   | Always.                                        |
| `Hero/Run/Hero_Run_N.png` | When **Normal Map** is enabled in the profile. |

Pixelate imports each atlas as a multiple-sprite texture and slices only the frames used by the clip.

## Atlas size

Pixelate arranges frames in a square grid.

```text theme={null}
frameCount = ceil(clip.length * framesPerSecond / clipSpeed)
columns = ceil(sqrt(frameCount))
atlasWidth = columns * cellSize.x
atlasHeight = columns * cellSize.y
```

The atlas must stay at or below `4096 x 4096`. If validation blocks capture, lower **Frames Per Second**, reduce **Cell Size**, increase clip speed, or split the animation into shorter clips.

## Source clip speed

`Speed` changes how quickly Pixelate samples that clip:

| Speed | Result                                  |
| ----- | --------------------------------------- |
| `0.5` | Slower animation, more sampled frames.  |
| `1`   | Normal clip speed.                      |
| `2`   | Faster animation, fewer sampled frames. |

<Warning>
  Animation capture requires an `Animator` on the target when Source Clips are assigned.
</Warning>

<Card title="Next: Export and slicing" icon="folder-output" href="/output">
  Learn where Pixelate writes animation atlases, how frames are sliced, and how matching normal maps are linked.
</Card>
