ExtendScript layer world matrix
Copy link to clipboard
Copied
Hi all,
I'm trying to write an ExtendScript 'equavalent' function of the C++ SDK function:
AEGP_GetLayerToWorldXform
So far, I've managed to get matching values for any kind of layer using the following forumla:
Ainv * S * R * OR * P where:
Ainv = 4x4 Anchor point inverted matrix.
S = 4x4 Scale matrix.
R = 4x4 rotation matrix.
OR = 4x4 oreintation rotation matrix.
P = 4x4 position matrix.
I ran into non-matching values when I use this formula on a Two-Node Camera Layer, where the Point-Of-Intereset is different from the position of the camera(which make sense).
Does anyone knows how should I embedd the Point Of Intereset values in my formula, or having a different way of "mimicking" the C++ SKD function mentioned above in ExtendScript?
Copy link to clipboard
Copied
i think it's a "look at" kind of calculation.
https://stackoverflow.com/questions/349050/calculating-a-lookat-matrix

