normalize_frames
Converts separately generated frames into a consistent sprite set by matching body scale, anchoring feet, centering on one canvas, and snapping colors to a reference.
Instructions
Turn separately generated frames into one consistent sprite set (no Codex call, instant).
Frames need a transparent background (generate them with chroma_key). Each frame is scaled so the character's body area (ignoring thin parts like a pick handle) matches reference_path, which keeps the same size whether the pose stands, crouches or lunges. Frames are anchored on a shared feet baseline and centre on one canvas, given hard alpha, and snapped to up to palette_size of the reference's own colours (0 keeps the generated colours). Writes <output_dir>/.png and returns each frame's scale and body height, the shared canvas size and the anchor (feet point) for the engine's sprite offset.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"frame_paths": "<frame_paths>",
"reference_path": "<reference_path>",
"output_dir": "<output_dir>"
},
"name": "normalize_frames"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| padding | No | ||
| overwrite | No | ||
| output_dir | Yes | ||
| frame_paths | Yes | ||
| palette_size | No | ||
| reference_path | Yes |