COLLADA: Inverse bind pose in the wrong space?

后端 未结 2 1943
無奈伤痛
無奈伤痛 2021-02-05 15:31

I\'m working on writing my own COLLADA importer. I\'ve gotten pretty far, loading meshes and materials and such. But I\'ve hit a snag on animation, specifically: joint rotations

2条回答
  •  情深已故
    2021-02-05 16:25

    BTW, if you transpose the matrices upon loading them rather than transposing the matrix at the end (which can be problematic when animating) you want to perform your multiplication differently (the method you use above appears to be for using skinning in DirectX when using OpenGL friendly matrices - ergo the transpose.)

    In DirectX I transpose matrices when they are loaded from the file and then I use (in the example below I am simply applying the bind pose for the sake of simplicity):

    XMMATRIX l_oWorldMatrix = XMMatrixMultiply( l_oBindPose, in_oParentWorldMatrix );

    XMMATRIX l_oMatrixPallette = XMMatrixMultiply( l_oInverseBindPose, l_oWorldMatrix );

    XMMATRIX l_oFinalMatrix = XMMatrixMultiply( l_oBindShapeMatrix, l_oMatrixPallette );

提交回复
热议问题