有些做設計的網友問,得到的模型貼圖是 mat0_c.jpg 的,觀察是 PBR 材質貼圖
但是不知道哪個檔案用在哪個通道,這裡專門解答
1.首先這種貼圖一般是Marmoset解包得到的貼圖檔案
一般可以直覺的看出 _c 是漫反射(Albedo,BaseColor)貼圖,如:mat0_c.jpg
帶 _n 的是法線(Normals)貼圖,如:mat0_n.jpg
不過如果想要确切的知道,哪個貼圖檔案屬于哪個通道,就要把 scene.json 解壓出來
2.檢視 scene.json 配置的 Materials 材質段,以隻有的一個預設(Default)材質的場景為例
"materials":[
{
"name":"Default",
"albedoTex":"mat0_c.jpg",
"reflectivityTex":"mat0_r.jpg",
"normalTex":"mat0_n.jpg",
"glossTex":"mat0_g.jpg",
"extrasTex":"mat0_s.jpg",
"blend":"none",
"alphaTest":0,
"fresnel":[1,1,1],
"horizonOcclude":1,
"horizonSmoothing":0,
"aoSecondaryUV":false,
"tangentOrthogonalize":true,
"tangentNormalize":true,
"tangentGenerateBitangent":false,
"useSkin":false,
"emissiveIntensity":4.760000228881835938,
"emissiveSecondaryUV":false,
"aniso":false,
"microfiber":false,
"refraction":false,
"extrasTexCoordRanges":{"emissiveTex":{"scaleBias":[0.484375,0.96875,0.0078125,0.015625]},"aoTex":{"scaleBias":[0.484375,0.96875,0.5078125,0.015625]}}
}
]
可以看出帶 _r 的是反射(Reflectivity)材質貼圖,帶 _g 的是高光(Gloss)材質貼圖
還有附帶的材質 mat0_s.jpg 這是一個拼接起來的貼圖,而且一般隻使用其中一部分(估計是為了優化邊沿)
其描述在 extrasTexCoordRanges 那一行,分别是 自發光(Emissive)和 環境光遮罩(Ambient Occlusion,AO)貼圖
以及詳細的坐标,分别是 寬,高,左,頂,均是比例值,1 代表圖像尺寸的100%
3.關于 Noesis 讀取本地 mview 檔案崩潰
如果是數組越界,一般是由于打開的 mview 檔案帶有動畫,而 Python 腳本沒有對相關的檔案類型做處理
解決方法是編輯 \noesis\plugins\python\fmt_artstation_mview.py 腳本檔案
在 def extract(bs): 函數中的數組定義追加
files["animData/mset"] = []
files["keyframes/mset"] = []
即可,修改後的函數為
def extract(bs):
files = {}
files["image/derp"] = []
files["application/json"] = []
files["image/jpeg"] = []
files["image/png"] = []
files["model/mset"] = []
# add "animData/mset" and "keyframes/mset" by [email protected]
files["animData/mset"] = []
files["keyframes/mset"] = []
while not bs.checkEOF():
name = bs.readString()
ftype = bs.readString()
c = bs.readUInt()
d = bs.readUInt()
e = bs.readUInt()
bin = bs.readBytes(d)
if c & 1:
bin = decompress(bin, e)
files[ftype].append({ "filename": name, "data": bin })
return files
重新運作程式即可!