1

I am trying to render my Blender object in my threejs scene. This is my first attempt. The loader seems to be able to create the object but I cannot see the object anywhere in my scene. Can anyone provide me with some hints? This is is my Collada loader which is executed in my init function:

var loader = new THREE.ColladaLoader();
var localObject;
loader.options.convertUpAxis = true;
loader.load( 'models/texturecube_s.dae', function colladaReady( collada ) {
   localObject = collada.scene.getChildByName('Cube', true);
   localObject.doubleSided = true;
   localObject.scale.x = localObject.scale.y = localObject.scale.z = 1;
   localObject.position.x= 20;
   localObject.position.y= 50;

} );

scene.add(localObject);

All other objects (not exported from blender) render fine. Is there anything obviously wrong with this? I can host a demo up if it would help.

Thanks!

Nick
  • 19,198
  • 51
  • 185
  • 312
  • Did you point the camera in the right direction? – zmbq Jun 30 '13 at 21:17
  • Great question! I was just wondering what the relationship between the scene in blender and the scene in threejs is (if there is one)? What I mean does the camera and light settings in blender affect the object once imported to threejs scene or will the object be subject to my threejs scene? In my simulation I can rotate the camera around the y-axis as well as move it toward and away from my origin but I still don't see the imported object. – Nick Jun 30 '13 at 21:33
  • blender camera or lights have no effect on Three.js side. As to the actual problem, I would first check that textures are loaded correctly (firebug net panel is your friend), then maybe check the model scale it may be way off relative to your camera near/far, and if the model is not center origin, the scale may throw of the position too. You could also try setting your model material.side = THREE.DoubleSide; (by traversing the hierarchy) to make sure it's not getting culled. – yaku Jun 30 '13 at 23:14

0 Answers0