作者分享了结合Tripo与Three.js构建3D游戏的Prompt及资产处理工作流,提供了控制成本与性能的具体方法。
如何以最低成本获得最大成果?以下是我用来构建这款游戏的提示词核心内容。这里的 Tripo 流程适用于任何需要 3D 资产的游戏。
"
我正在构建一款基于浏览器的 3D 游戏:[一句话创意,例如“玩家走在历史街道上,辨别真实与伪造的文物”]。技术栈:Three.js。AI 生成的 3D 资产预算:[N] 个 Tripo 积分。
按以下方式拆分资产:
- 仅对有机、不规则物体使用 Tripo:角色、动物、陶瓷器、灯笼、垂坠布料、装饰品。
- 所有几何体在代码中构建:建筑、墙壁、桌子、栏杆、架子、地面。
Tripo 流程:
1. 先生成概念图(图生图),然后从该图像生成 3D 模型(图生模)。
2. 每张参考图必须展示完整剪影,最好是侧面或四分之三侧面。Tripo 会自行补全它看不到的侧面。
3. 每个批次前,告诉我计划的任务和预估积分。绝不要超过我给出的批次上限。
4. 在 docs/tripo-log.md 中记录每项任务(ID、参数、花费积分)。将原始下载文件存储在仓库之外。
导入每个模型后:
- 制作远距离低多边形版本并按距离切换(LOD),这样重复对象如灯笼不会拖慢帧率。
- 转换为现实世界米制单位,并吸附到地面或桌面。禁止漂浮、下沉或穿插;检查布料与杆子及相邻物体的碰撞。
- 为每个 Tripo 模型编写代码备用方案,若 GLB 加载失败则自动加载。
- 添加 ?fps 标志以显示帧率,便于我们检查性能。
首先列出哪些资产交给 Tripo,哪些交给代码,并附上积分估算,等待我的批准后再进行任何消费。"
对于 Bianjing 项目,我使用 Tripo 生成了 33 个模型——全部成功——花费了约 1,970 积分(约 19.70 美元)。以下是我使用 Tripo 的一些心得: 1. Tripo 最适合什么? 有机、手工质感的物体:角色、驴子、陶瓷、香炉、鸱吻(传统屋脊装饰)、灯笼、六角宫灯以及垂挂的布料。任何形状复杂且表面不规则的物体,仅靠代码很难实现。 2. 先生成参考图像 最可靠的流程是先生成概念图像(图生图,约 25 积分),然后使用该概念图像生成 3D 模型(图生模,约 60 积分)。 3. 后处理以实现流畅的浏览器性能 • 分离远近模型:近距离使用高细节模型,远距离切换到低多边形版本。例如,远处宫灯的模型仅有 2,388 个面,因此整条街道排列灯笼也不会导致卡顿。 • 缩放与放置:将尺寸转换为米制,并直接吸附到桌子或地面上,以避免悬浮、下沉或穿插。仔细检查垂挂的布料,确保其不会穿插过柱子或相邻摊位。 • 基于代码的回退方案:为每个 Tripo 模型保留一个代码生成的备份。如果某个模型加载失败,会自动替换,确保场景中不会出现缺失。 4. 工作流与成本控制 • 为每批次设置积分上限:根据需求,我将每轮的上限设置在 150 到 900 积分之间,实际支出始终控制在预算之内。 • 记录一切,保持仓库整洁:在项目文档中记录每项任务的 ID、参数和积分成本。将原始文件单独存储在代码仓库之外,以便于追踪和复用。 • 为 Tripo 提供清晰的轮廓:Tripo 会填充照片中不可见的侧面。例如,当我仅提供汝窑笔洗的底部视图照片时,它将上半部分变成了球体——添加侧面视图后立即解决了这个问题。参考图像最好包含显示整体轮廓的侧面或四分之三侧面视图;一次性做对是节省积分的最佳方式。
原文
For the Bianjing project, I generated 33 models with Tripo—all succeeded—spending about 1,970 credits (~$19.70). Here’s a closer look at my takeaways from using Tripo: 1. What’s best suited for Tripo? Organic, handcrafted-looking objects: characters, donkeys, ceramics, incense burners, chiwen (traditional roof ridge ornaments), lanterns, hexagonal palace lanterns, and draped cloth. Anything with complex shapes and irregular surfaces is tough to pull off with code alone. 2. Generate reference images first The most reliable pipeline is generating a concept image first (image-to-image, ~25 credits), then using that concept image to generate the 3D model (image-to-model, ~60 credits). 3. Post-processing for smooth browser performance • Separate near and far models: Use high-detail models up close and swap to low-poly versions at a distance. For example, the distant version of the palace lantern is only 2,388 faces, so lining the whole street with lanterns won't cause lag. • Scale and placement: Convert dimensions to meters and snap them directly to tables or the ground to avoid floating, sinking, or clipping. Double-check draped cloth to make sure it doesn't clip through poles or neighboring stalls. • Code-based fallbacks: Keep a code-generated backup for every Tripo model. If a model fails to load, it swaps in automatically so nothing goes missing from the scene. 4. Workflow and cost control • Set a credit cap per batch: Depending on the need, I set a cap between 150 and 900 credits per round, and actual spending always stayed under budget. • Log everything, keep repos clean: Record each task's ID, parameters, and credit cost in the project docs. Store raw files separately outside the code repository for easy tracking and reuse. • Give Tripo a clear silhouette: Tripo fills in any side not visible in the photo. For instance, when I only gave it a bottom-view photo of a Ru ware brush washer, it turned the top half into a sphere—adding a side view fixed it immediately. Reference images should ideally include a side or three-quarter view that shows the overall silhouette; getting it right on the first try is the best way to save credits.
来源:WY · x.com