Jump to content
  • Advertisement
Sign in to follow this  

assimp animation

This topic is 926 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

the metric of aiAnimation::mDuration doesn't match those of aiNodeAnim::time.


animation's duration may be very big ( 2063456540 ) because the unit has not been transfer, 

however the aiNodeAnim  has 36 keyframe, the last keyframe's time is 36, 

so the duration is overpass the time of a keyframe.    when i use the time( <duration ) to search matrix 

in  keyframe, it crash...


i want to know how to transfer the unit of duration?   or if there are any solution to make it not crash..



Share this post

Link to post
Share on other sites

Duration is in "ticks" so you'll have to use ticksPerSecond to come up with the real animation time.


a snippet of my animation loading code to illustrate:

anim.ticksPerSecond = static_cast<float>(assimpAnim.mTicksPerSecond);
anim.durationTicks = static_cast<float>(assimpAnim.mDuration);
anim.durationSeconds = anim.ticksPerSecond * anim.durationTicks;
anim.durationMilliseconds = anim.durationSeconds * 1000.0f; 

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!