ModelTranslator: support pure-mesh FBX via naming-convention texture discovery and auto material
This commit is contained in:
@@ -38,6 +38,7 @@ out/tong/
|
||||
|
||||
- 贴图识别:沿材质 Principled BSDF 连线找 Base Color / Alpha / Normal / Metallic / Roughness;内嵌与外置贴图(FBX 旁的松散文件)均支持
|
||||
- AO 按贴图名匹配(含 `ao`/`occlusion`/`ambient`):先找材质内引用的贴图;FBX 未引用时自动搜索 FBX 同目录的图片文件,多候选优先与颜色贴图同前缀(`xxx_color.png` → `xxx_ao.png`)
|
||||
- **纯网格 FBX**(无材质或材质无贴图,常见于烘焙工具导出):自动以模型名新建材质,并按命名约定从 FBX 同目录识别整套贴图——`<前缀>_<token>.png`,token 支持 `color/basecolor/albedo/diffuse`、`normal/nrm`、`metallic/metalness/metal`、`roughness/rough`、`ao/occlusion/ambient`、`alpha/opacity`;多套前缀时取与模型同名的一组
|
||||
- 基础贴图 A 通道自动判定:**透明贴图 > 颜色贴图自带 alpha > AO 贴图 > 填白(255)**;判定为透明时 `.mat` 自动勾选 `Alpha As Transparency`(AlphaTest 裁剪)
|
||||
- 无对应贴图的通道用 Principled 常量值填充(会在日志中标注 `(常量)`)
|
||||
- 目标尺寸 = min(2048, 源贴图最大边),所有贴图缩放到统一尺寸
|
||||
|
||||
Reference in New Issue
Block a user