3D模型-OBJ材质文件 MTL格式分析

OBJ文件不包含面的颜色定义信息,不过可以引用材质库,材质库信息储存在一个后缀是".mtl"的独立文件中。关键字"mtllib"即材质库的意思。 材质库中包含材质的漫射(diffuse),环境(ambient),光泽(specular)的RGB(红绿蓝)的定义值,以及反射(specularity),折射(refraction),透明度(transparency)等其它特征。  "usemtl"指定了材质之后,以后的面都是使用这一材质,直到遇到下一个"usemtl"来指定新的材质。

Ka  r g b
defines the ambient color of the material to be (r,g,b). The default is (0.2,0.2,0.2);
Kd  r g b
defines the diffuse color of the material to be (r,g,b). The default is (0.8,0.8,0.8);
Ks  r g b
defines the specular color of the material to be (r,g,b). This color shows up in highlights. The default is (1.0,1.0,1.0);
d  alpha
defines the transparency of the material to be alpha. The default is 1.0 (not transparent at all) Some formats use  Tr instead of  d;
Tr  alpha
defines the transparency of the material to be alpha. The default is 1.0 (not transparent at all). Some formats use  d instead of  Tr;
Ns  s
defines the shininess of the material to be s. The default is 0.0;
illum  n
denotes the illumination model used by the material.  illum = 1 indicates a flat material with no specular highlights, so the value of  Ks is not used.  illum = 2 denotes the presence of specular highlights, and so a specification for  Ks is required.
map_Ka  filename
names a file containing a texture map, which should just be an ASCII dump of RGB values;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值