1
導出模型時
three.js所版本創建額外的面孔在我的Three.js場景中它們究竟是如何出現在Blender中的。這是我可以將它們用作模型的輪廓邊框。例如,這裏是默認的立方體的線框模型是有當您啓動攪拌器:three.js所從攪拌機
這裏是JSON這種模式後,我出口它:
{
"uvs": [],
"name": "CubeGeometry.1",
"materials": [{
"wireframe": true,
"DbgName": "Material",
"depthWrite": true,
"transparent": false,
"depthTest": true,
"specularCoef": 50,
"colorAmbient": [0.64,0.64,0.64],
"opacity": 1,
"vertexColors": false,
"DbgIndex": 0,
"DbgColor": 15658734,
"shading": "phong",
"visible": true,
"colorEmissive": [0,0,0],
"blending": "NormalBlending",
"colorSpecular": [0.5,0.5,0.5]
}],
"faces": [35,0,1,2,3,0,0,1,2,3,35,4,7,6,5,0,4,5,6,7,35,0,4,5,1,0,0,4,7,1,35,1,5,6,2,0,1,7,6,2,35,2,6,7,3,0,2,6,5,3,35,4,0,3,7,0,4,0,3,5],
"vertices": [1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,-1,0.999999,1,1,-1,1,1,-1,1,-1],
"metadata": {
"uvs": 0,
"materials": 1,
"generator": "io_three",
"vertices": 8,
"faces": 6,
"normals": 8,
"type": "Geometry",
"version": 3,
"colors": 0
},
"normals": [0.577349,-0.577349,-0.577349,0.577349,-0.577349,0.577349,-0.577349,-0.577349,0.577349,-0.577349,-0.577349,-0.577349,0.577349,0.577349,-0.577349,-0.577349,0.577349,-0.577349,-0.577349,0.577349,0.577349,0.577349,0.577349,0.577349],
"colors": []
}
公告如何有6面。我希望它在我的Three.js場景中完全像這樣。然而,額外的面孔被繪製。這通常是因爲Three.js連接了Blender中沒有連接的頂點。下面是它的外觀後,我將其加載到我的場景:
見http://stackoverflow.com/questions/20153705/three-js-wireframe-material-all-polygons-vs-just-edges/20154589#20154589 – WestLangley
從這答案,我用** ** THREE.EdgesHelper像這樣: '變種EGH =新THREE.EdgesHelper(目,0x00ffff); egh.material.linewidth = 2; scene.add(EGH);' 這工作,所以請註明隨着你的答案,我會接受它=) –