Results 1 to 22 of 22

Thread: Animations .... what can we do with them?

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 .... what can we do with them?

    @GOM
    Time steps that aren't float integers is causing Milkshape
    to hang while loading. Went back to framenumbers and
    FPS=1.0 and its working again. Did you get yours working
    with noninteger time steps?

  2. #2

    Default Re: Animations .... what can we do with them?

    Hi KE

    Quote Originally Posted by KnightErrant
    @GOM
    Time steps that aren't float integers is causing Milkshape
    to hang while loading. Went back to framenumbers and
    FPS=1.0 and its working again. Did you get yours working
    with noninteger time steps?
    I sent a sample ms3d and an animmerge2.py to you by email, it still seems to work. I set the FPS to 20 and the frametimes were (frame_num+1)*0.05 - to catch the zero value at the beginning.

    If you need to watch the animation slower for debugging, leave the FPS in the Preferences window and use Menu/Tools/Scale Animation. I usually factor it up by 10 to slow it down and factor it down again to get real time action.

    I'd just like to add my voice to what should be thunderous applause, while I've been kerfuffling along you've got on with the job and come up with some great tools. Great work . Just going to try them on other stuff and see if I can break 'em .

    Cheers

    GrumpyOldMan

  3. #3

    Default Re: Animations .... what can we do with them?

    KE ... please slap me if I am asking a stooopid question ... but can I edit the actual raw CAS animation files in MS3D, or should I be looking at the 'official' CAS tool released by CA earlier on ? I am more at home using that to mess with RTW anims ...and would like to use it for this..but I don't know if I am going to introduce nasty issues if I do. Everything else is going swimmingly.

    Your tool handles non-standard animations fine, and converts them over to the new skeleton with very little fuss. If I wanted to make a custom animation for a custom skeleton...how would that work? Not in Max I suspect ...so I wanted to know of there is an MS3D or Max tool or part of the current toolsets that would help.

    I wanted to try adding a 'tail' to a human skeleton...and animate that. Just don't know where to start!
    Careless Orc Costs Lives!

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

    Default Re: Animations .... what can we do with them?

    Hi all,

    GOM helped me find my error so now I can set FPS and have it work
    right in Milkshape.

    @Bwian
    From GrumpyOldMan's post in the animations thread he could add bones
    and animate them by string name so it should work. Not familiar with
    CA's tool. I'm still a novice at animating in Milkshape but I think that
    would work. Question is what happens if you pull in a 20 bone animation
    with animmerge, THEN add a tail bone. Does it put in N frames of
    null animation for that bone which you can then edit in the keyframer
    or does it just keep that bone with zero animation frames. Don't know how
    you tell Milkshape you want to create frames for a single bone.

    What I'm getting at is animextract as it stands now would probably work
    right if you could get the same number of frames for each bone because it
    reads the joint data in the ms3d file but it ignores any bone with
    'weapon' or 'shield' in its name (no anims for these). Only problem I
    see, and its a small one, is that I hard-coded the hierarchy tree for
    humans into the extractor. I just need to make this a filechooser
    pop-up to let you pick a standard hierarchy tree or a new one with an extra
    bone. I need to solve this problem to do mounts and other non-human
    anims anyway.

    By hierarchy tree I mean the entries near the top of the .cas file that
    look like this (when pulled out to decimal):

    Code:
    21 
    0   0   1   2   3   1   5   6   7   7   6   10  11  12  6   14  15  16  1   18  19
    This does the parent/child relationship for bones. Presumably a tail bone
    would come from bone_pelvis so it would be a 1 appended onto the end
    of this and that's the new hierarchy tree.

    If you try adding the bone after merging with a walk animation or something,
    e-mail me the .ms3d file. I'd love to look at the joints section to see what
    it did.

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

    Default Re: Animations .... what can we do with them?

    Revisiting: got a jog in and cleared the cobwebs. Not thinking
    big picture enough. You don't want animextract, you need a bigger
    and better exportskeleton function. Let's say the .skeleton file
    now includes the pose vectors AND bone names. So with a tail
    it is now 21 lines long with the last entry having the bone_tail
    pose info.

    You also need an ASCII hierarchy file to read like the above post with
    correct parent/child. Now when it reads all the .cas files in a directory
    that you've moused to, it puts in the updated hierarchy tree, time ticks
    stay the same (haven't changed the animation), it writes the bone section
    but adds the new bone name at the end and duplicates the quat frame
    number integer, duplicates the anim frame number integer, calculates a
    new quat offset byte count, a new anim offset byte count, does a int 0,
    an int 1, and a final byte 0 to complete the bone section.

    It then replicates all 20 quat blocks for the regular bones, adds a new
    block of Nframes of 0.0 0.0 0.0 1.0 which are base pose quats for the
    tail. Then replicates all 20 anim blocks for the regular bones, adds a new
    block of Nframes of 0.0 0.0 0.0 deltas for the tail bone, then does
    the new skeleton pose data with the new bone, then adds the usual
    footer. Scaling of the anims could also be done here just like the
    regular exportskeleton function.

    Now all the anims in that directory should be ok, its just that the tail
    isn't animated beyond its base pose.

    The problem as you've noted are the stock animations like knifeman
    and crew. We ignored this for the Dwarves but if they ever start swimming
    they'll pop back to full size. For units with a new bone, they might crash
    the game. Probably one would have to copy the stock anims into the
    new directory and rewrite descr_skeleton.txt so that the new anim section
    there points to the copies of crew and knifeman in the new directory where
    they will receive the extra bone and animation data when
    "biggerandbetterexportskeleton" is run.

    Without too much thought on the subject, it seems like the above could
    be generalized to adding more than one bone at a time. Of course, someone
    is going to have to animmerge these into Milkshape to make the tail
    move and some anim families like MTW2_Mace has 185 anims, MTW2_Halberd
    has 205, MTW2_2H_Axe has 215, etc. from my survey.

    Does that sound like a reasonable automated animation modification?

  6. #6

    Default Re: Animations .... what can we do with them?

    Hi KE

    Haven't got much time today but a few thoughts on adding bones. Bones can only be added at the end of hierarchy table in the mesh and anim because otherwise you have to do a lot of reassigning verts because of the change in bone indices.

    With the new method you're proposing, you may have to go to a template system - eg extract and merge all Mace anims with tails and wings skeleton with number of frames by 0 position and rotation values for the new bones. Maybe a dropdown or list with available options. Possibly the templates could be extracted from a Milkshape master. Maybe you could use a generic figure for merging purposes.

    @Bwian - Scaling doesn't add anything to what's stored on the HD but the anims are recalculated and stored in memory for each different scaling when the game runs

    Cheers

    GrumpyOldMan

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

    Default Re: Animations .... what can we do with them?

    Yes, yes, what GrumpyOldMan said. Let's do this experiment
    this coming week. Convert a likely unit, preferably one that
    doesn't use an anim type that you had nonconverting files with.
    (I've had problems with HR_lance and HR_sword due to short
    footers.) Add a tail bone and associated mesh to make a new
    .ms3d file. I'll extend exportskeleton to process a copied directory
    to add in the new bone, quats, and anims. Then let's try using animmerge
    to bring in the walk animation and make the tail wag in Milkshape.

    Then put back in game and just make them walk around to see what happens.

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