Y
Y
Yuri Esin2021-12-02 18:25:40
3D
Yuri Esin, 2021-12-02 18:25:40

How to correctly get IBM from the TRS joint transformation matrix?

Hello!
I am writing a custom 3D graphics converter from a specific format to glTF. When exporting skinning, I ran into the problem of getting inverseBindMatrices for skeleton joints.
The input has a 4x4 matrix for each joint. When decomposing the matrix to TRS, I get valid vector3 for moving, vector4 quaternion for rotation and vector3 for scaling, the skeleton looks correct in blender after export, TRS animation also works correctly. At the same time, the mesh is turned inside out, because. there is not enough inverse matrix for local transformations.
I just can't figure out how to get the IBM matrix correctly, having a TRS matrix as input. I tried the conversion options from world to local and vice versa, as well as according to the formula proposed by the official glTF specification, but to no avail.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Esin, 2021-12-02
@Exomode

Question removed.
The solution is to convert all matrices to the world frame by multiplying by the matrix of the parent joint, then invert.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question