I've created a solid (not transparent) object in Blender and exported it using the three.js Blender plugin to obtain JSON data.
However, when I add it to my three.js project, there are transparent areas on the object that I can't seem to get rid of. I need the object to be completely solid.
I would greatly appreciate any assistance with this issue.
Below is the JavaScript code:
window.kristal_json = {
"metadata": {
"formatVersion": 3.1,
"generatedBy": "Blender 2.7 Exporter",
"vertices": 12,
"faces": 30,
"normals": 12,
"colors": 0,
"uvs": [10],
"materials": 1,
"morphTargets": 0,
"bones": 0
},
"scale": 1.000000,
"materials": [{
"DbgColor": 15658734,
"DbgIndex": 0,
"DbgName": "Mat",
"blending": "NormalBlending",
"colorAmbient": [0.1694117690535153, 0.3545098119156034, 0.6400000190734865],
"colorDiffuse": [0.1694117690535153, 0.3545098119156034, 0.6400000190734865],
"colorEmissive": [0.0, 0.0, 0.0],
"colorSpecular": [0.5, 0.5, 0.5],
"depthTest": true,
"depthWrite": true,
"shading": "Lambert",
"specularCoef": 255,
"transparency": 1.0,
"transparent": false,
"vertexColors": false
}],
// More JSON data...
};
// JavaScript function to initialize ThreeJS rendering
function initThreeJS() {
var div = $('#canvas-scene');
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera(75, div.width()/div.height(), 0.1, 1000);
// Additional setup and rendering logic...
render();
function render() {
requestAnimationFrame(render);
if (kristal) {
kristal.rotation.y += 0.01;
}
renderer.render(scene, camera);
}
}
initThreeJS();
P.S. Here is the JSBin link for the full code: http://jsbin.com/koxicuqavejo/1/