Nodes/comfyui-game-assets-maker/Aseprite Animation Atlas
ComfyUI Node

Aseprite Animation Atlas

The node that turns a grid of frames into an actual animation

By quinteroac·Created 4 months ago·Updated 4 months ago· 20
Aseprite Animation Atlas
    • aseprite_json
    • json_path
    • report
    sheet_width1024
    sheet_height1024
    frame_count4
    layout_directionHorizontal
    columns0
    animation_count1
    animation_tags[{"name":"idle","from":0,"to":3,"direction":"forward","color":"#000000ff"}]
    image_filenameanimation_spritesheet.png
    frame_duration100
    frame_name_prefixframe
    save_jsontrue
    filename_prefixaseprite_animation_atlas

    A spritesheet of animation frames is just a picture of pictures until something tells your engine which cells belong to idle and in what order. GameAssets_AsepriteAnimationAtlas writes that something: one JSON file containing both the Aseprite frame rectangles and the meta.frameTags that define the animations. One node, one file, straight into Aseprite or any engine that reads its format.

    This is the sibling of Aseprite Visual Novel Atlas, and the split matters: the VN node handles expression states (neutral, happy, sad), while this one is for real animations like idle_01idle_04. Both live in comfyui-game-assets-maker, the pack quinteroac shared on r/comfyui as playground nodes for sprite generation with GPT Image 2 - and yes, they're prototype-grade, but this one has enough polish that it's my default pick for animation sheets.

    How it works

    You declare the spritesheet dimensions and frame_count, then define animations as tags. An idle animation with 4 frames is a single tag spanning frame 0 to 3 with direction: forward. The node lays the frames out (Horizontal, Vertical, or Grid - with columns: 0 auto-balancing grid layouts), names each frame using frame_name_prefix (frame_01.png …), and assembles frames + meta.frameTags into one Aseprite JSON.

    The JS frontend does the heavy lifting on tags: it hides the raw JSON and shows one editable block per animation - name, first frame, last frame, playback direction, and color. Direction uses Aseprite's exported values: forward, reverse, or pingpong.

    The inputs that matter

    • sheet_width / sheet_height - must match your actual spritesheet.
    • frame_count - total cells. The animation_count and per-tag widgets define which ranges mean what.
    • animation_tags - the hidden JSON that the per-animation widgets write to. Default is a single idle tag, 0..3, forward.
    • frame_duration - ms per frame (default 100).
    • image_filename - the spritesheet filename recorded in meta.image, so keep it in sync with what you save.

    Outputs

    aseprite_json (the full atlas + tags, as a STRING), json_path (saved JSON in ComfyUI's output directory when save_json is on), and report (the layout and tag list). Wire aseprite_json straight into Aseprite Animation Preview to pull the animation back out as frames you can preview or export. The pack even ships an example workflow, "Animation Sprite Gen.json", wired exactly that way.

    Installing

    ComfyUI Manager (search "comfyui-game-assets-maker") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/quinteroac/ComfyUI-GameAssetsMaker.git
    cd ComfyUI-GameAssetsMaker
    pip install -r requirements.txt
    

    Restart after. The only dependency is opencv-python; there are no models to download and nothing GPU-heavy hiding in the requirements.

    Where people get burned

    Don't point frame_count at the number of animations - it's the total frame cells on the sheet, and the tags' from/to are indices into that count. And remember the JSON describes a layout; if your generated sheet doesn't match sheet_width/sheet_height, the tags will describe cells that don't exist. Generate with the JSON in hand, not after the fact.

    CategoryGame Assets/Aseprite

    Inputs (12)

    NameTypeDefaultDescription
    sheet_widthINT10241–65536
    sheet_heightINT10241–65536
    frame_countINT41–10000
    layout_directionCOMBOHorizontal3 options: Horizontal, Vertical, Grid
    columnsINT00–128
    animation_countINT11–128
    animation_tagsSTRING[{"name":"idle","from":0,"to":3,"direction":"forward","color":"#000000ff"}]
    image_filenameSTRINGanimation_spritesheet.png
    frame_durationINT1001–60000
    frame_name_prefixSTRINGframe
    save_jsonBOOLEANtrue
    filename_prefixSTRINGaseprite_animation_atlas

    Outputs (3)

    NameTypeDescription
    aseprite_jsonSTRING
    json_pathSTRING
    reportSTRING