Sign in to follow this  
Kryogenik

Animation

Recommended Posts

I'm loading a animated .x mesh with D3DXLoadMeshHierarchyFromX, and I'm having trouble animating it. It animates too fast (its made to animate at 30 fps and my app runs at 500 fps), how do I make it animate at the speed it would if the program was running at 30 fps?

Plus, how do you loop between animation frames? I know there are animation sets, but my modeller doesn't support them (since the .x exporter is a 3rd party plugin) and it's really annoying to set animation sets manually in a text editor. I just want to be able to give my program two frames, and have it loop between them (10-15, 16-20, etc.) How would I do that?

Share this post


Link to post
Share on other sites
Quote:
how do I make it animate at the speed..

In your animController->AdvanceTime call, use a smaller delta-time = 30/500 times your 500 fps frame time. I think that's right. Try it.
Quote:
it's really annoying to set animation sets manually in a text editor ... How would I (give my program two frames, and loop between them)?

You'll have to duplicate the function of the animation controller, as far as slerping and combining the frame data. You'll need to calculate all the frame data for the bones and their parent bones that you want to animate. I would think the time to code that would be much greater than editing the x-file, as you'll have to calculate the data for those two frames in any case.

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