Jump to content
  • Advertisement
Sign in to follow this  
Icebone1000

[FBX SDK] How I get the keyframes times?

This topic is 2850 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im starting to get desperate, all Im doing now is try to get the info from this...

Anyone can tell me how I get the times(on frames or on seconds) each keyframe is setted for each bone?

Those times are the ones I want pass to the method
pFBXAnimEvaluator->GetNodeGlobalTransform( pFBXBoneNode, tKeyTime );

So I can get the transformation for the bones at each keyframe, so I can start to interpolate and animate...

Share this post


Link to post
Share on other sites
Advertisement
It's been a while since I worked with the FBX SDK, but I think given a KFCurve, you can get the time for a particular keyframe with the KeyGetTime method (passing in the index of the frame).

Another way to go at it would be to choose your own keyframe times and use KFbxNode::GetGlobalFromCurrentTake to give you a transform at each time. This is the way I do it. I guess you're not getting the true original keyframes this way but it seems to work well enough.

EDIT:

Didn't read your post carefully enough the first time. As with the second approach I mentioned, I would try just generating some times spaced out over the duration of the animation and ask for the global transform at each time. It will give you an interpolated value that should work.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!