UT_MATRIX4 and HOM_MATRIX4 explode functions

   2217   1   1
User Avatar
Member
3 posts
Joined: May 2009
Offline
My input is transform matrix because this input might be a concatenation of several transform nodes from another software.
Tried UT_MATRIX4::explode() and HOM_MATRIX4::extractTranslates()/extractRotates() etc, both of them don't solve correctly even though I tried all possible order combinations. The only function that consistently returns correct result is UT_MATRIX4::getTranslate(). So just wondering if there's any other class or function that does the same thing, or any suggestion on what might be the problem , or if there's any external library that would do what I want are very welcome. ( I tried Imath::extractSHRT() and that doesn't solve correctly either )

Thanks!
User Avatar
Member
7713 posts
Joined: July 2005
Offline
How are you testing whether it is correct? Offhand, things that you can be doing wrong:
- You're using the wrong transform and/or rotation order
- Euler rotation values might not match exactly their original values but they will be correct in the sense that the resulting transform will be identical
- You failed to treat the extracted rotation values as radians
- You're using the wrong pivot value, or you're using two totally different meanings of “pivot”
- Your matrix has shears which you failed to extract
- Your matrix needs to be transposed because of your assumption of whether you want your vector3's as column vs. row vectors
  • Quick Links