Jump to content
  • Advertisement
Sign in to follow this  
LilTrooper

Keyframed Animation using X File Format

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

I have a keyframe animation from 3d Studio which I can export to a .x flie. Is it possible to animate this in DirectX through the use of this X file?

Share this post


Link to post
Share on other sites
Advertisement
There are many approaches, but yes it can be done. You can use the Animation controller (ID3DXAnimationController) and D3DXLoadMeshHierarchyFromX functions. Using the Animation Controller may be a bit confusing, depending on which version of DirectX you are using.

Share this post


Link to post
Share on other sites
That's good news. And the fact that you mention the animation controller and D3DXLoadMeshHierarchyFromX reminds me of the MultiAnimation Sample in the SDK. However, this sample uses a skinned mesh (tiny.x). So, is it possible to use this sample and tweak it to do a keyframed non-skinned mesh? Or do you know of any references that would help me learn to use an animation controller and/or a D3DXLoadMeshHierarchyFromX?

Thanks for any help.

Share this post


Link to post
Share on other sites
You can look MultiAnimation,it can do your work.
But I don't know how to play a section of the animations(for example,from keyframe 30 to keyframe 60) using DirectX's functions?Could anybody help me?

Share this post


Link to post
Share on other sites
Quote:
Original post by LilTrooper
the <ahref="http://www.andytather.co.uk/Panda/directxmax_downloads.aspx>PandaSoft Exporter allows you choose which frames of the animation to include in the .x file.

Now, as far as controlling which frames will be used in the program if the .x file contains ALL the keyframes, I would guess that when using the AdvanceTime function, make sure to only advance the time from the first keyframe to the desired frame, then start again at the beginning time again. I'm not sure if this is the most efficient, but I would recommend exporting using the PandaSoft Expoerter first.

Share this post


Link to post
Share on other sites
I've had experiences with that in the past, try exporting by unchecking the local object space box. If that doesn't work, I'm not sure what the problem may be - if you could possibly explain in more detail your problem I might know.

Hope this helps.

Share this post


Link to post
Share on other sites
So, I've looked at the MultiAnimation sample in the SDK a little more and I just need to do a little testing to make sure it'll work. However, they use a .fx file. Is this absolutely necessary for an animation that I have exported from a 3d modeling tool such as 3d Studio?

Thanks for reading this. =)

Share this post


Link to post
Share on other sites
It's not absolutely neccessary, and I haven't looked at that sample with the latest SDK, but the fx file might cut out some redundant code...just saves you some time with regards to which passes are supported.

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!