Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: How would I load a collada file's skinning information?

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2017
    Posts
    9

    How would I load a collada file's skinning information?

    I am trying to implement a COLLADA file loader to render in opengl.

    Currently, I can load the basic mesh data and texture data, as well as vertex weights for each vertex. However, I am unsure how to get and use skinning data.

    First of all, I am unsure of the exact terminology, specifically what the bind pose and inverse bind pose are, and what I need them for.

    Second, I am unsure where to find these matrices. I think the inverse bind pose is found in a <source> tag in the file, labelled with a attribute with "bind_poses" at the end. I will show a sample tag below:

    Code :
    <source id="Armature_Cube-skin-bind_poses">
              <float_array id="Armature_Cube-skin-bind_poses-array" count="32">1 0 0 0.05214607 0 0 1 0.07466715 0 -1 0 -0.01507818 0 0 0 1 -0.9893552 0.1241412 0.0759291 -0.1199789 -0.0462982 -0.763187 0.644517 -0.6103146 0.1379593 0.6341408 0.7608106 -0.6872473 0 0 0 1</float_array>
              <technique_common>
                <accessor source="#Armature_Cube-skin-bind_poses-array" count="2" stride="16">
                  <param name="TRANSFORM" type="float4x4"/>
                </accessor>
              </technique_common>
            </source>

    Like I said, I am not sure how to use the matrices that I load from this tag.

    Do note that I am trying not to animate the model (yet), just add bones that I can manually manipulate in my code.

    Sorry if my question is hard to understand; I am completely lost on what terminology to use and what to do in general.

    Thanks in advance.

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    4,167
    Quote Originally Posted by aparker314159 View Post
    I am unsure how to get and use skinning data.
    First of all, I am unsure of the exact terminology, specifically what the bind pose and inverse bind pose are, and what I need them for.
    ...
    Sorry if my question is hard to understand; I am completely lost on what terminology to use and what to do in general.
    I remember being where you are a few years ago. Skeletal isn't hard, but a little background reading from a few good sources will pay big dividends for you. Here are my recommendations:

    * Chapter 4.2: Filling the Gaps: Advanced Animation Using Stitching and Skinning from Game Programming Gems (also in Best of Game Programming Gems).
    * Chapter 11: Animation Systems in Jason Gregory's Game Engine Architecture (mainly Sections 11.1 - 11.5).

    Really briefly to your specific questions... You know what a MODELING transform is, right (object-space -to- world-space transform)?

    The BIND POSE transform is like a MODELING transform, except that it transforms you from: joint-space -to- object-space for a joint in the bind pose mesh. The inverse of the BIND POSE transform of course does the opposite.

    The bind pose mesh is just the stored skeletal model, modeled in the "bind pose" -- that is, the pose in which the skeleton was bound to the model by an animator.
    Last edited by Dark Photon; 05-30-2017 at 06:37 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •