Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

Arekejoker/sprite-turntable

Media & Design

Turn one character reference image into a 72-frame 360° transparent orbit and an offline draggable browser turntable.

146
24
Python
MIT
new today

Overview

Sprite Turntable is a reproducible pipeline for producing a 360° character turntable. It starts from a single front-facing character sheet, generates a fixed-pose orbiting video, extracts 72 transparent PNG frames, and packs them into a self-contained HTML viewer where the character can be dragged to spin horizontally and zoomed with the wheel.

The repository is mainly useful for artists, game developers, and technical creators who already work with image and video generation models and want a documented method plus reusable tooling, not just a finished asset. The general path has four stages: neutral-grey front composition, 360° orbit generation with a first/last-frame-constrained video model, SAM 2.1-based bidirectional segmentation and matte extraction, and Canvas-based turntable rendering technical route.

Get Started

The quickest route needs no Python at all. Download the single-file offline viewer from Releases - bunny-showcase.html - and open it in a desktop browser. All 72 full-resolution transparent PNGs, styles, and interaction logic are embedded (about 42.5 MiB). Drag left or right, or move the "水平视角" slider, to rotate around the character; use the mouse wheel or the "缩放" slider to zoom between 1.00× and 2.00×.

To reuse the frames in a game engine, web project, or compositor, download the 72-frame transparent PNG package (640 × 1920, 8-bit straight-alpha RGBA PNG).

To regenerate the single-file HTML from your own frames, only Python 3 standard library is needed. Save the downloaded ZIP as release/全身环绕_正面手臂精修_72帧.zip, then run from the repository root:

python3 tools/export_html.py

The exporter checks the 72 frame filenames, PNG header information, and consistent resolution before Base64-embedding them into the viewer template showcase.html. Custom paths are supported with --frames and --output; the full implementation is in export_html.py.

For a static-site deployment with external PNGs, unzip the frames so the directory contains orbit_000.png through orbit_071.png, copy the viewer template into the same directory as index.html, and preview with python3 -m http.server 8000. External-PNG mode defaults to a dark stage; append ?background=light for the light stage.

Rebuilding the Source Frames

The full generation chain needs more setup. Re-running matting and post-processing on CPU requires Python 3.12, the packages in requirements.txt (NumPy, SciPy, OpenCV, Pillow), and FFmpeg. Re-running generation and tracking from scratch requires a local ComfyUI with MiniMax H3 nodes, CUDA PyTorch, SAM 2.1, and the model weights listed in the model manifest. The documented pipeline places the front reference workflow at 01-qwen-front.api.json, uses the same grey-background image as first and last frame for a 73-frame orbit, then keeps the first 72 frames for seamless looping.

After generation, the matting stage uses edge-matte/track.py for bidirectional SAM 2.1 tracking and edge-matte/build.py for CPU matte extraction and shoe-opening completion; the computed contour file support.npz is already included, so tracking only needs rerunning when you want new segmentation. The example also chains two character-specific refinements after build.py: contour anti-aliasing and front-arm edge correction. Each step verifies the SHA-256 of the previous ZIP, and the scripts contain pixel coordinates and checks tied to the sample character.

Constraints

  • The bundled example is a bunny-girl character with specific retouching patches for cuffs, shoe openings, and front arms. When using your own character, follow the four general stages and produce clean transparent frames; the sample-specific patches can be skipped.
  • Your own 72 frames must follow fixed conventions: orbit_000.png to orbit_071.png, an 8-bit straight-alpha RGBA PNG with identical resolution across all frames, and increasing frame numbers rotating the character toward image-left. orbit_000 faces the camera, and the sequence cycles seamlessly back after frame 71.
  • The viewer's angleMap compensates for non-uniform rotation in generated video. For uniformly rotating footage, it can be reduced to [[0,0],[360,72]].
  • Rendering selects the nearest native PNG for the current angle and does not blend between frames, preserving hair and edge sharpness. The footage covers a fixed-height horizontal orbit only, with no top-down or bottom-up views.
  • The project is MIT licensed. Model weights are third-party and not included in the repository; only their filenames, directories, and checksums are documented.

HotRepo's take

The repository entered HotRepo's new-project list on 2026-11-27 with 101 stars gained and 14 forks gained in a window of roughly five and a half hours, and 101 total stars at the last sampling. That is a single early snapshot rather than a growth trend, but it shows immediate interest in a documented character-turntable workflow. What distinguishes it from a plain asset drop is the reusable part: the standard-library HTML exporter, the frame conventions, and the matting scripts all work independently of the sample character, while the heavy AI generation stage remains tied to specific ComfyUI models and weights.

Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.

You might also like

  1. guzhezao/needleAn interactive 3D vinyl turntable study with draggable records, two speeds and procedural audio.JavaScript109
  2. 0x0funky/agent-sprite-forgeTurns one approved AI still into gated, looped, game-ready 2D sprite sets and maps via coding agents.Python4,734
  3. hongye007/open-pose-costumeA bilingual browser studio that combines pose, costume and character references to generate full character images.TypeScript770
  4. aseprite/asepriteA pixel-art and animated sprite editor for artists who need frames, layers and sprite-sheet export in one tool.C++40,388
  5. crsolver/claude-pxlPixel art as code: a compact DSL that turns text files into sprites, sheets, animated GIFs, and a live painting replay.TypeScript431