AI 出图 Prompt 指南
用 AI 生成项目美术资源时的标准化 prompt 模板。直接复制粘贴即可使用。
通用风格前缀
每次生成任何资源时,都带上这段前缀以保证风格统一:
Dark pixel art style, 32x32 pixel tile, top-down view, low saturation, muted dark tones, clean pixel edges, no anti-aliasing, no blur, inspired by Stardew Valley and RimWorld, dark blue-black background palette (#0b1220), transparent background PNG一、地形 Tile
草地 Grass
Dark pixel art grass tile, 32x32 px, top-down view, multiple variants: light grass, dark grass, dry grass, grass edge transitions, seamless tileable, muted green tones (#7cba3d), transparent background, pixel perfect泥土 Dirt
Dark pixel art dirt tile, 32x32 px, top-down view, variants: light dirt, dark dirt, mud path, grass-dirt transition edge, seamless tileable, warm brown tones (#c9a66b), transparent background, pixel perfect石地 Stone
Dark pixel art stone tile, 32x32 px, top-down view, variants: natural stone, brick path, cracked stone, mossy stone, stone-grass transition, seamless tileable, grey-blue tones, transparent background, pixel perfect沙地 Sand
Dark pixel art sand tile, 32x32 px, top-down view, variants: dry sand, fine sand, wet beach sand, sand edge, sand-grass transition, seamless tileable, warm beige tones, transparent background, pixel perfect水域 Water
Dark pixel art water tile, 32x32 px, top-down view, 4-frame animation loop, calm lake surface, gentle wave ripple, deep blue tones (#5b9bd5), seamless tileable, transparent background, pixel perfect, frame sequence二、道路 Tile
Dark pixel art road tile, 32x32 px, top-down view, asphalt texture, variants: straight horizontal, straight vertical, corner, crossroad, T-junction, dead end, seamless tileable, dark grey tones, transparent background, pixel perfect三、建筑
住宅(64×64 px)
Dark pixel art house, 64x64 px, top-down perspective, wooden cabin style, warm light from windows, dark roof, pixel shadow below, low saturation, transparent background, pixel perfect, game asset商业建筑(96×96 px)
Dark pixel art cafe building, 96x96 px, top-down perspective, cozy storefront, awning, warm interior glow, dark exterior, pixel shadow below, low saturation, transparent background, pixel perfect, game asset公共建筑(96×96 px)
Dark pixel art hospital building, 96x96 px, top-down perspective, red cross sign, clean white walls with dark shadows, pixel shadow below, low saturation, transparent background, pixel perfect, game asset工业建筑(96×96 px)
Dark pixel art factory building, 96x96 px, top-down perspective, industrial style, smokestacks, dark metal walls, pixel shadow below, low saturation, transparent background, pixel perfect, game asset四、自然场景
树木 Tree
Dark pixel art tree, 32x48 px, top-down view, oak tree, lush canopy with dark green leaves (#7cba3d), brown trunk (#8b5a2b), pixel shadow below, transparent background, pixel perfect, game asset灌木 Bush
Dark pixel art bush, 32x32 px, top-down view, small green shrub, dark muted tones, pixel shadow, transparent background, pixel perfect, game asset花卉 Flower
Dark pixel art flowers, 32x32 px, top-down view, wildflower cluster, small colorful petals, dark muted tones, pixel shadow, transparent background, pixel perfect, game asset岩石 Rock
Dark pixel art rock, 32x32 px, top-down view, mossy boulder, grey stone with green moss, pixel shadow, transparent background, pixel perfect, game asset围栏 Fence
Dark pixel art wooden fence, 32x32 px, top-down view, horizontal planks, brown wood (#8b5a2b), pixel shadow, seamless tileable, transparent background, pixel perfect, game asset路灯 Lamp
Dark pixel art street lamp, 32x48 px, top-down view, warm glow light, iron post, pixel shadow, transparent background, pixel perfect, game asset五、NPC 角色精灵
通用模板
Dark pixel art NPC character sprite sheet, 32x48 px per frame, 4 directions (up/down/left/right), 8 frames per direction, idle animation, small town villager, simple clothing, dark muted color palette, clean pixel outline, transparent background, pixel perfect, sprite sheet layout: 4 rows x 8 columns指定职业示例
医生:
Dark pixel art NPC doctor character sprite sheet, 32x48 px per frame, 4 directions, 8 frames each, white coat, stethoscope, dark muted palette, clean pixel outline, transparent background, sprite sheet教师:
Dark pixel art NPC teacher character sprite sheet, 32x48 px per frame, 4 directions, 8 frames each, casual formal wear, glasses, book in hand, dark muted palette, clean pixel outline, transparent background, sprite sheet厨师:
Dark pixel art NPC chef character sprite sheet, 32x48 px per frame, 4 directions, 8 frames each, white chef hat, apron, dark muted palette, clean pixel outline, transparent background, sprite sheet警察:
Dark pixel art NPC police officer character sprite sheet, 32x48 px per frame, 4 directions, 8 frames each, dark uniform, badge, cap, dark muted palette, clean pixel outline, transparent background, sprite sheet六、交通工具
小汽车
Dark pixel art car, 64x32 px, side view, simple sedan, dark muted colors, pixel shadow below, transparent background, pixel perfect, game asset卡车
Dark pixel art truck, 96x32 px, side view, cargo truck, dark muted colors, pixel shadow below, transparent background, pixel perfect, game asset自行车
Dark pixel art bicycle, 32x32 px, side view, simple city bike, dark muted colors, pixel shadow below, transparent background, pixel perfect, game asset七、动态特效
降雨
Dark pixel art rain effect, 32x32 px, 8-frame animation loop, falling raindrops, transparent background, pixel perfect, frame sequence, alpha channel降雪
Dark pixel art snow effect, 32x32 px, 8-frame animation loop, falling snowflakes, white on transparent background, pixel perfect, frame sequence, alpha channel火焰
Dark pixel art fire effect, 32x32 px, 6-frame animation loop, campfire flame, orange-red tones, transparent background, pixel perfect, frame sequence, alpha channel烟雾
Dark pixel art smoke effect, 32x32 px, 8-frame animation loop, rising smoke puff, grey-white tones, transparent background, pixel perfect, frame sequence, alpha channel水面波纹
Dark pixel art water ripple effect, 32x32 px, 4-frame animation loop, gentle wave, blue tones (#5b9bd5), transparent background, pixel perfect, frame sequence, alpha channel八、UI 图标
功能图标
Dark pixel art UI icon set, 16x16 px each, game icons: heart (health), sword (attack), shield (defense), coin (money), star (experience), dark background compatible, clean pixel edges, transparent background, pixel perfect职业图标
Dark pixel art profession icon set, 16x16 px each, pixel icons: programmer (laptop), doctor (stethoscope), teacher (book), police (badge), worker (wrench), chef (hat), merchant (coin), artist (palette), dark background compatible, transparent background, pixel perfect状态图标
Dark pixel art emotion icon set, 16x16 px each, pixel icons: happy face, sad face, angry face, tired face, sleepy face, hungry face, love heart, working gear, chatting bubble, learning book, dark background compatible, transparent background, pixel perfectPrompt 技巧
| 技巧 | 说明 |
|---|---|
加 pixel perfect | 防止 AI 生成模糊的"伪像素" |
| 指定色值 | 如 #0b1220 背景、#7cba3d 草地,保持色调统一 |
| 指定尺寸 | 32x32 px 或 64x64 px,防止尺寸混乱 |
加 transparent background | 方便后续图集打包 |
加 sprite sheet | 角色动画直接出序列帧 |
加 game asset | 让 AI 理解这是游戏素材而非插画 |
加 top-down view | 统一俯视角 |
加 seamless tileable | 地形瓦片需要无缝拼接 |
Agnes API 集成
项目主要使用 Agnes Image 2.0 Flash 生成建筑精灵图。
API 调用示例
bash
curl https://apihub.agnes-ai.com/v1/images/generations \
-H "Authorization: Bearer $AGNES_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "agnes-image-2.0-flash",
"prompt": "Dark pixel art tavern building, 96x128 px, top-down perspective, medieval two-story, hanging sign, warm interior glow, stone ground floor, wooden upper floor, pixel shadow below, transparent background, pixel perfect, game asset, inspired by Stardew Valley, low saturation, muted dark tones",
"size": "1024x1024",
"extra_body": {
"response_format": "url"
}
}'生成后处理流程
Agnes API → 下载图片 → 裁剪目标尺寸 → 去背景 → 按类别存入文件夹 → TexturePacker 打图集 → 上传 R2Prompt 最佳实践
| 技巧 | 说明 |
|---|---|
pixel perfect | 防止模糊伪像素 |
transparent background | 方便叠加到地图 |
game asset | 让 AI 理解这是游戏素材而非插画 |
top-down perspective | 统一俯视角 |
pixel shadow below | 建筑底部有投影 |
| 指定色值 | 保持色调统一 |
| 指定尺寸 | 防止尺寸混乱 |
inspired by Stardew Valley | 锚定像素风参考 |
其他推荐工具
| 工具 | 适用场景 | 特点 |
|---|---|---|
| Agnes Image 2.0 Flash | 建筑/场景生成(首选) | 免费、速度快、像素风效果好 |
| Midjourney | 高质量概念图 | 加 --style raw 更可控 |
| Stable Diffusion + Pixel Art LoRA | 本地批量出图 | 可控性最强 |
📐 详细美术规范见 Design — Art Bible 📐 详细图集规范见 Design — TileSet Spec 📐 建筑精灵规范见 建筑精灵规范