Multiple FBX Animations

Oct 17, 2012 at 4:13 PM

How do you guys typically handle multiple animations when using FBX files.  The two ways I have seen is have everything in one take, and use an xml to split it up, or Shawn Hargreaves detailed a way to do it by exporting each animation to a separate FBX file.  Do you support the xml splitting method?  I was looking around the importer and didn't see anything, but I could have missed it.


Oct 18, 2012 at 12:24 AM
Edited Oct 29, 2012 at 2:21 AM
There is a BeginFrame and EndFrame property for the BoneAnimation, you can use them to split animations. The only pitfall is that BoneAnimation is not XAML friendly at the moment so you'll have to do it in C# code.
Oct 28, 2012 at 7:24 PM

Sorry to be a bother about this again.  I'm trying to write some code in the processor to split up a single take based on an xml.  I've looked through the BoneAnimation class and don't see any Begin or EndFrame members.  The only place I see them is in KeyframeAnimation, and hence, BoneAnimationController.  Is there a good way to split these up in a processor?

Oct 29, 2012 at 2:39 AM

Yes, you won't be able to access the BeginFrame & EndFrame property in a content processor. There're several walkarounds:

1. Split the animation in the content processor, but you will have to write your own code to split the animations. This is a harder way if you're not so familar with how skeleton animation works.

2. Don't split the animation during content build. Set the BeginFrame & EndFrame you create a BoneAnimationController. (You need a BoneAnimationController in order to create the BoneAnimation). This method won't work with the typical xaml authored scene.

3. Use .X format for animations. Panda X Export can split the animation into multiple clips when you export them. FBX or X really doesn't matter because the model that is consumed by the game is in its own binary format.

Oct 29, 2012 at 4:56 AM

I ended up doing #1, the AnimationComponentLibrary has a really good example.

#3 can be a nightmare for artists.  That was my initial approach long ago, and it just didn't end up working very well.  .X causes a lot of issues for them in my experience.

Thank you for the help!