Xbox LIVE Indie Games
Sort Discussions: Previous Discussion Next Discussion
Page 1 of 1 (5 posts)

Wrong length FBX animations with WP SDK 7.1

Last post 10/25/2011 7:04 AM by JCBDigger. 4 replies.
  • 10/22/2011 11:45 AM

    Wrong length FBX animations with WP SDK 7.1

    I have only just started using the Windows Phone SDK v7.1 with the changed FBX importer that now imports multiple animations again.  BUT...

    the animations it imports all have the same length as the first animation!  If the first animation is only 4 frames long all animations are only 4 frames long.  If the first animation is 200 frames long all are the same and shorter ones have long pauses before they loop round.   It is not much of a problem because I can still import them one at a time as I was doing before however if I can fix it I would like to.

    What I want to know is if it works properly with other FBX files.  I use Blender and I wrote the exporter at a time when the XNA importer only imported the first animation so no testing was done with multiple animations.  As far as I can tell the exported FBX contains the correct length animations with separate times for each animation and it appears to me that the problem happens at the XNA import stage however I have no way of testing that theory.

    Does anyone have a working FBX with different length animations loading with the correct lengths for each take?

    If other programmes like 3DS have the same problem I can post this as a problem on connect, if it is just Blender and I can get a working sample FBX I might be able to adjust the Blender FBX exporter.

    I have a blog post which I will probably update with any conclusions or solutions I get:
    http://blog.diabolicalgame.co.uk/2011/10/multiple-fbx-animations.html

    Regards

  • 10/23/2011 10:02 PM In reply to

    Re: Wrong length FBX animations with WP SDK 7.1

    Hi JCB,

    I can take a look at this :)  Can you post your FBX file somewhere for me to access?

    Thanks!
    -Emily
  • 10/24/2011 9:00 AM In reply to

    Re: Wrong length FBX animations with WP SDK 7.1

    Emily Yan:
    I can take a look at this :)  Can you post your FBX file somewhere for me to access?

    Emily

    Thank you for looking at this.  I have prepared some samples and posted as a single ZIP file: 
    http://code.google.com/p/3d-model-prep/downloads/detail?name=DudeWithAnimations.zip&can=2&q=

    I have also included the following as a ReadMe in the archive:

    Contents
    - TestDudeAnimations.blend
    Blender version of the Dude model from the XNA examples
    - Head, Jacket, Pants and upBodyC.TGA
    The four textures for that model
    - Microsoft Permissive Licence.rtf
    The rights granted.
    - Test-Just-Walk, Test-Long-First and Test-Short-First.FBX
    The three FBX files demonstrating the issue with importing multiple animations

     


    Issue
    Windows Phone SDK v7.1 (October 2011)

    When importing an FBX with multiple animations all of the animations have the same length as the first animation in the file.


    Examples

     

    - Test-Just-Walk.fbx
    This contains a single animation called 'Walk' it imports and plays correctly.
    - Test-Long-First.fbx
    This contains lots of animations with the first one having an extra frame added at frame 241. All animations are imported in to XNA with the incorrect length of 240 frames. For example, the 'Walk' animation has a long pause before looping.
    - Test-Short-First.fbx
    This contains lots of animations with the first one being only 17 frames long. All animations are imported only 17 frames long so, for example, the 'Walk' animation just appears to judder because it is cut too short in XNA.

     

    All the files contain the complete model with armature and one or more takes. The textures should be saved in to the same folder as the FBX file. The FBX files are exported from Blender without rotation so are +Z up instead of the XNA normal +Y up therefore they should be drawn with a suitably rotated World Matrix in XNA.


    Testing

    An application suitable for testing, viewing and rotating the models can be downloaded from:
    http://code.google.com/p/3d-model-prep/

    Regards

  • 10/24/2011 10:12 PM In reply to

    Re: Wrong length FBX animations with WP SDK 7.1

    Answer
    Reply Quote
    Hi JCBDigger,

    I checked against your model, and the model I used in the past for checking multiple animations.  It definitely looks like FBX isn't returning a changing value across the different animations with respect to the duration of the animation time.

    I'll file a bug in our system and try to track this down further :)  Thanks for you help!

    -Emily
  • 10/25/2011 7:04 AM In reply to

    Re: Wrong length FBX animations with WP SDK 7.1

    Emily

    Thank you very much for looking in to this.

    Regards
Page 1 of 1 (5 posts) Previous Discussion Next Discussion