Apex-Transform rotation flip

   217   2   3
User Avatar
Member
18 posts
Joined: March 2015
Offline
I'm getting stuck on this, so please someone explain me WHY those rotation-values differ? This setup is a prototype for a stretchy/twist-setup where I'm calculating stretch/squash(works), translation(works) and rotation(fails) for those section-joints(orange cubes). The rotation gets calculated between a bottom and top control (the one that is selected) The gizmo shows gimbal so it can't be that. The whole math works for all sections until I'm either rotating the top-control less than -270degrees or more than 90 degrees. In both cases the decomposed rotation-values for this control (see log-window) are popping to 90 degrees or -270degrees. I made sure that the rotation-order for all transforms involved in this calc are set to (rOrd=1 -> XZY) So why is that?

Thank you!
Edited by Fraenk - Jan. 3, 2025 08:27:50

Attachments:
Capture.jpeg (148.5 KB)

User Avatar
Member
7902 posts
Joined: July 2005
Offline
If you're composing a matrix, then the original euler rotation angles are lost. When the matrix is decomposed, there are an infinite number of solutions to get the same matrix values. So the matrix decomposition algorithm will pick one of those sets which can always no longer match the original euler angles. For any type of curve interpolation set ups, you should interpolate on the input euler angles directly, and not try to get them back from matrices.
User Avatar
Member
18 posts
Joined: March 2015
Offline
Thank you very much Edward for this explanation! I was able to solve my problem in the meantime by using the inbuilt transform::Blend-node (for which no decomposition from my side is needed)
  • Quick Links