references to other collada files from within a collada file

I’ll clarify my subject line:

I mean a xml node within a collada file is referenced by it’s id from another collada file.

e.g.

<instance url=“geometry.dae#body”>

‘body’ is the id of an xml node within the geometry.dae file. The line above is within a ‘skeleton.dae’ file.

I have read that the schema/spec supports this, and both the max and maya plug-ins will write out URI’s like this if a file is xref’d (Max) or referenced (Maya). :slight_smile:

I want to clarify something with a question:

My question is what happens if the units are different in each file.
The units in the ‘geometry.dae’ are centimeters, but in the ‘skeleton.dae’ file the units are meters.

If I wanted to read the ‘body’ geometry correctly (which is inside the ‘geometry.dae’ file) should I transform it using the units from the ‘geometry.dae’ file?

I assume that I should, but I want to check to be sure.

I thought of another problem.

We have one scene (scene B) which references another scene (scene A).

We have already exported scene A. Let’s assume the xml node id is based on a part of the original scene (e.g. name of node), and to ensure xml node id’s are unique some had to be renamed.

We now export scene B. It references a node in scene A, which had to be renamed.

If we export scene B in isolation we have no idea that the node was renamed to make the collada file for scene A, and so we write out the reference assuming it wasn’t. Problem! The reference doesn’t work.

It seems this problem will appear in both the Maya and Max plug-ins (I can’t say about the others because I haven’t looked at them). So how should this problem be resolved? I understand that this problem is made easier or worse depending on the dcc tool. So should scene B be exported taking into account the contents of scene A so that references are correct?