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 / Bug in KFbxCamera? Returns matrix with entry [3,3] = 1.0, not 0.0.
  RSS 2.0 ATOM  

Bug in KFbxCamera? Returns matrix with entry [3,3] = 1.0, not 0.0.
Rate this thread
 
53650
 
Permlink of this thread  
avatar
  • Total Posts: 2
  • Joined: 24 March 2011 08:48 PM

Hello,

I’m using the ComputePerspective() function of KFbxCamera to try and generate a projection matrix for my camera. I’m using the 2011 SDK. Here’s the code:

KFbxMatrix m1 mCamera->ComputePerspective(mCamera->GetApertureWidth()*mCamera->GetSqueezeRatio()*1e6mCamera->GetApertureHeight()*1e6false);

and here is the resulting matrix:

(gdbp m1
${
  
<fbxsdk_2011_3_1::fbxVectorTemplate4<fbxsdk_2011_3_1::fbxVectorTemplate4<double> >> = {
    mData 
{{
        mData 
{1.5500031000062002000}
      }
{
        mData 
{02.755905511811024100}
      }
{
        mData 
{00, -1.0000200002000021, -1}
      }
{
        mData 
{00, -0.200002000020000211}
      }}
  }
, <No data fields>}
(gdb)

Note the last entry is “1”. As far as I know, a proper perspective projection matrix has 0 in that spot. When I use the matrix as-is, it does not produce a correct image (my image does not match the image I render from Maya). When I manually set that entry to “0”, I *do* get the correct image (that perfectly matches the rendering from Maya). This leads me to believe there is a bug in the implementation of ComputePerspective().

Cheers,
Russ MacKenzie



Replies: 0