Splitting animations

Feb 3, 2010 at 11:59 AM

I'm really new to xna. I have read and look up alot of forum and dicussion regarding finding ways to split animations in a maya exported fbx into different clips. But I still unsure of how to do it with xnanimation. Can someone help me with this issue? Is the way for writing xml to split the animations the same for xna component library? What is the methods to use after splitting the animations in xml?

Thanks in advance. 

Developer
Feb 3, 2010 at 2:46 PM

The format of the XML file is as follows:

<?xml version="1.0" encoding="utf-8" ?>
<Animations>
  <Animation>
<!-- This is the name of the full sequence as exported, usually it's called Take 001-->
    <Name>Take 001</Name>
<!-- Framerate at which the animation will be played -->
    <Framerate>30</Framerate>

    <RemoveAfterTasks />
<!-- This defines a new animation -->
    <SplitTask>
<!-- Name of the new animation -->
      <Name>Walk</Name>
<!-- Starting and ending frame of the animation. Careful, animations must have a length of at least one frame, and the ending frame of an animation can't be the starting frame of another -->
      <StartFrame>0</StartFrame>
      <EndFrame>39</EndFrame>
    </SplitTask>
  </Animation>
</Animations>

 

Feb 3, 2010 at 3:08 PM

Below is my animation xml code. Is there something wrong with it? My animation doesn't seem to have split. 

 

<?xml version="1.0" encoding="utf-8" ?>
<Animations>
  <Animation>
    <Name>Take 001</Name>
    <Framerate>30</Framerate>

    <RemoveAfterTasks />
    <!--
    <Split>
      <Name>Walk</Name>
      <StartTimeSeconds>1</StartTimeSeconds>
      <EndTimeSeconds>25</EndTimeSeconds>
    </Split>

    <Split>
      <Name>Emerge</Name>
      <StartTimeSeconds>26</StartTimeSeconds>
      <EndTimeSeconds>70</EndTimeSeconds>
    </Split>
    -->

    <SplitTask>
      <Name>Idle</Name>
      <StartFrame>0</StartFrame>
      <EndFrame>100</EndFrame>
    </SplitTask>

    <SplitTask>
      <Name>Walk</Name>
      <StartFrame>110</StartFrame>
      <EndFrame>150</EndFrame>
    </SplitTask>

    <SplitTask>
      <Name>Death</Name>
      <StartFrame>500</StartFrame>
      <EndFrame>590</EndFrame>
    </SplitTask>
    
  </Animation>
</Animations>