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 / Timelines and Zoom with Maya and Motion Builder
  RSS 2.0 ATOM  

Timelines and Zoom with Maya and Motion Builder
Rate this thread
 
50483
 
Permlink of this thread  
avatar
  • Location: Glendale, CA
  • Total Posts: 10
  • Joined: 08 August 2007 06:46 PM

I am exporting a camera into FBX from my motion control software and it is going well, but a couple of things are defeating me.  Oddly they each work in Maya/MotionBuilder but not the other way round.  I export the camera focal length and the time line using:

KTime lsTime, leTime;
lsTime.SetGlobalTimeMode(lsTime.eCINEMA);
lsTime.SetGlobalTimeProtocol(lsTime.eFRAME);
leTime.SetGlobalTimeMode(leTime.eCINEMA);
leTime.SetGlobalTimeProtocol(leTime.eFRAME);
lsTime.SetSecondDouble(0.0f);
leTime.SetSecondDouble(10.24f);
// Now Set the TimeLine
KTimeSpan lTimeLineTimeSpan;
lGlobalSettings->GetTimelineDefaultTimeSpan(lTimeLineTimeSpan);
lTimeLineTimeSpan.SetStart(leTime);
lTimeLineTimeSpan.SetStop(leTime);
lGlobalSettings->SetTimelineDefaultTimeSpan(lTimeLineTimeSpan);
lCurrentTakeInfo = gpFlair2FBXScene->GetTakeInfo("Flair Camera Motion");
if (lCurrentTakeInfo)
{
lCurrentTakeInfo->mLocalTimeSpan.SetStart(lsTime);
lCurrentTakeInfo->mLocalTimeSpan.SetStop(leTime);
}

and the focal length with:
KFbxCamera* cam = gpCameraNode->GetCamera();
cam->SetApertureMode(KFbxCamera::eFOCAL_LENGTH);
and

if (export_fov)
{
// Create the CurveNode (it is necessary for the GetCurve to successfully allocate the Animation curve)
cam->FocalLength.GetCurveNode(gpAnimLayer, true);
lCurve[FOV] = cam->FocalLength.GetCurve<KFbxAnimCurve>(gpAnimLayer, true);
if (lCurve[FOV])
lCurve[FOV]->KeyModifyBegin();
}
etc

The timeline works when imported in Motion Builder but not Maya, the focal length works when imported into Maya but not Motion Builder.

I know in Motion Builder if you are driving the focal length you have to takes several steps to get it to animate through a real time plugin, so perhaps there is a step I am missing as the focal length is not animatable by default.



Replies: 0