three.js を学ぼうとしているので、次の個人的な課題はブレンダーからモデルをインポートすることでした。すべてうまくいきましたが、一部のテクスチャで問題が発生しています (デモ リンクを使用して確認してください)。
ここでホストされているデモがあります: https://googledrive.com/host/0BynsKHbZoT73elJpaUxqTlprVjQ/demos/3dworld/
js コンソールでマテリアルを調べることができます. game.models.tree も確認できます.
ブレンダーからエクスポートされた材料:
materials" : [ {
"DbgColor" : 15658734,
"DbgIndex" : 0,
"DbgName" : "Material",
"blending" : "NormalBlending",
"colorAmbient" : [0.699999988079071, 0.699999988079071, 0.699999988079071],
"colorDiffuse" : [0.699999988079071, 0.699999988079071, 0.699999988079071],
"colorSpecular" : [0.125, 0.10904927551746368, 0.08209432661533356],
"depthTest" : true,
"depthWrite" : true,
"mapLight" : "Tree_Bark_Tiled.png",
"mapLightWrap" : ["repeat", "repeat"],
"mapNormal" : "Tree_Bark_Nor2.png",
"mapNormalFactor" : -1.0,
"mapNormalWrap" : ["repeat", "repeat"],
"shading" : "Phong",
"specularCoef" : 15,
"transparency" : 1.0,
"transparent" : false,
"vertexColors" : false
},
{
"DbgColor" : 15597568,
"DbgIndex" : 1,
"DbgName" : "Material.001",
"blending" : "NormalBlending",
"colorAmbient" : [1.0, 1.0, 1.0],
"colorDiffuse" : [1.0, 1.0, 1.0],
"colorSpecular" : [0.0, 0.0, 0.0],
"depthTest" : true,
"depthWrite" : true,
"mapLight" : "Tree_Leaves.png",
"mapLightWrap" : ["repeat", "repeat"],
"mapNormal" : "Tree_Leaves_Nor.png",
"mapNormalFactor" : -1.0,
"mapNormalWrap" : ["repeat", "repeat"],
"shading" : "Phong",
"specularCoef" : 15,
"transparency" : 1.0,
"transparent" : true,
"vertexColors" : false
},
{
"DbgColor" : 60928,
"DbgIndex" : 2,
"DbgName" : "Material.001",
"blending" : "NormalBlending",
"colorAmbient" : [1.0, 1.0, 1.0],
"colorDiffuse" : [1.0, 1.0, 1.0],
"colorSpecular" : [0.0, 0.0, 0.0],
"depthTest" : true,
"depthWrite" : true,
"mapLight" : "Tree_Leaves.png",
"mapLightWrap" : ["repeat", "repeat"],
"mapNormal" : "Tree_Leaves_Nor.png",
"mapNormalFactor" : -1.0,
"mapNormalWrap" : ["repeat", "repeat"],
"shading" : "Phong",
"specularCoef" : 15,
"transparency" : 1.0,
"transparent" : true,
"vertexColors" : false
},
{
"DbgColor" : 238,
"DbgIndex" : 3,
"DbgName" : "Material",
"blending" : "NormalBlending",
"colorAmbient" : [0.699999988079071, 0.699999988079071, 0.699999988079071],
"colorDiffuse" : [0.699999988079071, 0.699999988079071, 0.699999988079071],
"colorSpecular" : [0.125, 0.10904927551746368, 0.08209432661533356],
"depthTest" : true,
"depthWrite" : true,
"mapLight" : "Tree_Bark_Tiled.png",
"mapLightWrap" : ["repeat", "repeat"],
"mapNormal" : "Tree_Bark_Nor2.png",
"mapNormalFactor" : -1.0,
"mapNormalWrap" : ["repeat", "repeat"],
"shading" : "Phong",
"specularCoef" : 15,
"transparency" : 1.0,
"transparent" : false,
"vertexColors" : false
}],
これは、ブレンダーでの 3 つの外観です。
ご覧のとおり、透明度が失われ、樹皮のテクスチャが正しくマッピングされていません。
誰かが私が間違っていることを説明してもらえますか?
ありがとう :)