Rotations. Vn * V0(inversed) == Rn. Rn * M0 == Mn. How2gtM0?

   738   1   1
User Avatar
Member
2 posts
Joined: Jan. 2024
Offline
hello all. the aim of this entire exercise is to get Mn, from
Vn * V0(inversed) == Rn
Rn * M0 == Mn <------ what we want

where Vn is a (3x3) matrix i construct by selecting 3 vectors connected to a common root pivot in an arbitary nth frame.

V0 is a (3x3) matrix i construct from the same 3 vectors selected to the same root pivot in the 1st frame.
Heres how i intend to construct the 3 selected vectors on an armour of my model, by selecting a pivot point (E.g point 4).
arbitary_point1 - point 4 == vector 1,
arbitary_point2 - point 4 == vector 2,
arbitary_point3 - point 4 == vector 3.
use this to form (3x3) matrix -> V0

M0 is the rotation matrix i need from the 1st frame. However i do not know where to obtain this matrix.

I used a RigDoctor midway through my workflow and got localtransform and transform attributes.



The localtransform is a 4x4 homogenous matrix (which can easily separate the rotation matrix from the translation vector) according to this website/ documentation "https://mecharithm.com/learning/lesson/homogenous-transformation-matrices-configurations-in-robotics-12 [mecharithm.com]"

In this case, the rotation matrix extracted (lets call this M0) would be a (3x3) from r11 to r33 in the picture. However this values are local to parent values instead of local to world space values (which i want).

On the other hand, the other transform matrix (3x3) as seen on the right side of the Geometry spreadsheet image is already a local to world values (i assume according to its large values). However I searched the RigDoctor node documentation and it does not have any mention of explaining the localtransform/ transform attributes derivation/ calculation. I am afraid it consist of translation, rotation and scale values all mixed together in the (3x3) as displayed in the geometery spreadsheet. I search around and thought it may be possible to extract the rotation matrix from this (3x3) with this solution online

"https://math.stackexchange.com/questions/237369/given-this-transformation-matrix-how-do-i-decompose-it-into-translation-rotati [math.stackexchange.com]"


However i need abit more clarification on how to get M0, do i get the rotation matrix (3x3) from the root POINT of the localtransform(4x4) homogenous matrix from the 3 arbitary vectors i've selected for that armour? (this is local values) or do i get the M0 rotation matrix from the (3x3) transform matrix (world coordinates, but may consist of translation and scale values)? Any advice or help or questions would be much appreciated! idk who else to ask. thanks a million

Attachments:
homogenous_matrix.png (40.6 KB)
Geometery_spreadsheet.png (133.0 KB)
extracting_rotation_matrix_(3x3)_from_a_transform_matrix_(3x3).png (198.2 KB)

User Avatar
Member
9236 posts
Joined: July 2007
Online
3@transform doesn't contain translate, it's just rotate and scale matrix, world space translate is taken from v@P

So to get your world space rotation matrix M0 you can do

matrix3 M0 = polardecomp( 3@transform );
Tomas Slancik
CG Supervisor
Framestore, NY
  • Quick Links