一、 核心逻辑:为什么你的卡牌总是“图文混成一团”?
在AIGC游戏开发中,大多数开发者面临的痛点是:Midjourney画图虽然好看,但无法处理复杂的UI排版,文字全是乱码。而基于 Google Gemini 3 Pro 架构的 Nanobanana 平台,凭借其强大的逻辑推理和SOTA级文本 渲染能力,解决了这一问题。
要生成完美的卡牌,必须掌握 “容器-内容”分层提示法 (Container-Content Layering)。我们需要将提示词结构化,强制AI区分“物理边框(容器)”与“内部插画(内容)”。
以下我们将通过 7个不同风格的实战案例,展示如何利用 JSON 结构化提示词和自然语言指令,生成可直接使用的游戏资产。
二、 实战案例库:7大主流风格卡牌提示词
本章节提供的提示词均经过针对 Nanobanana 平台的逻辑优化。为了获得最佳效果,建议使用 Nano Banana Pro (Gemini 3 Pro) 模型。
1. 经典高奇幻生物卡 (High Fantasy Creature)
适用场景: 《炉石传说》、《万智牌》类TCG游戏
核心技术点: 利用材质区分(黄金与羊皮纸)防止图像融合;利用OCR能力精准生成标题。

Prompt (提示词模板):
Task: Create a high-quality fantasy trading card asset.
Layout:
* Frame: An ornate heavy gold filigree border with embedded ruby gemstones in the corners. Use an antique metal texture.
* Text Box: Below the illustration, a parchment paper texture box.
* Stats Icon: In the bottom right corner, a cracked stone shield icon displaying the number "10" in red.
Content (Illustration):
* Inside the frame, a dramatic oil painting of a "Frost Giant" wielding a massive ice club in a snowstorm.
* Style: Blizzard entertainment concept art, dynamic lighting, cinematic composition.
Typography:
* Inside the parchment box, strictly render the text "FROST GIANT" in a bold, black, medieval serif font. Ensure the text is legible and centered.
💡 设计解析:
Gemini 能够理解“位于...下方 (Below the illustration)”的空间逻辑,避免了传统AI将文字直接印在巨人脸上的错误。
2. 赛博朋克全息装备卡 (Cyberpunk HUD Item)
适用场景: 科幻RPG、未来战争题材
核心技术点: 半透明材质渲染、等宽数字字体 (Monospaced)、发光效果控制。

Prompt (提示词模板):
Context: Design a futuristic sci-fi trading card with a digital HUD interface style.
Structure:
* Border: A sleek, glowing cyan neon frame with hexagonal mesh patterns. Material should look like holographic glass projection.
* Subject: Center is a 3D render of a "Plasma Rifle" weapon floating in zero gravity. Matte black finish with glowing blue energy coils.
* UI Overlay: A semi-transparent dark blue tech-panel at the bottom.
Data:
* Render the text "PLASMA RIFLE" in a white, monospaced digital font (console style).
* Top left corner features a yellow warning triangle icon.
Aesthetic: High-tech, glitch art aesthetic, unreal engine 5 render, ray tracing.
💡 设计解析:
使用“Holographic glass(全息玻璃)”和“Monospaced font(等宽字体)”是关键。Gemini 对科幻UI的理解远超纯画图模型,能精准还原游戏界面的“悬浮感”。
3. JSON结构化生成的RPG道具卡 (Structured RPG Potion)
适用场景: 需要批量生成的RPG背包图标或卡牌
核心技术点: JSON参数化提示 (Parameterized Prompting)。这种格式对Gemini极其有效,能最大程度保证结构稳定。

Prompt (JSON格式):
{
"Task": "Design a complete digital asset for a RPG Item Card",
"Object_Definition": {
"Type": "Vertical Item Card",
"Background": "Solid Black (for masking)"
},
"Layout_Structure": {
"Border": "Silver metallic frame with celtic knots",
"Art_Window": "Arched window occupying top 70%",
"Text_Area": "Dark velvet panel at bottom"
},
"Content_Illustration": {
"Subject": "A potion bottle filled with glowing purple liquid",
"Effect": "Sparkles and smoke swirling inside the glass",
"Style": "Isometic 3D icon style, high gloss"
},
"Typography_Data": {
"Title_Text": "ELIXIR OF VOID",
"Title_Style": "Gold, Serif, Elegant",
"Stat_Badge": "Small circle in top-right with text 'LV.5'"
}
}
💡 设计解析:
通过JSON的大括号结构,强制模型分离“UI层”和“插画层”。这是目前生成复杂UI布局成功率最高的方法。
4. 暗黑风格塔罗牌 (Dark Art Nouveau Tarot)
适用场景: 叙事类游戏、占卜系统
核心技术点: Full-art(全画幅)控制、金箔质感模拟、内嵌边框。

Prompt (提示词模板):
Type: Generate a full-art Tarot card design titled "THE MOON".
Composition: The illustration covers the entire card surface. Add a delicate, thin silver line border inset 5mm from the edge (inset border).
Visuals: A mysterious wolf howling at a large pale moon, surrounded by twisted thorns.
Style: Alphonse Mucha mixed with H.R. Giger. Dark tones, intricate silver line work, flat colors, watercolor texture.
Text: At the bottom center, a decorative ribbon banner containing the text "THE MOON" in vintage capital letters.
Material: Simulate a silver foil print effect on textured black cardstock.
💡 设计解析:
关键词“Full-art”和“Inset border”告诉AI不要生成厚重的外框。Gemini 的文字渲染能力在此处可用于生成极具装饰性的标题。
5. 像素风复古角色卡 (Retro Pixel Art Card)
适用场景: 独立游戏、GBA风格怀旧游戏
核心技术点: 风格锁定、分辨率模拟。

Prompt (提示词模板):
Style: 16-bit pixel art style, SNES game asset.
Layout: A character profile card with a chunky grey stone border.
Character: A pixel art "Pixel Knight" with iron armor and a blue cape, standing in a dungeon.
UI Elements:
* Bottom text box with blue background.
* Text: "KNIGHT" in white pixelated font.
* HP Bar: A red bar icon on the left side of the frame.
Resolution: Keep details sharp and blocky, no anti-aliasing.
💡 设计解析:
虽然Gemini擅长高清,但只要指定“Pixelated font”和“16-bit”,它也能准确生成复古UI。注意要求“No anti-aliasing(无抗锯齿)”以保持像素边缘清晰。
6. 末世废土载具卡 (Post-Apocalyptic Vehicle)
适用场景: 废土生存、战车对战游戏
核心技术点: 变量注入法 (Variable Injection) —— 保持UI不变,仅替换主体。

Prompt (提示词模板):
Product View: A collectible trading card on a dirty metal table.
Card Frame: Rusted iron plates bolted together, industrial hazard stripes (yellow/black) on the edges.
Main Image: A modified muscle car with spikes and armor plating, driving through a desert dust storm. Mad Max style.
Data Layer:
* Top Label: Stenciled text "INTERCEPTOR" in white spray paint style.
* Stats: A gear icon in the bottom right corner with the number "88".
Consistency: Strong separation between the rusty frame and the painted illustration.
💡 设计解析:
此模板适合“量产”。在实际工作流中,你可以保持 Card Frame 描述不变,只修改 Main Image 中的车辆描述,从而生成整套风格统一的卡牌。
7. 极简UI技能图标卡 (Minimalist Modern Skill Card)
适用场景: 现代手游、扁平化UI设计
核心技术点: 矢量风格、留白利用、CSS代码辅助。

Prompt (提示词模板):
Design: A flat vector art skill card for a mobile game.
Shape: Rounded rectangle card with a soft shadow. Background color is solid pastel blue.
Icon: A simple white vector icon of a "Lightning Bolt" in the center.
Typography: Clean, Sans-Serif bold text "THUNDER" at the bottom center.
Detail: No texture, clean lines, flat colors, Dribbble UI style.
Instruction: Leave the top area empty for potential status icons.
💡 设计解析:
针对现代UI,使用“Flat Vector”、“No texture”去除AI默认的油画感。如果需要极度精确的布局,可配合Gemini的代码生成能力,让它直接写出覆盖在图上的CSS代码。
三、 高级工作流:从生成到落地的最后一步
1. 修正与微调 (Inpainting)
如果生成的卡牌文字“Dragon”拼成了“Draagon”,或者手指多了一根,千万不要重新生成。
利用 Nanobanana 的多轮对话功能:
- 指令: "Fix the typo in the title. Change 'Draagon' to 'Dragon'. Keep the font style exactly the same."
- Gemini 会理解并仅重绘文字区域,保持其他完美的画面不动。
2. 风格迁移 (Style Transfer)
Midjourney v6 依然是美术风格的王者。最佳工作流是:
- MJ生成风格图: 获取光影和配色参考。
- Nanobanana生成架构: 上传MJ图作为参考(Reference Image),配合上述 JSON 提示词,让 Gemini “用 MJ 的画风画出精准的 UI 布局”。
3. 后期处理
建议在提示词中始终加入 "Isolate on solid black background"。虽然 Gemini 3 Pro 目前还不能完美生成透明通道(Alpha Channel),但纯黑背景配合 Photoshop 的“滤色(Screen)”混合模式或魔棒工具,是提取复杂光效UI(如全息屏)的最佳方案。
结语:
通过 Nanobanana (Gemini 3 Pro) 的逻辑推理能力,我们将卡牌设计从“抽卡碰运气”转变为“可控的工程化生产”。熟练运用上述 JSON 模板和分层逻辑,您将能以 10 倍的速度构建高质量的游戏资产库。
(本教程基于 Gemini 3 Pro 模型特性编写,部分高级功能需在 Nanobanana Pro 版本中体验)