bind vs. bind_vertex_input in instance_material

I’ve been implementing a collada loader for our graphics engine for the past couple of months, using models from http://www.collada.org/owl/ as test samples. I came across something odd in the Seymour model and was wondering if anyone could shed some light on this (fyi Seymour is located here)

In particular, the controller is instantiated with the following:

<instance_controller url="#boyShape-lib-skin">
  <skeleton>#root</skeleton>
  <bind_material>
    <technique_common>
      <instance_material symbol="faceSG" target="#face">
        <bind semantic="UVSET0" target="#boyShape-lib-map1"/>
      </instance_material>
      <instance_material symbol="glassSG" target="#glass">
        <bind semantic="UVSET0" target="#boyShape-lib-map1"/>
     </instance_material>
      <instance_material symbol="shinnySG" target="#shinny">
        <bind semantic="UVSET0" target="#boyShape-lib-map1"/>
     </instance_material>
     <instance_material symbol="matteSG" target="#matte">
       <bind semantic="UVSET0" target="#boyShape-lib-map1"/>
     </instance_material>
    </technique_common>
  </bind_material>
</instance_controller>

Here, the <instance_material> elements are using <bind> elements to associate texture coodinates with particular samplers in the material. However, if I’ve read the spec correctly, <bind> is used for attaching uniform values to materials, not per-vertex values. According to the spec <bind_vertex_input> is used for attaching per-vertex values to a material semantic, and this is how I’ve seen other models bind texture coordinates to samples. So, am I reading the spec correctly? Or is this a valid use of the <bind> element?

Also, assuming this is correct, the target attribute of <bind> is of type xs:token and should be using target addressing syntax. So isn’t the # on the front incorrect?

You’re correct that it should be <bind_vertex_input> instead of <bind>. You’re also right that the # is incorrect; # is only for URIs and URI fragments.

I think the model is just old. It’s from July 27 2006, which is right around when the whole <bind>/<bind_vertex_input> thing was being clarified in the release notes. I think that both of the issues you raised are fixed in the latest version of ColladaMaya.

Now the tough part is figuring out if you need to support this old, broken data.