AI 出图 Prompt 指南
本指南提供了在使用 Agnes AI(或其他图像生成 AI)生成像素艺术素材时的 Prompt 编写策略和最佳实践,旨在帮助开发者获得符合项目美术总纲和精灵图规范的图像。
1. 核心 Prompt 结构
一个有效的 Prompt 应包含以下几个关键部分:
- 风格描述:明确指定像素艺术风格。
- 内容描述:详细描述要生成的物体或场景。
- 视角:指定透视角度。
- 尺寸:指定图像的像素尺寸。
- 颜色/光影:指导 AI 使用项目调色板和光影风格。
- 背景:明确要求透明背景。
- 质量/细节:强调像素完美和游戏资产属性。
通用风格前缀 (STYLE_PREFIX):
为了保持风格一致性,建议在所有 Prompt 前添加以下通用前缀:
Dark pixel art style, top-down perspective, low saturation, muted dark tones, clean pixel edges, no anti-aliasing, no blur, inspired by Stardew Valley, dark blue-black background palette (#0b1220), transparent background PNG, pixel perfect, game asset2. 针对不同素材类型的 Prompt 示例
2.1 建筑精灵 (Building Sprites)
目标尺寸:处理后通常为
64x96,96x128,128x128等。Prompt 示例:
- 住宅 (House):
${STYLE_PREFIX}, Cozy wooden cabin, 64x96 px, warm light from windows, thatched roof, small garden fence, flower box, pixel shadow below, warm brown wood tones (#8b5a2b), simple two-story village house - 酒馆 (Tavern):
${STYLE_PREFIX}, Rustic tavern, 96x128 px, two-story, wooden beams, large door, hanging lantern, barrel outside, warm amber glow from windows, pixel shadow below, medieval drinking establishment - 市场 (Market):
${STYLE_PREFIX}, Open air market stalls, 128x128 px, multiple vendor stalls with canvas awnings, crates and barrels, vegetables and goods displayed, pixel shadow below, village marketplace
- 住宅 (House):
2.2 地形瓦片 (Terrain Tiles)
目标尺寸:
32x32像素。Prompt 示例:
- 草地 (Grass Tile):
${STYLE_PREFIX}, Lush green grass tile, 32x32 px, top-down view, variants: light grass, dark grass, patchy grass, seamless tileable, vibrant green tones (#5a8a2d), transparent background, pixel perfect - 水域 (Water Tile):
${STYLE_PREFIX}, Calm lake water tile, 32x32 px, top-down view, 4-frame animation loop, gentle wave ripple, deep blue tones (#5b9bd5), seamless tileable, transparent background, pixel perfect, frame sequence
- 草地 (Grass Tile):
2.3 角色精灵 (Character Sprites)
目标尺寸:
32x48像素。Prompt 示例:
- 程序员 (Programmer):
${STYLE_PREFIX}, Male programmer character, 32x48 px, walking animation, 8 frames, facing south, wearing glasses and a hoodie, carrying a laptop bag, pixel shadow below, game asset - 商人 (Merchant):
${STYLE_PREFIX}, Female merchant character, 32x48 px, walking animation, 8 frames, facing east, wearing a long cloak and carrying a basket, pixel shadow below, game asset
- 程序员 (Programmer):
2.4 装饰物精灵 (Decoration Sprites)
目标尺寸:根据物体大小而定,例如树木
32x48,灌木32x32。Prompt 示例:
- 橡树 (Oak Tree):
${STYLE_PREFIX}, Large oak tree, 32x48 px, top-down view, lush canopy with dark green leaves (#7cba3d), thick brown trunk (#8b5a2b), pixel shadow below, transparent background, pixel perfect, game asset - 路灯 (Lamppost):
${STYLE_PREFIX}, Vintage lamppost, 16x48 px, top-down view, cast iron, warm glow from lantern, pixel shadow below, transparent background, pixel perfect, game asset
- 橡树 (Oak Tree):
3. Prompt 编写技巧
- 具体化:越具体的描述,AI 越能理解您的意图。例如,不要只说“房子”,要说“Cozy wooden cabin, warm light from windows, thatched roof”。
- 关键词:使用
pixel perfect,game asset,transparent background PNG,no anti-aliasing,no blur等关键词来强调像素艺术的特性。 - 负面 Prompt:如果 AI 经常生成不想要的内容,可以尝试使用负面 Prompt (Negative Prompt) 来排除,例如
blurry, realistic, 3d, smooth, cartoon。 - 迭代优化:AI 生成是一个迭代过程。从一个简单的 Prompt 开始,根据生成结果逐步添加或修改描述,直到满意为止。
- 尺寸指导:在 Prompt 中明确指定尺寸 (
64x96 px),可以帮助 AI 生成更接近目标比例的图像,减少后期处理的难度。
作者:Manus AI 日期:2026年7月10日