1
votes

I'm quite new in Three.js, but the question is not trivial.

I have a Collada scene in DAE format, which in fact contains links to another DAE-files. It looks like this inside of this "parent" file:

<library_visual_scenes>
<visual_scene id="TheScene" name="TheScene">
  <node id="DesignTransform1" name="DesignTransform1" type="NODE">
    <matrix>0.87811053 0.46947187 0.0922935 19.499561 -0.46690002
  0.88294739 -0.04907337 98.835884 -0.10452887 0 0.99452192 0.28129196 
  0 0 0 1</matrix>
    <instance_node url="./first_dae/first_dae.dae"/>
  </node>
  <node id="DesignTransform2" name="DesignTransform2" type="NODE">
    <instance_node url="./second_dae/second_dae.dae"/>
  </node>
</visual_scene>
</library_visual_scenes>
<scene>
<instance_visual_scene url="#TheScene"/>
</scene>

This scene can be opened with desktop software without any problems. But when I try to load this Collada with Three.js Collada Loader it displays nothing. The same code works nice for ordinary Collada files, which do not have links to another DAE-files.

The loader looks like this:

var mesh;
var loader = new THREE.ColladaLoader();
loader.options.convertUpAxis = true;
loader.options.centerGeometry = true;
loader.load("parent_dae.dae", function (result) {
mesh = result.scene;
scene.add(mesh);
render();
});

The question is: "Does Three.js Collada Loader supports such DAE files, containing links to another DAE-files? If it does, what could be wrong with my code?"

1
does your file load in the three.js editor? threejs.org/editorgaitat
I tried to do the following:Sergio
1. Opened child DAE-files separately in three.js editor - they opened normally 2. Opened the parent object and left realtive links in parent DAE to the child DAEs - did not work 3. Saved child DAEs to a web-server and changed the links to absolute ones in the parent DAE - did not work The editor opens the scene and shows two "DesignTransform" childs with parent Scene. I can see the placeholders with transform arrows for each child, but there is nothing in themSergio
so then you might want to open an issue with three.jsgaitat

1 Answers

-1
votes

I've opened an issue with three.js and got the answer, that Three currently does not support such files. The question is closed.