KhronosGroup / OpenCOLLADA

654 stars 252 forks source link

How to handle an <instance_controller> without a <skeleton> entry ? #207

Closed gaiaclary closed 8 years ago

gaiaclary commented 11 years ago

The Collada specification explains that an instance_controller can have skeleton entries to define which subset of a joint hierarchy shall be searched to find the joints, like:

<node>
  <instance_controller url="#skin">
    <skeleton>#root</skeleton>
    <bind_material> ... </bind_material>
  </instance_controller>
</node>

But it does not tell what to do when the <skeleton> entry is omited. For example the FBX COLLADA exporter omits the skeleton:

<node>
  <instance_controller url="#skin">
     <bind_material> ... </bind_material>
  </instance_controller>
</node>

When i parse such Collada code with the OpenCollada framework, then i get Sax FWL Error: Could not resolve sid ... for every joint in the Joint hierarchy and the Object is not skinned.

However Maya-2013 can read the collada files correctly with its native Collada Importer.

Here is the original bug report about this from the Blender bug tracker:

https://projects.blender.org/tracker/index.php?func=detail&aid=36325&group_id=9&atid=498

In the attachments section you find the reference collada file which shows this particular problem.

So is this a bug in OpenCollada, or a missing feature ? Or is it a violation of the Collada specification by the FBX Collada exporter ?

gaiaclary commented 11 years ago

Hi; I believe i have found a fix for this issue. see my pull request https://github.com/KhronosGroup/OpenCOLLADA/pull/209

thanks, Gaia

RemiArnaud commented 8 years ago

PR was merged