Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Extract scale values from matrix (toWorldVec)?

  • Extract scale values from matrix (toWorldVec)?

    Posted by Simon Bjork on November 12, 2020 at 4:36 pm

    I have a 3×3 matrix (generated from layer.toWorldVec) and I would like to extract scale values from this matrix. Is this possible? I found some expression to extract rotation values which seems to work well, but I haven’t found a way for scale.

    // 3x3 matrix
    L = thisComp.layer("Dark Gray Solid 1");
    u = L.toWorldVec([1,0,0]);
    v = L.toWorldVec([0,1,0]);
    w = L.toWorldVec([0,0,1]);
    [u,v,w]

    * The matrix can also be a matrix coming from another application but in the same format.

    Thanks for the help :).

    Simon Bjork replied 5 years, 9 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    November 12, 2020 at 11:51 pm

    Try this:

    [100/length(u),100/length(v),100/length(w)]
  • Simon Bjork

    November 13, 2020 at 9:51 am

    Thanks a lot Dan, that seems to work perfectly!

    * I haven’t asked a question here in 10 years, and from what I remember you helped me that last time as well. Simply amazing work!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy