<instance> element order

Is the position of the <instance> element under a <node> element important in relation to <translate>/<rotate>/<scale> elements?

For example:
A piece of a Collada file reads (attributes removed):


<node>
  <instance>
  <translate>
  <scale>

In this example instance comes before and so the matrix which defines the position, rotation and scale of doesn’t include the and which follow it.

To include the and it should be:

<node>
  <translate>
  <scale>
  <instance>

Is this correct or is the position of the <instance> element unimportant?

The specification isn’t clear about this, and the max and maya plugins differ in the position in which they put the <instance> element.

If the position of the <instance> element is important, it looks like the Max Collada script needs another fix. :x

Hi,

I believe if I interpret the specifications correctly, the order of the transforms matters, but the order of everything else under the <node> is irrelevant. That’s from page 3-9 of the 1.3 specification:

“The <node> element represents a context in which the child transform elements are composed in the order that they occur. All other child elements are affected equally by the accumulated transform in the scope of the <node> element”.

So, the <instance> may be at the beginning or at the end. In both cases, it will be affected fully by the transformation.

Sincerely,
Guillaume Laforte
Feeling Software Inc
http://www.feelingsoftware.com

Thanks. I agree with your interpretation.