Blender导出为three.js。所有matirials都有相同的灰色

时间:2018-05-20 17:02:54

标签: three.js export blender

我正在玩一些开源3D模型,当我尝试将它们导出为three.js json格式时,所有材质都以相同的灰色输出。 How model looks like in blender(你可以看到所有材料都有不同的颜色)

How the result looks like

因此,在导出的json文件中,所有材质都具有相同的颜色:

[{
    ...
    "colorSpecular":[0.5,0.5,0.5],
    "colorDiffuse":[0.64,0.64,0.64],
    "colorEmissive":[0,0,0],
    ...
    "DbgName":"HullPlain.002"
},{
    ...
    "colorSpecular":[0.5,0.5,0.5],
    "colorDiffuse":[0.64,0.64,0.64],
    "colorEmissive":[0,0,0],
    ...
    "DbgName":"HullColor.002"
},...]

here my export settings 我尝试了不同的模型,我为所有模型获得了相同的材料设置"colorSpecular":[0.5,0.5,0.5], "colorDiffuse":[0.64,0.64,0.64],

有谁知道什么会导致这个问题?谢谢!

1 个答案:

答案 0 :(得分:2)

three.js JSON导出器does not support Cycles node materials,通常为that exporter is no longer recommended

我建议改用KhronosGroup/glTF-Blender-ExporterTHREE.GLTFLoader。它支持Cycles Render,但仅限于使用provided PBR nodes。要获得更简单的设置过程,请使用默认的Blender Render材质。快速转换(我不小心获得正确的颜色)显示这适用于您的模型:

screenshot of small space fighter GLB model

^请注意,您需要在导出前或导出设置中应用修改器。

three.js r92