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 / about position of camera
  RSS 2.0 ATOM  

about position of camera
Rate this thread
 
62798
 
Permlink of this thread  
avatar
  • zydgyy
  • Posted: 13 December 2011 05:19 AM
  • Total Posts: 84
  • Joined: 09 November 2011 05:37 PM

I read about we can get the position of camera in terms of transformation of the node to which attached,and i read there is a property position in KFbxCamera class,so,both of two methods are the same usage?position perperty is world system?Thank u!



Replies: 0
avatar

zydgyy 13 December 2011 05:19 AM

I read about we can get the position of camera in terms of transformation of the node to which attached,and i read there is a property position in KFbxCamera class,so,both of two methods are the same usage?position perperty is world system?Thank u!

The Position property on the KFbxCamera is deprecated. It was used back in the days when “Producer Cameras” were always contained in FBX files.

As of now, the official way to retrieve the camera position is to find the node attached to it (there might be more than one) and get the property LclTranslation.



Robert Goulet, FBX Dev Lead

Replies: 0
avatar
  • zydgyy
  • Posted: 14 December 2011 02:43 PM

So,if i want to get something like view matrix in openGL,then that it is as well???



Replies: 1
/userdata/avatar/vx3501hqr_small.jpg

The position of camera is where to put the camera in the scene.
The view matrix you are talking is the transform matrix needed if you want to look through the camera and hence need to convert model to camera space.
They are different.

All position info in FBX file are in object space or lcoal space, it is up to the customer to convert them to camera space if necessry.

Author: Jiayang Xu

Replied: 14 December 2011 03:51 PM  
avatar

Related to this topic, I recently added three new functions to the FbxCamera class in FBX 2013.0 Beta3 (If you have access to Beta boards, you can test this out).

They will be the following:

FbxVector4 EvaluatePosition(intpIndex, const FbxTimepTime=FBXSDK_TIME_ZERO) const;
FbxVector4 EvaluateLookAtPosition(intpIndex, const FbxTimepTime=FBXSDK_TIME_ZERO) const;
FbxVector4 ComputeUpVector(const FbxVector4pCameraPosition, const FbxVector4pLookAtPosition) const;

These new functions will make it much easier to build the view matrix once the three vectors are fetched. These functions will not only take care of the subtle things mentionned in this thread, but also taking care of animation, if any. Until FBX 2013 is out, it is extremely difficult to get these values since there is a lot of quirks and traps.



Robert Goulet, FBX Dev Lead

Replies: 0