<instance_controller> in non root node?

I have implemented a collada viewer with animation, skinning, and pretty much everything else. And it is working. But I don’t know what to do about controllers instanced in nodes that are not the root node. Suppose we have a scene that looks like

<node id="root">
    <node id="Bone01">
        <node id="Bone02">
        <node id="Bone03">
            <instance_controller url="#skin">

The controller is instanced under Bone03, which is a child of Bone01.
And the controller has joint nodes of Bone01,Bone02,Bone03.
The question is, what should I do about Bone01 transform? Should the geometries under the controller be influenced by the matrix of Bone01? This seems unlikely because bone matrices are made from Bone01,Bone02,Bone03 which are already influenced by the matrix of Bone01. So applying the Bone01 matrix to the controller makes the bone matrices multiplied by the Bone01 matrix twice. On the other hand, if we ignore the Bone01 matrix then there will be no point in having controllers instanced in node hierarchy. There will be no difference between the controller instanced in the root node or in Bone01. And it doesn’t seem to work. What should I do?


We have debated this very point about 3 weeks ago.
The “correct” way to handle this situation is to do no special handling at all. Do the skinning operation (which takes into account Bone1 matrix) and then draw the result in the scene graph (which also does the Bone1 matrix).

Now that may not be your desired result but that is what the data shows.

To avoid this you have to move the <instance_controller> element out of the skeleton hierarchy. In your example putting into the “root” node would work. Then post a bug against whatever tool is giving you this data to have them fix it. But until that export is fixed you will need to modify all the documents yourself to get your desired results.