Minimal 'container' format?

I was wondering if anyone can point me to where I might find out quickly:
What is the minimal Collada required to ‘contain’ another Collada file, plus translation, scale, and rotation? I need to construct a collection of various files into a ‘scene’ (I’ll do this programatically) then import to my modeller.

In X3D it would be:

<Transform translation=‘1 2 3’ scale=‘1 1 1’ rotation=‘0 1 0 0’>
<Inline url=’“some_other_file.x3d”’/>
</Transform>

In Collada…?

This is defined by the COLLADA schema. Simply validate your instance document, using any XML validating editor/parser, to see how close you are to your minimal goals.

Well I put something together which got no complaints from ‘coherencytest.exe’, but the ‘collada loader’ shows nothing at all, and trying to import to various programs which claim to load Collada load emptiness. Am I doing something wrong, or is such support lacking in just about all the tools?

Here, I try to load the external file ‘cyl.dae’. Seems I must have some knowledge of the contents to use the # anchors yes? Can’t simply include an entire DAE file ‘blindly’? Anyway, this won’t load as I’d hoped into anything I tried:


<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
  <asset>
    <created>2010-06-17T11:18:40</created>
    <modified>2010-06-17T11:18:40</modified>
    <up_axis>Y_UP</up_axis>
  </asset>
  <library_visual_scenes>
    <visual_scene id="VisualSceneNode" name="untitled">
      <node id="root" name="root">
        <scale>1 1 1</scale>
        <node id="mesh1" name="cylinder1">
          <instance_geometry url="cyl.dae#mesh1-geometry">
            <bind_material>
              <technique_common>
                <instance_material symbol="material0" target="cyl.dae#material0">
                  <bind_vertex_input semantic="tex0" input_semantic="TEX_COORD" input_set="0" />
                </instance_material>
              </technique_common>
            </bind_material>
          </instance_geometry>
        </node>
      </node>
    </visual_scene>
  </library_visual_scenes>
  <scene>
    <instance_visual_scene url="#VisualSceneNode" />
  </scene>
</COLLADA>

Looks okay to me. I agree that handling of external references (other then images), and asset management in general, is often lacking in tools. Providing the capabilities in the schema is a way to encourage support in this area (like you are doing :slight_smile: .

As with any document type, yes.

You can if it’s unambiguous or you use a heuristic. The semantic of the URI is derived from its context such that an <instance_geometry url=“geom.dae” /> could resolve to the one and only (or first) <geometry> in that document.