Sign in to follow this  
Byron

Working out the end of animation from X File

Recommended Posts

I have an xfile with anims in it. I need to work out the length of the animation using just the data contained in the xfile. The docs say that the anim keys express the time but they don't say what units that time is in. Here is an example of one of the anim keys I am trying to interpret: AnimationKey { 0; 7; 0;4;-1.0,0.0,0.0,0.0;;, 120;4;-0.999629,-0.027224,0.000000,0.000000;;, 240;4;-0.995757,-0.092023,0.000000,0.000000;;, 360;4;-0.985645,-0.168833,0.000000,0.000000;;, 480;4;-0.972614,-0.232427,0.000000,0.000000;;, 600;4;-0.965926,-0.258819,0.000000,0.000000;;, 1200;4;-0.965926,-0.258819,0.000000,0.000000;;; } the last frame has an animation time of 1200 but what does that mean? Any ideas?

Share this post


Link to post
Share on other sites
If the X file doesn't have the AnimTicksPerSecond templated defined, then it's not possible.
Just assume a default sampling rate of 160 ticks/frame = 4800 ticks/sec = 30 fps.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this