Keyframed Animation using X File Format
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?
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.
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.
Thanks for any help.
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?
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?
Well, if the Multianimation SDK sample can do keyframed animation, I have an idea to play certain frames of the animation. I know for sure that when exporting your model from 3d Studio, the <a href="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.
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.
Quote:Original post by LilTrooperallows you choose which frames of the animation to include in the .x file.
the <ahref="http://www.andytather.co.uk/Panda/directxmax_downloads.aspx>PandaSoft Exporter
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.
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.
Hope this helps.
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. =)
Thanks for reading this. =)
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement