Masoud Posted May 5 Share Posted May 5 (edited) Hello guys, From a transform matrix attribute (which includes "Transform", "Scale" and "Rotation" values), how can I extract only the "SCALE" component, and then apply it, to the geometry? I mean I don't want the Translate and Rotation of that matrix. I tried the cracktransform() VEX function. If it's a right way, I don't know how to apply that extracted scale, to the geometry: v@t; v@r; v@s; cracktransform(XFORM_SRT, XFORM_XYZ, {0,0,0}, 4@localtransform, @t, @r, @s); Thanks for helping. Edited May 5 by Masoud Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted May 5 Share Posted May 5 Hi Masoud, Extract scale vector from a matrix: vector s = cracktransform(0, 0, 2, 0.0, 0.0, 4@localtransform); Apply scale vector to matrix: matrix m = ident(); scale(m, s); Quote Link to comment Share on other sites More sharing options...
Masoud Posted May 5 Author Share Posted May 5 Hi Konstantin, Thank you for the solution. And to apply the scale, I realized that I can also use this geometry attribute: v@scale = v@s; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.