Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modly Sprite Pipeline

One Modly extension, six nodes, one goal: turn the output of the official 3D generation extensions (Hunyuan3D Mini/Turbo/Fast, TripoSG, Trellis2 GGUF) into game-ready pixel-art sprites. Pure post-processing: no 3D generation is implemented or modified

3D generation (Modly extensions)
   │
   ▼  mesh (.glb / .gltf / .obj / .ply / .stl / .off)
[render]      turntable: N angle photos, transparent bg   (pure-numpy rasterizer, CPU)
   │
   ▼  images
[normalize]   canvas + baseline + uniform batch scale     (512px canvas)
   │
   ▼
[pixelate]    pixel-art: downscale, palette, dither       (→ 64px sprites)
   │
   ├──────────────► [validate]  QC gate: score, pass/fail, report.json
   ▼
[pack]        texture atlas + engine-ready JSON (Unity / Godot)
   │
   ▼
[export]      copy/rename the result to a folder of your choice

Nodes

  • Render Mesh Angles — mesh → image. Photographs the mesh from N angles around a turntable.
    • View count — how many angle photos (8 = one every 45°).
    • Camera elevation — camera height above the horizon (30° = classic isometric look).
    • Render size — resolution in px; the speed/quality lever (lower = faster renders).
    • Shading — lighting style (Smooth / Cel flat bands / Flat / None).
    • Light bands — number of flat light levels, only shown when Shading = Cel.
    • Light follows — Screen keeps the light fixed on-screen for every angle; World pins it to the object like a sun.
    • Light azimuth / elevation — where the light comes from (left/right, above/below).
  • Normalize Sprites — image → image. Re-frames every sprite on a shared canvas so a set lines up.
    • Canvas size — output square size in px.
    • Alignment — Baseline puts everything on the same ground line; Center is for icons/projectiles.
  • Pixel-Art Convert — image → image. Downscales and palettizes into the final pixel-art look.
    • Sprite size — final sprite size in px.
    • Palette colors — how many colors the sprite is reduced to.
    • Dithering — None for flat pixel-art, Ordered/Floyd for a softer gradient look.
    • Outline — 1px silhouette contour (Darken / Black / None).
    • Display upscale — optional nearest-neighbour zoom of the output (1×–8×).
  • Validate Assets — image → image. Read-only QC pass over a sprite set.
    • Strictness — how tight the quality thresholds are (Lenient/Standard/Strict).
    • On failure — Report just attaches results; Block fails the node (CI gate).
  • Pack Atlas — image → image. Packs a sprite set into a texture atlas with engine metadata.
    • Max atlas size — largest page size; extra sprites spill onto more pages.
  • Export Files — image → image. Delivers the result to a folder you choose.
    • Destination folder — where the files are copied (created if missing).
    • Base name — renames the output; empty keeps the original file names.
    • Overwrite — replace existing files at the destination, or fail instead.

Example workflow

A full mesh-to-sprite chain, from a duck photo to a validated pixel-art atlas:

Example workflow: photo → mesh → decimate → texture → sprite pipeline

Result — 8 turntable angles, 64px, 16-color shared palette, cel shading, outline:

Example result: 8-angle pixel-art rubber duck sprite sheet

3D generation side (official Modly extensions, not part of this repo):

Sprite Pipeline side (this repo): render (8 views, 512px) → normalize (baseline, 64px canvas) → pixelate (64px, 16 colors) → validate (standard) → pack (256×256 atlas) → export (named, to a chosen folder).

Importable workflow JSON: examples/example-workflow-duck.json (Modly: Workflows → Import). Swap the imageNode for your own photo and it runs end to end with the same params.

Installing in Modly

This repository is a self-contained extension. In Modly: Models → Install from GitHub → paste the repository HTTPS URL. Modly runs setup.py (venv + Pillow/numpy/trimesh) and the six nodes appear in the workflow graph.

License

MIT (no GPL dependency — Pillow/numpy/trimesh are permissively licensed).

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages