Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® FBX® / FBX SDK / KFbxMatrix bug?
  RSS 2.0 ATOM  

KFbxMatrix bug?
Rate this thread
 
43193
 
Permlink of this thread  
avatar
  • JustPC
  • Posted: 13 May 2010 03:05 PM
  • Total Posts: 1
  • Joined: 13 May 2010 09:55 PM

Hi, guys.
Maybe I’m doing something wrong or maybe there’s a bug.
I have my own matrix (which is column-major) and there’s also yours - KFbxMatrix.
The following code doesn’t work for translation (everything is OK except translation, it’s zero):

KFbxMatrix mat pNode->GetGlobalFromCurrentTake(pTime)
 Matrix34 myMat
;
 for 
(unsigned int row 0row 3; ++row)
 {
 
for (unsigned int col 0col 4; ++col)
 {
 myMat(row
col) mat.Get(rowcol)
 }
 }

Then I found the workaround. The following did work:

KFbxMatrix mat pNode->GetGlobalFromCurrentTake(pTime)
 Matrix34 myMat
;
 for 
(unsigned int row 0row 3; ++row)
 {
 
for (unsigned int col 0col 4; ++col)
 {
 myMat(row
col) ((double*)mat)[row col 4];
 
}
 }

Is something wrong with matrix? ...

Regards,
Alexander.
P.S. FBX SDK 2011.2.



Replies: 0
avatar

Hi,JustPC,
The column-major in FBX means the last row of the matrix represents the translation part of the transformation.
So translation elements are mat.Get(3,0), mat.Get(3,1) and mat.Get(3,2).



Jiayang Xu
Maya Data Platform
Autodesk

Replies: 0