关闭

OBJ材质文件MTL格式分析

标签: fileup
4786人阅读 评论(1) 收藏 举报
分类:

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;
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:322158次
    • 积分:3541
    • 等级:
    • 排名:第9689名
    • 原创:45篇
    • 转载:68篇
    • 译文:0篇
    • 评论:50条
    最新评论