从Blender导出的Gltf模型在Three.js中始终为黑色

时间:2019-01-25 09:53:31

标签: three.js blender gltf

我试图在Three.js项目中导入从Blender导出的gltf模型。问题在于,在Three.js中,所有模型材料均为黑色(颜色:颜色{r:1,g:1,b:1}),而网格最初是绿色的。 我找到这个话题 (http://www.html5gamedevs.com/topic/41196-object-always-exports-black-3dsmax-gltf-export/) 展示了如何解决3dsmax中的问题,如何解决搅拌器? 这是Three.js中的代码:

var loader= new THREE.GLTFLoader();
loader.load(
  'http://localhost/planegeometryeditor/meshes/map/firstterrain.gltf', 
  function(gltf) { scene.add(gltf.scene); },
  undefined, 
  function (error) { console.error(error); }
);

0 个答案:

没有答案