I'm trying to convert between two different skeletal formats. I have a hierarchical skeleton.
Now in one format, a given node's matrix is calculated by (DirectX) (recurively, from bottom node to top, where matScale/matRotate/matTranslationFromParent are that particular nodes SRT):
appliedMatrices = appliedMatrices * matScale * matRotate * matTranslationFromParent;
But I need to convert it to a format that uses (recurively, from bottom node to top, where the translationIn is vector subtraction of (ParentPos - EndPartPos) and translation out is (EndPartPos - ParentPos), andmatScale/matRotate/matTranslationFromParent are that particular nodes SRT):
appliedMatrices = appliedMatrices * matScale * matTranslationOut * matRotate * matTranslationIn * matTranslationFromParent;
How do I convert from the first format to the second skeletal format (and back)?