Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/apache-kafka/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Three.js 三js mtl文件基本资料_Three.js_Wavefront - Fatal编程技术网

Three.js 三js mtl文件基本资料

Three.js 三js mtl文件基本资料,three.js,wavefront,Three.js,Wavefront,我需要一个基本的材料在我的网格 我的MTL文件中有此材料: newmtl window Ns 0.000000 Ka 0.000000 0.000000 0.000000 Kd 0.888930 0.994660 0.000000 Ks 0.000000 0.000000 0.000000 Ni 1.000000 d 1.000000 illum 1 什么属性使材质成为三种基本材质?给定的MTL文件转换为 new THREE.MeshLambertMaterial( { color: new

我需要一个基本的材料在我的网格

我的MTL文件中有此材料:

newmtl window
Ns 0.000000
Ka 0.000000 0.000000 0.000000
Kd 0.888930 0.994660 0.000000
Ks 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 1

什么属性使材质成为三种基本材质?

给定的MTL文件转换为

new THREE.MeshLambertMaterial( { color: new THREE.Color( 0.888930, 0.994660, 0 ) } );

要使其成为phong材质,您需要指定镜面反射项、反光项等。我不太确定您的意思。当我将*.obj网格加载到场景时,它使用MTL库。来自MTL的材料始终作为PhongMaterial加载。我需要创建一种类似BasicMaterial的材质。我只能更新MTL文件,不能修改js代码。如果MTL中的材料始终作为PhongMaterial加载,那么在.MTL文件中,您无法执行任何操作来生成BasicMaterial。但您可以在加载对象后按名称搜索特定的PhongMaterial并将其更改为BasicMaterial。ObjmtLoader始终以MeshLambertMaterial.Clearification的形式加载材质。OBJLoader使用Phong材质,而不是所述的Lambert材质。请