Results 1 to 12 of 12

Thread: Milkshape Fun: Speeding up animations and viewing vertex normals

  1. #1
    KnightErrant's Avatar Decanus
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    578

    Default Milkshape Fun: Speeding up animations and viewing vertex normals

    I found a couple of fun toys in Milkshape this morning while actually
    looking for something else. People have been wanting to speed up
    animations so I had made a SLERP animation tool that some people
    have tried out. However, it seems that Milkshape already has this
    tool. Load up an animated .ms3d file and then go to menu item
    Tools->Scale Animation. It's about midway down like in the picture:



    The interface is about as minimal as you can get:



    It displays the current number of frames so put in something smaller to
    speed up the animation or something bigger to slow it down. I'm assuming
    it does Spherical Linear Interpolation (SLERP) on the quaternions and
    regular linear interpolation on the position animations.

    Main warning: only do this OUTSIDE the keyframer. If you do it in the
    keyframer you get something scary like this:



    If you accidentally do it anyway, go to Edit->Undo Scale Animation to recover.

    Other things to know when speeding up animations.

    Down-sampling or reducing the number of frames destroys information.
    So if you down-sample and don't like the results, do Edit->Undo Scale Animation
    to go back to the original data, don't up-sample it.

    If you want to speed up a fight animation, first go to descr_skeleton.txt
    and find its entry and take note of what it has for an impact frame.
    That's the command line switch -if: followed by a number. This is how
    the game choreographs your guy's fighting anim to the reaction of your
    opponent. If you don't do this then you'll chop a guy down but he
    won't react until 10 frames later. With numbers, if you have a 31 frame
    fight animation with an impact frame at 20, and you change it to a
    21 frame animation, the new impact frame should be around 20*21/31
    or roughly frame 14.


    The other fun toy is the Selection Editor. I haven't decided what it is
    actually supposed to be used for but it displays vertex normals.
    If you have a lighting seam like this:



    You can see the vertex normals causing this using the Selection Editor.
    Go to Tools->Selection Editor. Then click Ok on the first "Release Notes"
    dialog and No on the "Create Shortcut" dialog and you get to the editor.
    There's a row of buttons so hover over the last button on the right,
    it should say "Normals". Click it and it displays the vertex normals for
    the model.



    There's actually two coincident vertex vectors all across the head and
    they have normals pointing in different directions. Lighting is controlled
    by the dot product of the lighting vector into the normal vector so you
    get a jump in the illuminance across the seam.

  2. #2

    Default Re: Milkshape Fun: Speeding up animations and viewing vertex normals

    Nice finds KE!

    The Selection Editor in particular seems interesting :hmmm:

  3. #3

    Default Re: Milkshape Fun: Speeding up animations and viewing vertex normals

    nice, i need to try that out then

  4. #4
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Milkshape Fun: Speeding up animations and viewing vertex normals

    I can't get Scale Animation to work. If I do it while "Animate" is pressed, it produces messed up skeleton results. If I do it while Animate is unpressed, it merely cuts off the animation without actually scaling it any.

    Also KE, could you change the dialog boxes so that the program doesn't quit whenever you press Cancel...

    PS. Animextract does not work on the 4bones version. Not sure why that is. Also when extracting, it gives a completely separate .cas name... strange.
    Last edited by SigniferOne; August 19, 2008 at 01:59 AM.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  5. #5

    Default Re: Milkshape Fun: Speeding up animations and viewing vertex normals

    I did scale my skeleton with the "scale all" but i have´t try it out in game maybe this is of help!!
    Contribuitor IBIICB-WOTN-Modeler-Scripter


  6. #6
    KnightErrant's Avatar Decanus
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    578

    Default Re: Milkshape Fun: Speeding up animations and viewing vertex normals

    @SigniferOne
    Hmmm, I tried it out again today and it does work for me. I took a 29
    frame anim down to 9 and I do get the full animation, just very, very
    fast. It does have some bugs though. Definitely, DON'T use it from the
    keyframer, that was my main warning, you get horribly messed up
    animations, probably because it uses the current frame as the basepose
    to interpolate from. Also, Edit->Undo Scale Animation doesn't reset
    the max frames back to the original value so the animation cuts off.
    You have to remember what the original max frames value was and
    manually reset it; not a good user interface detail.

    I did remember your suggestion about not killing the script when you
    cancel out of a File Chooser, and I put it into every utility so now you
    just revert to the main dialog of GOAT. I don't know if every user will
    want this, but I've also included a goat.ini file so users can configure
    where the File Choosers will open. Basically it's just a simple text file
    like this:

    Code:
    # ===================================================================================
    #                            goat.ini                                               |
    # ===================================================================================
    #                                                                                   |
    #    Initialization file for the Game Object Application Toolbox.                   |
    #                                                                                   |
    # Set your preferred directories here for your models (.mesh and .ms3d files),      |
    # animations (.cas files, usually Caliban's animations directory is a good choice), |
    # and RTW raw format .cas animation files.                                          |
    #                                                                                   |
    # Handy Tip:  Set multiple directories for each type and simply comment out the     |
    #             ones not needed at the present time.  NOTE: Only the last entry       |
    #             processed will be valid; cannot have multiple modeldir etc. defined.  |
    #                                                                                   |
    # ===================================================================================
    modeldir                = C:\sys\downloads\medievalII\meshreader_w2h_723\3dmaxscript\ObjectClasses\jpgsforMonkwarrior      
    casdir                  = C:\sys\downloads\medievalII\calibansfiles\animations
    RTWcasdir               = C:\sys\downloads\medievalII\meshreader_w2h_723\3dmaxscript\EBstuff\animations
    You set modeldir to the full path to where your .ms3d models are, casdir
    to Caliban's animation directory, and, if you do anything with RTW raw
    animations, you can set RTWcasdir to that. This way instead of always
    opening in the current working directory where you put the script, it will
    open in your model directory when the script is looking for a .ms3d file
    or in your cas directory when the script is looking for a .cas file.
    Eliminates a lot of mousing around when navigating. Also, you can put
    in multiple directories and just comment them in and out as you change
    what directory you want to work in.

    I'll send the update along to try out, but I'll check on the 4 bones
    animation first to see what's going on there.

  7. #7

    Default Re: Milkshape Fun: Speeding up animations and viewing vertex normals

    I wonder if theres anyway at all this would be applicable to shogun 2.

    I dont think we have the same system in place with impact frames, at least if we do, im clueless as to how it all works.

    Any1 gets any ideas, lmk pls as i need this for continuing my ROTK mod

  8. #8

    Default Re: Milkshape Fun: Speeding up animations and viewing vertex normals

    I remembered once I tried to do some modding on Shogun 2 (which is by far the best game of the TW series!), but it was so blocked and hardcoded, that I immediately gave up ahah

    In any case, I don't think either the frames or the animations are compatible at all, too many years of distance between the two games, but who knows.....


  9. #9

    Default Re: Milkshape Fun: Speeding up animations and viewing vertex normals

    thanks for your reply,

    I've gotten some animation files open in 3ds max
    Spoiler Alert, click show to read: 


    how they work and come together is beyond me. Where that is coded idk.

    In shogun there is an animation table which is a text file that sets up animation themes for a unit

    so like katana_samurai are set up like this
    Spoiler Alert, click show to read: 
    nimation_table shogun_man_katana{
    skeleton_type man_shogun


    fragment shogun_man_unarmed_fragment
    fragment shogun_man_katana_fragment default_equipment_display = primary_weapon, ambient
    fragment shogun_man_katana_combat_fragment default_equipment_display = primary_weapon, ambient

    fragment shogun_horse_rider_fragment default_equipment_display = primary_weapon, ambient
    fragment shogun_horse_rider_katana_combat_fragment default_equipment_display = primary_weapon, ambient


    mount_table shogun_mount_horse_katana
    }


    Then there are more text files for
    shogun_man_katana_fragment
    shogun_man_katana_combat_fragment
    etc


    Then you go find these text files and it has long lists of what animations it uses with the only value can edit time wise called Blend_time=X , the values seem to do nothing IG.

    So how everything comes together idk... id sure like to figure out though.. bet its something hard coded I hate watching two troops just stare at eachother though and think about attacking for 5 seconds.. lol
    Last edited by Havie; July 11, 2017 at 10:00 PM.

  10. #10

    Default Re: Milkshape Fun: Speeding up animations and viewing vertex normals

    mmh, the fact that you got access to the animations in 3ds max is interesting, but I suspect there is no way to translate the new coding language (of Shogun) to the old one (of Medieval). Really, would be interesting to go deeper in this, but I suspect it's too hardcoded.

    No clear idea about how to figure it out, but maybe something could be done, don't know


  11. #11

    Default Re: Milkshape Fun: Speeding up animations and viewing vertex normals

    Yeah if anyone thinks of anything you can PM me,
    Otherwise my exploration of the shogun2 animation files continues here:
    http://www.twcenter.net/forums/showt...2#post15361262

  12. #12

    Default Re: Milkshape Fun: Speeding up animations and viewing vertex normals

    Nicee, I'll watch the thread closely (Shogun II is always in my special box, ready to be played again )


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •