← 返回
未分类

Pixel Asset Pipeline

AI pixel art sprite generation + processing pipeline for Godot games. Generate sprite sheets with Seedream, auto-process into Godot-ready assets (hframes, tr...
AI pixel art sprite generation + processing pipeline for Godot games. Generate sprite sheets with Seedream, auto-process into Godot-ready assets (hframes, tr...
muxueqingze
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 361
下载
💾 0
安装
1
版本
#latest

概述

🎮 Pixel Asset Pipeline

AI 生成像素游戏素材 → 自动处理为 Godot 可用格式。

Pipeline 概览

Prompt → AI生图(Seedream) → 去背景 → 切帧 → NEAREST缩放 → Godot sprite sheet + 单帧PNG

依赖

  • Python 3.8+ with Pillow (pip install Pillow)

Quick Start

# 1. 处理已有的大图
python scripts/process_sprite_sheet.py raw_sprite.png --output-dir ./out --target-size 48 --cols 4

# 2. 批量生成+处理
python scripts/batch_generate.py references/sample_config.json

支持的生成后端

后端脚本说明
------------------
Seedream (默认)lumi-work/脚本/生图/seedream_generate.py2048x2048,效果好
通义万相lumi-work/脚本/生图/wanx_generate.py备选
GeminiOpenClaw image_generate备选

输出格式

  • {name}_spritesheet.png — 横排 sprite sheet,Godot 设置 hframes=N 即可
  • frames/{name}_frame_00.png ~ _frame_XX.png — 单帧透明 PNG

Prompt 技巧

像素风 prompt 模板(英文效果最佳):

16-bit pixel art sprite sheet, [角色/物品描述], top-down RPG, [N] frames, white background, clean outline, no shading

示例:

  • 角色:16-bit pixel art sprite sheet, green slime monster, top-down RPG, 4 frames idle animation, white background
  • 物品:pixel art, silver sword with blue glow, 16x16 icon, white background, game asset
  • 瓦片:pixel art tileset, grass and dirt path, top-down RPG, seamless tiles, white background

关键后缀:加 white backgroundblack background 确保可去背景。

完整使用示例

  1. 用 Seedream 生成:

```bash

python lumi-work/脚本/生图/seedream_generate.py "16-bit pixel art sprite sheet, red dragon, 4 frames, white background" dragon_raw.png ""

```

  1. 处理为 Godot 素材:

```bash

python scripts/process_sprite_sheet.py dragon_raw.png --output-dir ./game_assets/dragon --target-size 64 --cols 4

```

  1. 在 Godot 中:Texture2D → Hframes = 4,搞定。

scripts/

  • process_sprite_sheet.py — 单图处理(去背景→切帧→缩放→输出)
  • batch_generate.py — 批量生成+处理(读JSON配置)

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 08:49 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,349 📥 317,689
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 666 📥 323,776
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,210 📥 266,136