关于 image-3d
image-3d 是 Starchild 的技能,可根据文本或参考图生成 3D 风格的二维图像,适用于角色、产品、场景及建筑可视化等创作;它不生成 3D 模型文件。
主要功能
- 01文本生成图像及参考图风格化
- 02角色、产品和微缩场景预设
- 03图标、文字、室内与建筑风格
- 04游戏资产和 3D 场景类别
- 05可调模型、图像数量和宽高比
适用场景
- 01制作风格化角色或游戏资产图
- 02生成等距视角微缩场景
- 03可视化产品、房间或建筑
- 04将参考图转换为 3D 风格图像
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ starchild-ai-agent/ official-skills --skill image-3d安装后在 Claude Code 中输入/image-3d确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
_cost_track.pyexports.pygenerate_3d.py详细介绍
image-3d
对于 Starchild 上的所有 3D 风格图像生成请求,请使用此技能。
涵盖:3D 角色设计(Q 版、写实、卡通、奇幻)、3D 产品渲染(悬浮、爆炸视图、转台展示)、等距视角微缩模型与场景、3D 应用图标(iOS、Material、游戏)、3D 文字效果(铬、霓虹、木质、糖果)、室内设计可视化(现代、奢华、舒适、工业风)、建筑渲染(现代、传统、未来风、航拍、夜景)、3D 场景(奇幻、科幻、自然、都市)以及游戏资产渲染(武器、环境、道具、载具)。
**核心原则:**调用提供的脚本。不要重新实现代理/计费相关逻辑。
⚠️ 重要区别 — 3D 风格图像与 3D 模型文件:
- 此技能生成3D 风格的 2D 图像(PNG/JPG)——看起来像 3D 的渲染图片
- 此技能不会生成 3D 模型文件(.glb、.obj、.fbx、.usdz)
- 如需实际的 3D 模型文件,用户需要使用专门的 3D 建模服务(如 Meshy 等)
何时使用 image-3d 或其他图像技能:
- image-3d → 用户想要 3D 渲染效果:3D 角色、等距视角场景、3D 图标、建筑渲染、室内设计渲染、3D 文字效果
- image-create → 用户想要一般创意图像(徽标、海报、插画、表情包)——image-create 有基础的
3d类别,但 image-3d 提供更精细的控制 - image-ecommerce → 用户想要用于电商商品列表的产品照片(白色背景、生活方式照片)
- image-edit → 用户想要编辑/转换现有图像
- image-portrait → 用户想要保留面部/身份特征的肖像
1. 快速开始 — 文本生成 3D 图像(最常见)
⚠️ 执行环境 — 请先阅读此内容。 下面的代码块是 Python,不是 shell 命令。Starchild 的
bash工具 运行/bin/bash -c,无法解析exec(open(...))—— 直接将这些代码粘贴到 bash 命令中 会报错syntax error near unexpected token 'open'。 此外,在python3 -c中使用exec(open(...))会报错NameError: __file__因为脚本使用__file__解析路径。通过 bash 工具调用时,请使用
python3 - <<'EOF'和from exports import:python3 - <<'EOF' import sys sys.path.insert(0, "skills/image-3d") from exports import generate_3d result = generate_3d( prompt="a cute robot assistant with big eyes and antenna", category="character", style="chibi", ) print(result) EOFHereDoc(
<<'EOF')会保留所有引号和换行,无需转义。
exec(open('skills/image-3d/generate_3d.py').read())
result = generate_3d(
prompt="a cute robot assistant with big eyes and antenna",
category="character",
style="chibi",
)
# result -> {"success": True, "images": [{"local_path": "output/images/..."}], ...}
2. 快速开始 — 仅指定类别和风格(不使用自定义提示词)
exec(open('skills/image-3d/generate_3d.py').read())
result = generate_3d(
category="diorama",
style="isometric",
)
# Uses the built-in style template as the full prompt
3. 快速开始 — 参考图像 → 3D 风格
exec(open('skills/image-3d/generate_3d.py').read())
result = generate_3d(
prompt="transform into a 3D rendered character",
reference_path="uploads/sketch.jpg",
category="character",
style="cartoon",
)
向用户交付结果 — 重要
切勿将原始 fal.media URL 交给用户。 fal 提供的文件带有限制性 CSP 标头。唯一可靠的交付方式是使用已下载到本地的文件:
- 使用每张图像的
local_path(例如output/images/xxx.png)——脚本成功后总会下载文件。 - 告知用户文件已保存至
output/images/,可在工作区文件面板中查看。 - 在 Web 渠道中内嵌图像,方便用户在聊天中预览:
 - 在 Telegram / WeChat 中:通过
send_to_telegram(file_path="output/images/...", message_type="image")或send_to_wechat(file_path="output/images/...", message_type="image")发送。
4. 参数
| 参数 | 必填 | 默认值 | 描述 |
|---|---|---|---|
prompt | 是* | — | 对所需 3D 图像的文字描述 |
reference_path | 否 | — | 参考图像的本地文件路径(用于 3D 风格化) |
reference_url | 否 | — | 参考图像的公开 HTTPS URL |
category | 否 | "character" | 3D 类别预设(参见 §5) |
style | 否 | "default" | 类别中的子风格(参见 §5) |
model | 否 | "nanopro" | 模型:"nanopro"(快速,约 25 秒)或 "gpt"(质量最佳,约 150 秒) |
count | 否 | 1 | 要生成的图像数量(1–4) |
aspect_ratio | 否 | auto | 输出宽高比:1:1、3:4、4:3、9:16、16:9。若未设置,则根据类别自动选择。 |
*在文生图模式下必须提供 prompt,除非指定了非默认 style(它会提供内置模板)。
提示词优先级: prompt + category/style(增强)> 仅 prompt > category + style 模板 > category 默认值。
宽高比自动选择: 未明确设置时,脚本会为该类别选择最佳宽高比:
- 人物采用
3:4(纵向) - 产品、微缩场景、图标、游戏素材采用
1:1(方形展示) - 文字、室内场景、建筑、场景采用
16:9(宽幅电影比例)
5. 类别和风格预设
N:3D 人物(category="character")
| 风格 | 键 | 最适合 |
|---|---|---|
| Q 版 / Pixar 风格 | chibi | 可爱风格化人物、吉祥物、头像 |
| 写实 | realistic | 可用于游戏的人物、精细的人体结构 |
| 卡通 | cartoon | Disney/Pixar 风格、适合全家观看 |
| 奇幻 | fantasy | RPG 人物、战士、法师 |
| 通用 | default | 任意 3D 人物 |
人物提示词技巧:
- 描述姿势、服装、表情和配饰
- 为人物设定图指定“白色背景”或“干净的背景”
- 对于游戏人物,提及“T 姿势”或“动作姿势”
- 示例:
"a female elf ranger with green cloak, holding a bow, forest background"
N:3D 产品渲染(category="product")
| 风格 | 键 | 最适合 |
|---|---|---|
| 悬浮 3/4 角度 | floating | 主打产品图、营销素材 |
| 爆炸视图 | exploded | 技术插图、内部结构 |
| 转台 / 360° | turntable | 多角度展示 |
| 通用 | default | 任意产品渲染 |
产品提示词技巧:
- 描述材质(哑光、光亮、金属、木质、玻璃)
- 指定光照(影棚、戏剧化、柔和、轮廓光)
- 提及产品类型和主要特征
- 示例:
"wireless earbuds in charging case, matte white, floating angle"
N:3D 微缩场景 / 等距视角(category="diorama")
| 风格 | 键 | 最适合 |
|---|---|---|
| 等距视角 | isometric | 微型世界、城市街区、游戏地图 |
| 低多边形 | lowpoly | 风格化场景、独立游戏美学 |
| 写实 | realistic | 建筑模型、精细微缩模型 |
| 通用 | default | 任意微缩场景 |
微缩场景提示词技巧:
- 描述场景内容(建筑、树木、人物、车辆)
- 提及尺度(“微缩”“微小”“娃娃屋”)
- 指定氛围(温暖、舒适、戏剧化、奇幻)
- 示例:
"a cozy Japanese ramen shop at night, tiny customers inside, warm glow"
N:3D 图标(category="icon")
| 风格 | 键 | 最适合 |
|---|---|---|
| iOS 风格 | ios | Apple App Store 图标、光亮玻璃质感 |
| Material Design | material | Google Play 图标、扁平而有纵深 |
| 游戏图标 | game | RPG 物品、奇幻游戏 UI |
| 通用 | default | 任意 3D 图标 |
图标提示词技巧:
- 简洁描述图标主题(一个主要元素)
- 指定形状背景(“圆角方形”“圆形”)
- 保持简洁——图标在小尺寸下也应清晰易辨
- 示例:
"a camera icon with rainbow lens flare"
N:3D 文字(category="text")
| 风格 | 键 | 最适合 |
|---|---|---|
| 镀铬 / 金属质感 | chrome | 醒目标题、电影风格文字 |
| 霓虹光效 | neon | 赛博朋克、夜生活、标牌 |
| 木质 | wood | 乡村风格、手工艺、自然风格品牌 |
| 糖果风 | candy | 活泼风格、儿童主题、甜美主题 |
| 通用 | default | 任意 3D 文字效果 |
文字提示词技巧:
- ⚠️ AI 文字渲染不可靠——文字要简短(最多 1-3 个词)
- 用引号描述文字内容:
"the word 'HELLO'" - 指定材质和环境
- 示例:
"the word 'GAME OVER' in chrome metallic letters, dark background"
L:室内设计(category="interior")
| 风格 | 键 | 最适合 |
|---|---|---|
| 现代极简 | modern | 斯堪的纳维亚风格、简洁线条、自然光 |
| 奢华 | luxury | 高端风格、大理石、金色点缀 |
| 舒适 / Hygge | cozy | 温暖、舒适、宜人 |
| 工业风 | industrial | 阁楼、裸露砖墙、都市时尚 |
| 通用 | default | 任意室内效果图 |
室内提示词技巧:
- 描述房间类型(客厅、卧室、厨房、浴室、办公室)
- 提及主要家具和材质
- 指定光线(自然日光、温暖的傍晚光线、戏剧性光线)
- 如有需要,指定配色方案
- 示例:
"modern Scandinavian living room with large windows, light wood floors, gray sofa, indoor plants"
L:建筑(category="architecture")
| 风格 | 键 | 最适合 |
|---|---|---|
| 现代 | modern | 当代建筑、玻璃与钢材 |
| 传统 | traditional | 古典风格、历史遗产、石材与木材 |
| 未来主义 | futuristic | 科幻、有机形态、绿色科技 |
| 鸟瞰图 | aerial | 鸟瞰视角、总平面规划、场地环境 |
| 夜景 | night | 戏剧性光线、立面向上照明 |
| 通用 | default | 任意建筑效果图 |
建筑提示词技巧:
- 描述建筑类型(住宅、办公室、塔楼、博物馆、学校)
- 提及材质(混凝土、玻璃、钢材、木材、石材、砖)
- 指定环境(城市、郊区、山坡、滨水地带)
- 提及用于表现光线的时间(黄金时刻、正午、黄昏、夜晚)
- 示例:
"modern three-story house with flat roof, large glass windows, surrounded by garden, golden hour"
N:3D 场景(category="scene")
| 风格 | 键 | 最适合 |
|---|---|---|
| 奇幻 | fantasy | 魔法世界、浮空岛 |
| 科幻 | scifi | 空间站、未来科技 |
| 自然 | nature | 森林、风景、自然之美 |
| 都市 | urban | 城市街道、赛博朋克、霓虹 |
| 通用 | default | 任意 3D 场景 |
N:游戏资产(category="game_asset")
| 风格 | 键 | 最适合 |
|---|---|---|
| 武器 | weapon | 剑、枪、魔法武器 |
| 环境 | environment | 游戏关卡、世界设计 |
| 道具 | prop | 物品、对象、收藏品 |
| 载具 | vehicle | 汽车、船只、飞机 |
| 通用 | default | 任意游戏资产 |
6. 3D 渲染关键词指南
编写自定义提示词时,使用以下关键词来控制 3D 效果:
材质
| 关键词 | 效果 |
|---|---|
PBR materials | 基于物理的渲染、逼真的表面 |
subsurface scattering | 半透明的皮肤、蜡、大理石 |
metallic / chrome | 反光金属表面 |
glossy / matte | 控制表面光洁度 |
glass / transparent | 透明材质 |
clay render | 哑光灰色、无纹理、突出形状 |
光照
| 关键词 | 效果 |
|---|---|
studio lighting | 干净、专业、可控 |
HDRI lighting | 基于环境的光照、自然反射 |
rim light | 边缘高光、主体分离 |
volumetric lighting | 耶稣光、氛围纵深 |
ambient occlusion | 柔和的接触阴影、深度 |
global illumination | 逼真的光线反弹 |
摄像机 / 构图
| 关键词 | 效果 |
|---|---|
isometric view | 45° 俯视,无透视变形 |
3/4 angle | 经典的产品 / 角色展示角度 |
eye level | 自然的人眼视角 |
bird's eye view | 鸟瞰视角 |
tilt-shift | 微缩模型 / 立体模型效果 |
depth of field | 背景虚化,突出主体 |
渲染引擎风格
| 关键词 | 效果 |
|---|---|
octane render | 高品质、照片级真实感 |
Blender Cycles | 逼真的路径追踪 |
Unreal Engine 5 | 游戏品质、实时渲染效果 |
V-Ray | 建筑可视化品质 |
Cinema 4D | 简洁、风格化的 3D 效果 |
KeyShot | 产品可视化品质 |
7. 模型选择指南
| 模型 | 键 | 速度 | 质量 | 最适合 |
|---|---|---|---|---|
| Nano Banana Pro | nanopro | ~25s | 良好 | 快速迭代、草稿、大多数 3D 风格 |
| GPT Image 2 | gpt | ~150s | 最佳 | 最终渲染、复杂场景、精细细节 |
分类建议:
- 角色 → 用
nanopro制作草稿,用gpt制作最终角色设定图 - 产品 → 用
gpt制作照片级真实感渲染,用nanopro快速构思 - 立体模型 →
nanopro很擅长等距视图;用gpt制作精细的微缩模型 - 图标 → 对大多数图标来说,
nanopro已足够 - 文字 → 用
gpt获得更好的文字渲染效果(仍不完美) - 室内 / 建筑 → 用
gpt制作照片级真实感的建筑可视化,用nanopro构思方案 - 场景 → 用
gpt获得电影级品质,用nanopro快速制作情绪板
8. 宽高比指南
| 类别 | 默认值 | 推荐替代方案 |
|---|---|---|
| character | 3:4 | 头像用 1:1,全身像用 9:16 |
| product | 1:1 | 横向展示用 4:3 |
| diorama | 1:1 | 全景立体模型用 16:9 |
| icon | 1:1 | 始终使用 1:1 |
| text | 16:9 | 方形横幅用 1:1 |
| interior | 16:9 | 房间视图用 4:3,竖幅用 3:4 |
| architecture | 16:9 | 高楼用 3:4,鸟瞰图用 1:1 |
| scene | 16:9 | 竖版场景用 9:16 |
| game_asset | 1:1 | 角色资产用 3:4 |
9. 意图识别指南
将用户请求映射到合适的类别和风格:
| 用户说…… | 类别 | 风格 | 备注 |
|---|---|---|---|
| “3D character”、“Pixar style character” | character | chibi 或 cartoon | |
| “game character”、“RPG hero” | character | fantasy | |
| “realistic 3D person” | character | realistic | |
| “3D product render”、“product visualization” | product | floating | |
| “exploded view”、“internal structure” | product | exploded | |
| “isometric”、“miniature scene”、“tiny world” | diorama | isometric | |
| “low poly scene”、“stylized environment” | diorama | lowpoly | |
| “app icon”、“iOS icon” | icon | ios | |
| “game icon”、“RPG item icon” | icon | game | |
| “3D text”、“chrome text”、“metallic letters” | text | chrome | |
| “neon sign”、“glowing text” | text | neon | |
| “interior design”、“room design”、“装修效果图” | interior | modern | |
| “luxury interior”、“penthouse” | interior | luxury | |
| “cozy room”、“warm interior” | interior | cozy | |
| “building render”、“architecture visualization” | architecture | modern | |
| “night render”、“building at night” | architecture | night | |
| “aerial view”、“masterplan” | architecture | aerial | |
| “fantasy world”、“magical scene” | scene | fantasy | |
| “sci-fi scene”、“space station” | scene | scifi | |
| “game weapon”、“sword render” | game_asset | weapon | |
| “game environment”、“level design” | game_asset | environment |
10. 错误处理
| 错误 | 原因 | 修复方法 |
|---|---|---|
"Unknown model" | 模型键无效 | 使用 "nanopro" 或 "gpt" |
"Unknown category" | 类别无效 | 查看 §5,了解有效类别 |
"Unknown style" | 样式不属于该类别 | 查看该类别的样式表 |
"File not found" | reference_path 不存在 | 确认文件路径 |
"Image too large" | 参考图像超过 10 MB | 调整图像大小或压缩图像 |
"Submit failed" | API 错误 | 检查 FAL_KEY,然后重试 |
"Generation timed out" | 模型耗时过长 | 重试,或切换到 nanopro |
11. 高级示例
3D 角色设定图(多个角度)
exec(open('skills/image-3d/generate_3d.py').read())
result = generate_3d(
prompt="a steampunk inventor character with goggles, leather apron, and mechanical arm, character sheet showing front and side views",
category="character",
style="realistic",
model="gpt",
aspect_ratio="16:9",
)
等距视角城市街区
exec(open('skills/image-3d/generate_3d.py').read())
result = generate_3d(
prompt="a bustling Tokyo street corner with ramen shop, vending machines, and cherry blossom trees, tiny people walking",
category="diorama",
style="isometric",
)
建筑夜景渲染图
exec(open('skills/image-3d/generate_3d.py').read())
result = generate_3d(
prompt="a modern art museum with curved glass facade, reflecting pool in front, dramatic uplighting",
category="architecture",
style="night",
model="gpt",
)
室内设计 — 现代客厅
exec(open('skills/image-3d/generate_3d.py').read())
result = generate_3d(
prompt="spacious living room with floor-to-ceiling windows overlooking city skyline, minimalist furniture, warm wood accents, indoor plants",
category="interior",
style="modern",
model="gpt",
)
参考图像 → 3D 风格
exec(open('skills/image-3d/generate_3d.py').read())
result = generate_3d(
prompt="transform into a 3D Pixar-style character with exaggerated features",
reference_path="uploads/photo.jpg",
category="character",
style="cartoon",
)
3D 游戏武器
exec(open('skills/image-3d/generate_3d.py').read())
result = generate_3d(
prompt="legendary fire sword with glowing runes, ember particles, dark background",
category="game_asset",
style="weapon",
)
3D 霓虹文字
exec(open('skills/image-3d/generate_3d.py').read())
result = generate_3d(
prompt="the word 'CYBER' in neon pink and blue letters, wet street reflection",
category="text",
style="neon",
)
多张图像对比
exec(open('skills/image-3d/generate_3d.py').read())
result = generate_3d(
prompt="a cozy coffee shop interior with exposed brick and warm lighting",
category="interior",
style="cozy",
count=3,
model="nanopro",
)
# Generates 3 variations for the user to choose from