Results 1 to 3 of 3

Thread: matching joints to their bones from <animation>

  1. #1

    matching joints to their bones from <animation>

    The <animation> node specifies a number of things about the joint it is affecting, but I can't see where it has any info about which joint it is, or which bone that joint attaches to. Is there a quick way to get this information?

    We have the following code in the .dae. I can't imagine I would need to try to parse the word "joint2" out of one of these IDs.

    Code :
        <animation id="joint2.matrix">
          <source id="joint2.matrix_joint2_transform-input">
            <float_array id="joint2.matrix_joint2_transform-input-array" count="61">0 0.033333 0.066666 0.099999 and so on...</float_array>
              <accessor source="#joint2.matrix_joint2_transform-input-array" count="61" stride="1">
                <param name="TIME" type="float"/>
            <technique profile="MAYA">
          <source id="joint2.matrix_joint2_transform-output">
            <float_array id="joint2.matrix_joint2_transform-output-array" count="976">1 0 0 2.1978 and so on...</float_array>
              <accessor source="#joint2.matrix_joint2_transform-output-array" count="61" stride="16">
                <param name="TRANSFORM" type="float4x4"/>
          <source id="joint2.matrix_joint2_transform-interpolations">
            <Name_array id="joint2.matrix_joint2_transform-interpolations-array" count="61">LINEAR LINEAR LINEAR and so on...</Name_array>
              <accessor source="#joint2.matrix_joint2_transform-interpolations-array" count="61" stride="1">
                <param name="INTERPOLATION" type="Name"/>
          <sampler id="joint2.matrix_joint2_transform-sampler">
            <input semantic="INPUT" source="#joint2.matrix_joint2_transform-input"/>
            <input semantic="OUTPUT" source="#joint2.matrix_joint2_transform-output"/>
            <input semantic="INTERPOLATION" source="#joint2.matrix_joint2_transform-interpolations"/>
          <channel source="#joint2.matrix_joint2_transform-sampler" target="joint2/transform"/>

  2. #2
    Senior Member
    Join Date
    Jan 2006
    Foster City, CA
    I've never implemented Collada's skinning so I don't know the answer off the top of my head, but there's a skinning tutorial on the wiki that might help.

  3. #3
    Junior Member
    Join Date
    Dec 2007
    The last part of the animation is the "channel" tag. It has a "target" attribute, which is a "simple path" into the scene graph. You will note that the simple path specifies the node "joint2" and the sub-element "transform".

    If you go look at the node for "joint2" you will find a transform element, probably a "matrix" element, that is a child of joint2 and has the sid "transform".

    The joints and the nodes in the scene graph are the same thing -- bone names are names (really, ids) of nodes in the scene that gets instanced; at least that seems to hold true as far as I've been able to tell.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean