Results 1 to 30 of 252

Thread: Animations

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member Member KnightErrant's Avatar
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    458

    Default Re: Animations

    Many thanks for the references, most of the quaternion stuff I've
    got is from memos at work. There's a group that uses them for attitude
    control for reentry vehicles in simulations which doesn't really
    translate easily to moving bones around. Oh, it did hit me yesterday about
    the cyclic permutation for the yaw, pitch, and roll, of course Mete's
    convention has the y-axis as the vertical. D'oh!

    Edit: Went and joined, lots of refs on quaternions in gaming. Even a few
    physics ones!
    Last edited by KnightErrant; 04-14-2007 at 04:07.

  2. #2
    Member Member KnightErrant's Avatar
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    458

    Default Re: Animations

    Well, I tested unpacking all the cas files and found examples
    violating almost all of the rules from a couple posts back.
    The first of the last eight floats is the animation time in
    seconds. The header in descr_skeletons.dat say there will always
    be an odd number of frames so this number will always be a multiple
    of a tenth of a second. Otherwise the remaining seven floats I have
    no rules for.

    The header bytes aren't always 20 0 20 (14 00 14 hex), they have lots
    of variations especially for the stratmap anims. The final 8 bytes aren't
    always FF FF 0F 00 00 00 00 00 they have lots of variations too.
    Here's a chunk with some stratmap examples from the extraction log:

    Code:
     31         20   20         data/animations/MTW2_Swordsman/MTW2_Swordsman_at_mid_c_stab_v1_s1_slashrl_fail.cas                                 39586546  18149         255 255  15   0   0   0   0   0
     47         20   20         data/animations/MTW2_Swordsman/MTW2_Swordsman_at_mid_c_stab_v1_s1_slashrl_success.cas                              39604695  27493         255 255  15   0   0   0   0   0
     23         20   20         data/animations/MTW2_Swordsman/MTW2_Swordsman_at_overhead_c_stab_fail.cas                                          39632188  13477         255 255  15   0   0   0   0   0
     29         20   20         data/animations/MTW2_Swordsman/MTW2_Swordsman_at_overhead_c_stab_success.cas                                       39645665  16981         255 255  15   0   0   0   0   0
     55         20    1         data/animations/MTW2_Swordsman/MTW2_Swordsman_basepose.cas                                                         39662646  19625           1   0   0   0   0   0   0   0
     41         20   20         data/animations/MTW2_Swordsman/MTW2_Swordsman_charge_jump_attack.cas                                               39682271  23989         255 255  15   0   0   0   0   0
     99         20    1         data/animations/New_Crew/Crew_Stand_to_Wide_Push.CAS                                                               39706260  35289           1   0   0   0   0   0   0   0
     25         20    1         data/animations/New_Crew/Crew_Wide_Push.CAS                                                                        39741549   8945           1   0   0   0   0   0   0   0
     39         20    1         data/animations/New_Crew/Crew_Wide_Push_to_Crew_Stand.CAS                                                          39750494  13929           1   0   0   0   0   0   0   0
     67          2    1         data/animations/New_Swordman/Weapon/Sword_Default.CAS                                                              39764423   4601           1   0   0   0   0   0   0   0
     59         19    1         data/animations/SM_D01 Diplomat unselected idle 01.cas                                                             39769024  20105           1   0   0   0   0   0   0   0
     51         19    1         data/animations/SM_D01 Diplomat unselected idle 02.cas                                                             39789129  17385           1   0   0   0   0   0   0   0
     45         19    1         data/animations/SM_D01 Diplomat unselected idle 03.cas                                                             39806514  15345           1   0   0   0   0   0   0   0
     21         19    1         data/animations/SM_D03 Diplomat selected idle.cas                                                                  39821859   7185           1   0   0   0   0   0   0   0
     25         19    1         data/animations/SM_D06 Diplomat walk loop.cas                                                                      39829044   8545           1   0   0   0   0   0   0   0
     35         19    1         data/animations/SM_D11 Diplomat standing to stepping backwards.cas                                                 39837589  11945           1   0   0   0   0   0   0   0
     35         19    1         data/animations/SM_D12 Diplomat stepping backwards loop.cas                                                        39849534  11945           1   0   0   0   0   0   0   0
     25         19    1         data/animations/SM_D13 Diplomat stepping backwards to stand.cas                                                    39861479   8545           1   0   0   0   0   0   0   0
     23         19    1         data/animations/STRAT LID_08_Stand 2 90 right.cas                                                                  39870024   7865           1   0   0   0   0   0   0   0
     23         19    1         data/animations/STRAT LID_09_Stand 2 90 left.cas                                                                   39877889   7865           1   0   0   0   0   0   0   0
    107         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_assassinate.cas                                                   39885754  59537         255 255   7   0   0   0   0   0
     25         19    1         data/animations/Stratmap_Assassin/Strat_Assassin_basepose.cas                                                      39945291   8545           1   0   0   0   0   0   0   0
     39         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_die_backward_1.cas                                                39953836  21729         255 255   7   0   0   0   0   0
     83         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_die_forward_1.cas                                                 39975565  46193         255 255   7   0   0   0   0   0
     41         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_no_mp_idle.cas                                                    40021758  22841         255 255   7   0   0   0   0   0
     15         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_no_mp_to_stand_A.cas                                              40044599   8385         255 255   7   0   0   0   0   0
    131         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_sabotage.cas                                                      40052984  72881         255 255   7   0   0   0   0   0
     33         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_selected.cas                                                      40125865  18393         255 255   7   0   0   0   0   0
     41         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_stand_A_idle.cas                                                  40144258  22841         255 255   7   0   0   0   0   0
     11         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_stand_A_idle_selected.cas                                         40167099   6161         255 255   7   0   0   0   0   0
    111         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_stand_A_lf_idle_1.cas                                             40173260  61761         255 255   7   0   0   0   0   0
     81         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_stand_A_lf_idle_2.cas                                             40235021  45081         255 255   7   0   0   0   0   0
     85         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_stand_A_lf_idle_3.cas                                             40280102  47305         255 255   7   0   0   0   0   0
     29         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_stand_A_to_no_mp.cas                                              40327407  16169         255 255   7   0   0   0   0   0
     25         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_stand_A_to_walk.cas                                               40343576  13945         255 255   7   0   0   0   0   0
     59         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_stand_A_to_walk_backward.cas                                      40357521  32849         255 255   7   0   0   0   0   0
     33         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_stand_A_turn_90_ccw.cas                                           40390370  18393         255 255   7   0   0   0   0   0
     33         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_stand_A_turn_90_cw.cas                                            40408763  18393         255 255   7   0   0   0   0   0
     35         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_unselected.cas                                                    40427156  19505         255 255   7   0   0   0   0   0
     33         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_walk.cas                                                          40446661  18393         255 255   7   0   0   0   0   0
     27         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_walk_backward.cas                                                 40465054  15057         255 255   7   0   0   0   0   0
     29         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_walk_backward_to_stand_A.cas                                      40480111  16169         255 255   7   0   0   0   0   0
     25         19   19         data/animations/Stratmap_Assassin/Strat_Assassin_walk_to_stand_A.cas                                               40496280  13945         255 255   7   0   0   0   0   0
     55         19   19         data/animations/Stratmap_Diplomat/Strat_Diplomat_backward_1.cas                                                    40510225  30625         255 255   7   0   0   0   0   0
     21         19    1         data/animations/Stratmap_Diplomat/Strat_Diplomat_basepose.cas                                                      40540850   7185           1   0   0   0   0   0   0   0
    105         19   19         data/animations/Stratmap_Diplomat/Strat_Diplomat_conduct_diplomacy.cas                                             40548035  58425         255 255   7   0   0   0   0   0
     67         19   19         data/animations/Stratmap_Diplomat/Strat_Diplomat_forward_1.cas                                                     40606460  37297         255 255   7   0   0   0   0   0
     41         19   19         data/animations/Stratmap_Diplomat/Strat_Diplomat_no_mp_idle.cas                                                    40643757  22841         255 255   7   0   0   0   0   0
    The header and trailers are in decimal and I'm showing the three header
    bytes as a short and a byte so 20 0 20 is shown as 20 20.

    I modified two .cas files for MTW2_Spear and tried putting them in game
    using the no_animdb=1 and no_animdb=true under [util] in my cfg file
    under the assumption it was like the io_filefirst switch, i.e. only put in
    modified files under /data/animations. No joy. Thinking it might be an
    all or nothing I put the whole unpacked animations directory and
    renamed pack.dat and pack.idx. This just crashed. That's all the experiments
    so far.

    Edit: The .evt event files referred to in descr_skeleton.txt aren't in pack.dat
    so is it crashing because they're not there? Couldn't find them by hexing through
    events.dat, that's related to other sound events.
    Last edited by KnightErrant; 04-15-2007 at 20:04.

  3. #3

    Default Re: Animations

    Erf, the .evt files caused a major problem in RTW also, and ultimately led to downfall of all attempts by CA helpers to allow us to keep animations unpacked. They always had to be packed back into the files, or else the game would crash. (Editing the animations and then stuffing them back into pack files was only way of modding them.) Maybe Caliban can help us there.

  4. #4
    Member Member KnightErrant's Avatar
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    458

    Default Re: Animations

    Ahh, thanks for that info. Reading zxiang1983's thread has me thinking
    re-packing is the only way to get this to work too. Kind of ugly if that's
    the only way, though.

  5. #5
    Member Member KnightErrant's Avatar
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    458

    Default Re: Animations

    OK, documentation is out of the way. Back to the fun stuff.
    Wrote an animmerge script to combine a stock ms3d mesh with
    a cas file. Here's the walk animation in Milkshape:



    EDIT: Forgot the significant part, the shields held up is done by changing the animations in Milkshape.

    and also the celebration .cas in Milkshape:




    From here you use the animextract utility to extract to a .cas to put in
    game as:



    EDIT: These are the shields held up in-game.

    NOTE This ain't right, everybody has become left-handed. Not that I mind, I'm
    left-handed myself.

    Unresolved Problems:

    (1) Does no_animdb=1 work? PM into Caliban hasn't been answered.
    Can't unpack skeleton.dat into the /animations directory because OS constraints don't allow a file without an extension to have the same
    name as a directory. (Repeating xziang1983 here, been down this road.)

    (2) Unpack in a higher directory? Maybe, haven't tried this.

    (3) Unpack in a lower directory? Same answer, try later.

    (4) Repacking the pack isn't that bad. Live with it.

    (5) Maybe the TYPE files have an implied extension we just don't know
    about. This would be nice but we need information.

    (6) What the heck is the global data? I just saved it in the materials comment
    section but need to know what it really is. Also the mystery 8 floats at
    the end, also written into the materials comment section.

    (7) Outside the bounds, but the TYPE files (using the language of
    descr_skeleton.txt) have bone info in them, can these be modded
    to change the sizes of units re Bwian's question in the mesh thread?
    Last edited by KnightErrant; 04-26-2007 at 06:35.

  6. #6
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Animations

    Haha those sergeants are really screwed
    The arms look weird... hmm, maybe the game saves some bone positions you didn't export correctly?

  7. #7
    Member Member KnightErrant's Avatar
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    458

    Default Re: Animations

    I just don't know how to use Milkshape. The verts didn't
    move with the joints when I edited the keyframes. Anyway,
    just an experiment for repacking and putting modded cas's
    back in game.

    Got a reply from Caliban. He showed me a .jpg of his /animations
    directory. Could not see from that if the type files were unpacked
    there or not but the .evt files are definately there so they need to
    be found and unpacked.

    I asked for two experiments: try searching for navy_strat*.* and
    fs_camel*.*. If these don't turn up any files then skeletons.dat
    isn't meant to be unpacked and the question should be settled.

    I've been looking at the data at the top of the type files
    before it gets to the animation families and the standard skeleton rig is
    in there. These could probably be modded to make custom
    animations for re-rigged figures, i.e. like dwarves etc., if the engine
    will accept more entries in skeletons.dat and skeletons.idx.

  8. #8

    Default Re: Animations

    Hi KE et al

    Quote Originally Posted by KnightErrant



    EDIT: These are the shields held up in-game.

    NOTE This ain't right, everybody has become left-handed. Not that I mind, I'm
    left-handed myself.
    Ahh, you're a firm but cruel drill sergeant, making your men dislocate their shoulders just so they reverse their arms and pretend to be The Queens Own Left Handed Regiment - specialists in guarding the left flank!! . My guess is that you've misplaced the axes conversion x*-1 somewhere.

    Quote Originally Posted by KnightErrant
    Unresolved Problems:

    (1) Does no_animdb=1 work? PM into Caliban hasn't been answered.
    Can't unpack skeleton.dat into the /animations directory because OS constraints don't allow a file without an extension to have the same
    name as a directory. (Repeating xziang1983 here, been down this road.)
    Nope, been playing with this, no_animdb is not available in the retail version so we'll have to pack. With the skel name and folder conflicts, my thoughts are that the skeleton names are just handles so if we modify them by the additon of "_skl" and consistently use this across all the relevant files (modeldb,etc) it should take away this bugbear

    Quote Originally Posted by KnightErrant
    (2) Unpack in a higher directory? Maybe, haven't tried this.

    (3) Unpack in a lower directory? Same answer, try later.
    The retail game seems to just run off the idx/dat files, unless the file name and folder conflicts are causing the game to crash

    Quote Originally Posted by KnightErrant
    (4) Repacking the pack isn't that bad. Live with it.
    Agreed, it's not too much of a price to pay

    Quote Originally Posted by KnightErrant
    (5) Maybe the TYPE files have an implied extension we just don't know
    about. This would be nice but we need information.
    If you have a look at the calls to the skeletons in modeldb just the normal name is used, if they were it would have to be hardcoded but it doesn't help us with name and folder conflicts.

    Quote Originally Posted by KnightErrant
    (6) What the heck is the global data? I just saved it in the materials comment
    section but need to know what it really is. Also the mystery 8 floats at
    the end, also written into the materials comment section.
    Once I lash myself into a frenzy of documentation completion (hardest part for me) for the RTW CAS to M2TW converter, I'll go back and have another look at the animation files and tie down the loose ends.

    Quote Originally Posted by KnightErrant
    (7) Outside the bounds, but the TYPE files (using the language of
    descr_skeleton.txt) have bone info in them, can these be modded
    to change the sizes of units re Bwian's question in the mesh thread?
    I'm pretty sure that we can modify skeletons adding, moving and rescaling bones as long as we remember tha the engine is looking for various flags for animation ie bone_Rhand, saddle, etc

    Cheers

    GrumpyOldMan

  9. #9
    Member Member KnightErrant's Avatar
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    458

    Default Re: Animations

    Yep, it was a missed x -> -x in the animextract that did the
    parity inversion on my guys. I was so careful to take these
    OUT of the animmerge. I'll do some surveying on the cas's
    to see how the globals and final floats vary. It is an addiction,
    good times!

    Edit: Read up a little on animating, better example of raised shields
    with the MTW2_Spear_walk.cas.

    Last edited by KnightErrant; 04-27-2007 at 03:32.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO