ModelTranslator: README 补减面/烘焙工具用法(well1500 全管线冒烟通过)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
bd02cf711d
commit
59cf9b3663
@@ -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 旁的松散文件)均支持
|
||||
|
||||
Reference in New Issue
Block a user