From 59cf9b36631d5c38575ddb93ff900d13a7114176 Mon Sep 17 00:00:00 2001 From: ud18010 Date: Thu, 16 Jul 2026 10:58:03 +0800 Subject: [PATCH] =?UTF-8?q?ModelTranslator:=20README=20=E8=A1=A5=E5=87=8F?= =?UTF-8?q?=E9=9D=A2/=E7=83=98=E7=84=99=E5=B7=A5=E5=85=B7=E7=94=A8?= =?UTF-8?q?=E6=B3=95=EF=BC=88well1500=20=E5=85=A8=E7=AE=A1=E7=BA=BF?= =?UTF-8?q?=E5=86=92=E7=83=9F=E9=80=9A=E8=BF=87=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 --- Tools/ModelTranslator/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Tools/ModelTranslator/README.md b/Tools/ModelTranslator/README.md index 91298b1a..115d5e2e 100644 --- a/Tools/ModelTranslator/README.md +++ b/Tools/ModelTranslator/README.md @@ -34,6 +34,21 @@ out/tong/ **把整个 `out/<模型名>/` 文件夹拷进 `Client/Assets/` 任意位置即可**,模型拖进场景直接生效。重复转换会复用已有 `.meta` 里的 GUID,不会破坏 Unity 引用。 +## 减面与高低模烘焙(可选前置工具) + +高面数模型先减面、再把细节烘到低模贴图,产物直接作为上面转换器的输入: + +```bash +cd Tools/ModelTranslator +python model_decimate.py src/well1500.fbx --tris 5000 # -> src/well1500_low.fbx +python model_bake.py src/well1500.fbx src/well1500_low.fbx # -> out_bake/well1500/ +python model_translator.py out_bake/well1500/well1500.fbx # -> out/well1500/(Unity 资源) +``` + +- **model_decimate.py**:多 mesh 自动 join;三角化后 Decimate(collapse) 减到 `--tris`(±3%,最多 2 轮修正);旧 UV 全删,Smart UV Project 重展;输出 `<名>_low.fbx`(`-o` 改目录) +- **model_bake.py**:Cycles selected-to-active 烘焙。normal(切线空间 OpenGL +Y)/ao 直接烘;color/metallic/roughness 把高模 Principled 对应输入接 Emission 烘 EMIT。`--size` 默认 2048,`--samples` AO 采样默认 64,射线距离默认低模包围盒对角线 2%(`--ray-distance` 覆盖);低模无 UV 会报错,高低模包围盒差超 10% 打警告 +- 输出命名 `<名>_color/normal/metallic/roughness/ao.png`,正好命中转换器的纯网格贴图命名约定 + ## 转换规则 - 贴图识别:沿材质 Principled BSDF 连线找 Base Color / Alpha / Normal / Metallic / Roughness;内嵌与外置贴图(FBX 旁的松散文件)均支持