Jump to content

I need help to extract the scale from a Matrix...


Recommended Posts

Posted (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 by Masoud
Link to comment
Share on other sites

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;

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...