How does the pivot work when using the make transform Vop node?
I am trying break down and figure out the function of the Make Transform node using python (Outside of any 3d software).
The Translate is pretty basic as I can just place them into a matrix as they are x = m[3][0], y = m[3][1] and z = m[3][2].
For rotation I am using the following:
def EulerToMatrix(Rotation):
x, y, z = Rotation
XM = M3([[ 1, 0, 0],
[0, math.cos(x), -math.sin(x)],
[0, math.sin(x), math.cos(x)]])
YM = M3([[math.cos(y), 0, math.sin(y)],
[0, 1, 0],
[-math.sin(y), 0, math.cos(y)]])
ZM = M3([[math.cos(z), -math.sin(z), 0],
[math.sin(z), math.cos(z), 0],
[0, 0, 1]])
return (ZM * YM * XM)
I can then just pipe this information into the Matrix4.
The problem I have now is that I cannot find any information that I can understand on how to apply the pivot to the matrix4. It's not as simple as just adding.
I have attached a file that has the make transform that I am using to test against. The pivot seems to be linked to the rotation and so I am guessing it is related to the scale as well. Is there any way to break down how this pivot transforming works?
MakeTransPiv.hip