MPM | Deformation gradient F to orientation

   Views 331   Replies 2   Subscribers 0
User Avatar
Member
584 posts
Joined: Nov. 2005
Offline
Hello,
how can I extract only the orientation from this matrix , without shear and scale? The quaternion function seems not to ignore the scales and shears that are stored in the matrix and this leads to different rotations.

I get strange mblur result when I try te calclate the w attribute from this.
thanks
Martin
User Avatar
Member
4864 posts
Joined: Feb. 2012
Offline
Hi Martin,

You can do this using the polardecomp [www.sidefx.com] VEX function:

matrix3 R, S;
polardecomp ( F, R, S );
vector4 q = quaternion ( R );
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
User Avatar
Member
584 posts
Joined: Nov. 2005
Offline
thank You, as always a helping hand
Edited by sanostol - April 17, 2025 05:59:13
  • Quick Links