XNA Creators Club Online
Page 1 of 1 (5 items)
Sort Posts: Previous Next

Animation Clip Duration trouble (SOLVED)

Last post 04-09-2008 6:07 PM by R3D1IN3. 4 replies.
  • 02-21-2008 8:09 AM

    Animation Clip Duration trouble (SOLVED)

    mirroring my post here: http://community.softimage.com/showthread.php?t=264

    having some serious troubles with animation clip length in XNA,
    i've tryed almost anything but i couldn't have a loop animation clip inside xnaviewer, everything i export goes beyond its last keyframe and have infinite (00:00:00) duration value.

    it could be caused by a bug inside the export process, because the tutorial objects and scenes export correctly (so they could have inherited correct values from 1.0 XNA plugin), even if i create new clips, and alternatively xna models creatd from scratch do all have the same duration lentgh problem.

    any help appreciated.


    http://www.mentezero.com
  • 02-21-2008 6:09 PM In reply to

    Re: Animation Clip Duration trouble

    "aiutati, che Dio t'aiuta" :-)

    well guys, it seems that this time we helped ourselves alone.

    after an entire day on this problem we've managed to solve the Duration Action Clip problem.

    to obtain a correct animation time do the following steps:

    1. xna toolbar -> create model (yup NOT skinned).
    2. put you mesh inside this newly creatd model and remove the cube.
    3. give a phong.fx to your mesh (without this skeleton will not work).
    4. create your skeleton, if you have multiple segments keep in mind that you mustn't parent roots to effectors, but to last bone (jeez my english is terrible!). At last you must have only one compact skeleton.
    5. middle click the entire skeleton root and drag it inside your model.
    6. do envelope procedure.
    7. select all roots, activate translation and create a Character Key Set.
    8. select all bones, activate rotation and add market parameters to key set.
    9. animate your character with key character set option.
    10. action->store->character key set animation or current values, ok with default parameters.
    11. publish your model.
    et voilà

    sincerely hoping that this can be of any help, if not drop a line here.

    Mentezero staff
    http://www.mentezero.com
  • 02-28-2008 3:12 PM In reply to

    Re: Animation Clip Duration trouble

    Any ideas for getting the duration to work correctly with an existing model and animation set? My model animates well, but like yours did, when imported into GSE has no set duration and plays forever with no loop. I tried to apply your method as much as possible for an existing model, created character key sets, stored the animations in the same way, and got it to work on one export. After that one, I haven't been able to successfully re-export with a set duration. Any ideas? Thanks.
  • 03-04-2008 4:35 AM In reply to

    Re: Animation Clip Duration trouble

    well my friend, i was on this problem for a loooong time.

    the problem seems to be in how you organize the structure of the model, what i've read in many places on the web is that you must put the skeleton structure under the DeformerRoot null, but this won't assure that animation clip length will correctly be transfered into XNA.

    as i wrote up there, i've succeeded in exporting correctly the animation clip length even if i've used a Model (not a skinned one), in fact the important thing for XNA seems to be that under the Model null there must be ONE mesh (even a hierarchy) and ONE skeleton structure, the master skeleton null must be skinned to the mesh and animated.

    if you just drag your skeleton under DeformerRoot, the animation will be transfered but without the correct clip length, or at least, this is what was happening to me.

    hope this helps, if not draw me a line, i'll try to explain it better ;)
    http://www.mentezero.com
  • 04-09-2008 6:07 PM In reply to

    Re: Animation Clip Duration trouble

    Hey I was having problems with this too and while I still cant get the models to export with the correct clip duration I did find out that you can set the cip duration in code by doing this Models[CurrentModel].Animations[0].Duration = new TimeSpan(0,0,2); just thought I would let everyone know this is another work around for the problem.
Page 1 of 1 (5 items) Previous Next