float3x4 TRS ? Position, Rotation Scale to float3x4 ?

Hello,

I have a custom “bone” setup and I am trying to match the bone positions to the SkinMatrix. How do I convert a bone position and rotation and scale to a float3x4 in this matrix?

Thanks,

Here’s an example I have: Kinemation-Skinning-Prototype/Assets/Kinemation/Systems/HybridSkinMatrixSystem.cs at master · Dreaming381/Kinemation-Skinning-Prototype · GitHub

1 Like

0x4 : bone’s X axis vector ( 0 is scale)
1x4 : bone’s Y Axis Vector( 1 is Scale)
2x4: bone’s Z Axis Vector( 2 is scale )
3x4: Bone’s Position

matrix is 3d graphic’s ABC.

if you use Matrix4X4 ,
Matrix4x4 localToWorld;
float4x4 ltow = localToWorld; // type convert unity.mathmatics
float3x4 skinmatrix = new float3x4( ltow.c0.xyz , ltow.c1.zyz , ltow.c2.xyz , ltow.c3.xyz);

skinmatrix is the movement value from the original bone position.

The inverse value of the original position and rotation is stored in bindposes.
90 percent of the difficulty of skinning lies in the hierarchy.

1 Like