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 / Multiple layer animations
  RSS 2.0 ATOM  

Multiple layer animations
Rate this thread
 
55897
 
Permlink of this thread  
avatar
  • pakiman
  • Posted: 17 May 2011 06:10 AM
  • Total Posts: 15
  • Joined: 06 January 2011 09:13 PM

I see the FBX 2012 SDK “Animation” example creates two animation layers, but doesn’t show how to
bake/combine them.

If my program doesn’t support multiple layer animations, can someone post an example of using the
BakeLayers() function from the KFbxAnimStack class?

Where does the KFbxAnimEvaluator* pEvaluator parameter come from?

Also, I don’t understand the meaning of the gPeriod parameter:

KTime pPeriod
“The time increment for the re-sampling.”

Is this the frame rate? e.g. 30fps ?



Replies: 0
avatar
  • nian.wu
  • Posted: 18 May 2011 07:24 PM

An example that call BakeLayers:

// frame period. 
KTime lFramePeriod;
lFramePeriod.SetSecondDouble(1.0 24); // 24 is the frame rate

KTimeSpan lTimeSpan pAnimStack->GetLocalTimeSpan();
// get KFbxAnimEvaluator* pEvaluator from KFbxScene::GetEvaluator()
if (pAnimStack->BakeLayers(pScene->GetEvaluator(), lTimeSpan.GetStart(), lTimeSpan.GetStop(), lFramePeriod))
        
{
         
// do something after merge layers   
        
}


Nian Wu
AutoDesk FBX Team

Replies: 1
/img/forum/dark/default_avatar.png

Sampling period is inverse of frame rate.  Thanks.

Author: pakiman

Replied: 20 May 2011 05:30 AM