Page 1 of 2 12 LastLast
Results 1 to 20 of 22

Thread: Importing and exporting animation using Ultimate Unwrap 3D

  1. #1
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Importing and exporting animation using Ultimate Unwrap 3D

    The purpose of this thread is :

    • to describe the organisation of the animation system in ETW ;
    • to explain how to modify .anim files ;


    PART 1 : ETW animation system
    In ETW, NTW and TWS2, animation system is organized in 3 "layers" :

    1. .anim : this is the fundamental layer, these files containing 3d animation data
    2. ....._fragment.txt : animation fragments define several sets of .anim sequences
    3. animation_tables.txt : not a db table but a txt file, animation_tables define animations use in db tables to animate unit and are composed of sets of animation fragments



    A. BASIC COMPONENTS : the .anim file

    .anim files are fundamental component of the animation system.
    These files contain 3d data needed by game engine to animate models.

    .anim files are stored in anim.pack > animations

    It is possible to play animation using Ultimate Unwrap 3D by importing a .anim file when opening an ETW 3d model.



    B. INTERMEDIATE ITEMS : the animation fragment file

    Animation fragments are an intermediate step between the basic .anim files and the complete animations tables.

    Animation fragment files are stored in anim.pack > animation > battleconfiguration

    An animation fragment define coherent sets of animation actions for specific situations such as "bugler", "archer", "man_common", etc.
    Each animation action is composed of a set of .anim files:

    Example : bugler_fragment.txt
    This example is quite simple, as it defines few "action" and doesn't use a lot of variant (..._1, ..._2).
    Code:
    PLAY_INSTRUMENT                        filename = "Animations/MEN/MUSICIAN/BUGLE/Bugle.anim",
    PLAY_INSTRUMENT_TO_STAND            filename = "Animations/MEN/MUSICIAN/BUGLE/Bugle_to_ART.anim",
    STAND_TO_PLAY_INSTRUMENT            filename = "Animations/MEN/MUSICIAN/BUGLE/ART_to_Bugle.anim",
    
    WALK_1                                filename = "Animations/MEN/AXE/AXE_WALK/Axe_walk.anim",                        
    WALK_2                                filename = "Animations/MEN/AXE/AXE_RUN_IR/Axe_run.anim",                            blend_in_time = 0.5
    
    WALK_TRAINED_1                        filename = "Animations/MEN/AXE/AXE_WALK/Axe_walk.anim",
    WALK_TRAINED_2                        filename = "Animations/MEN/AXE/AXE_RUN_IR/Axe_run.anim",                            blend_in_time = 0.5
    
    RUN_TRAINED_1                        filename = "Animations/MEN/AXE/AXE_RUN_IR/Axe_run.anim",                            blend_in_time = 0.5
    
    RUN_1                                filename = "Animations/MEN/AXE/AXE_RUN_IR/Axe_run.anim",                            blend_in_time = 0.5

    C. THE ANIMATIONS TABLES

    Animations tables is a txt file and not a db tables.
    It defines all animations called in db tables to animate model :

    • battle_personalities tables : man_animations_table column ;
    • gun_types tables : gun_animations_table column ;
    • unit_stats_land tables : man_animations_table column ;
    • unit_stats_naval_crew tables : man_animations_table column ;



    Each animation is composed of a set of animation fragments to cover all possible situations.

    Example :

    Code:
    animation_table personality_bugler
    {
        skeleton_type    man
    
        fragment        man_common_fragment
        fragment        swordsman_stab_combat_fragment    default_equipment_display = primary_weapon
        fragment        swordsman_death_fragment
        fragment        swordsman_movement_fragment        default_equipment_display = primary_weapon
        fragment        musician_fragment                default_equipment_display = personal
        fragment        bugler_fragment                    default_equipment_display = personal
        fragment        climb_fragment
    
        fragment        horse_rider_base_fragment        default_equipment_display = primary_weapon, secondary_weapon
        fragment        carbine_horse_rider_fragment    default_equipment_display = primary_weapon, secondary_weapon
        fragment        sabre_horse_rider_fragment        default_equipment_display = primary_weapon, secondary_weapon
    
        mount_table        mount_horse
    }
    Note 1 : campaign agent animations
    Contrary to battle animations, agent animation are defined in :

    • campaign_anim_transitions tables
    • campaign_anims tables


    They have a role similar to animation fragments.

    Campaign animation would likely need its own thread.
    Last edited by lolIsuck; October 28, 2015 at 03:06 PM. Reason: Removed [Tutorial] from title and added prefix.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  2. #2
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: [ANIMATIONS] how to create new animations

    [RESERVED] CAMPAIGN ANIMATIONS


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  3. #3
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: [ANIMATIONS] how to create new animations

    [RESERVED] ANIMATION CONVERSION PROCESS

    IMPORTING AND EXPORTING ANIMATION USING UU3D A. IMPORTING ANIMATION WITHIN MODEL

    TOOL :

    1. Ultimate Unwrap 3D



    PROCESS :

    When opening a .variant_weighted_mesh model using UU3D, modder can import one or more .anim files.
    It is then possible to save the model with animation(s) embedded.



    • step 1 : open .variant_weighted_mesh


      UU3D open the Import Empire: Total War Model windows

    • step 2 : In Import Empire: Total War Model windows, import import .anim file



    • step 3 : select the .anim you want to import :



    • step 3 : model with animation inside open in UU3D

      Click on STOP in animation panel to see animation.
      Click on the picture and use right / left or up / down arrow to play animation frame per frame.
      Click on PLAY to play animation.







    B. EXPORTING ANIMATION

    TOOL :

    1. Ultimate Unwrap 3D



    PROCESS :

    UU3D allow to export .anim file from model when saving it to .variant_weighted_mesh file format.
    A new .anim is then created.




    • open you model with animation embedded
    • save it using the ETW plugin (save it as .variant_weighted_mesh)

      UU3D open the Export Empire: Total War Model window
    • In Export Empire: Total War Model windows, check "EXPORT ANIMATION"

      Depending of file type, you can also have to check "TRANSFORM VERTICES TO REST POSE" (eg. the T-pose] to avoid some bugs)
    • UU3D create two files : .variant_weighted_mesh (3d model) and a blank.anim (animation)




    CONVERSION PROCESS : UU3D & MILKSHAPE (.MS3D) CONVERTING TO AND FROM MILKSHAPE

    TOOL :

    1. MilkShape
      MilkShape allow to modify animation, even if being a very basic and limited tool.
      Convertion to and from .ms3d file format work fine.
    2. Ultimate Unwrap 3D
      UU3D is used as converter.



    PROCESS :


    Example : basic animation for bagpiper
    Standing to bagpiping / Bagpiping / bagpiping to standing




    CONVERSION PROCESS : UU3D & .FBX FILE FORMAT CONVERTING TO AND FROM 3DS MAX

    TOOL :

    1. Ultimate Unwrap 3D
      UU3D is used as converter.
      Make sure to use the latest ETW plugin for Ultimate Unwrap 3D.
    2. 3ds Max
      3ds max allow to modify animation in a more easy and complete way than Milkshape.
      It is also possible to then use Motion Builder to work on animations.
      Convertion to and from .ms3d file format work fine.


    PROCESS :


    • STEP 1 : opening the east_guard_cavalry_ahadis and importing c_axe_charge_attack animation using UU3D



    • STEP 2 : saving model and animation as .fbx file



    • STEP 3 : opening the .fbx model

    • STEP 4 : removing extra bones up to create a "clean" model



    • STEP 5 : saving the "clean" model as .variant_weighted_mesh and exporting .anim

      UU3D create 2 files :
      • model : .variant_weighted_mesh
      • animation : .anim
        This file is named from the animation.
        You can edit animation name :
        • Go to ANIMATION > EDITOR...
          The Animation Editor windows will appear :
        • Select animation and then click on EDIT button

          The Edit Animation windows will appear :
        • change name and click on APPLY button





    CONVERSION PROCESS : UU3D & .DAE FILE FORMAT

    TOOL :

    1. Ultimate Unwrap 3D
      UU3D is used as converter.
      Make sure to use the latest ETW plugin for Ultimate Unwrap 3D.
    2. Blender
      Like 3ds Max, Blender allow to create or modify animations.
    3. 3ds Max
      3ds max allow to modify animation in a more easy and complete way than Milkshape.
      It is also possible to then use Motion Builder to work on animations.
      Convertion to and from .ms3d file format work fine.


    PROCESS :



    • STEP 1 : same as above

    • STEP2 : saving model and animation as .dae file



    • STEP 3 : opening the new .dae model



    • STEP 4 : removing extra bones up to create a "clean" model



    • STEP 5 : saving the "clean" model as .variant_weighted_mesh and exporting .anim


    Last edited by wangrin; October 28, 2015 at 02:38 PM.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  4. #4
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: [ANIMATIONS] how to create new animations

    Right now, if converting to and from .ms3d work fine, I still have issues when converting from .fbx and .dae file formats.

    Something goes wrong and model as well as animation are corrupted.


    PROCESS :



    • step 1 : importing animation in an ETW model
    • step 2 : saving model with animation embedded as .fbx (2012)


    Now, opening the .fbx model, we can see that something goes wrong during conversion :
    • T-pose disappeared
    • Skeleton has been modified : new bones appeared (name as mesh group), new main bone (UU3DRoot)



    Result is the same using other options in Save Autodesk FBX 2012 Model window :
    Last edited by wangrin; October 25, 2015 at 07:11 AM.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  5. #5

    Default Re: [ANIMATIONS] how to create new animations

    That's what the Transform vertices to rest pose option is for. Saving to another format like FBX,DAE may transform your model's vertices to something other than the original T-pose. Check this option to transform them back to T-pose.

    And saving to another format like FBX,DAE may add new bones. These new bones must be removed before exporting to ETW. But, it is easy to remove them. Just drag and drop everything below UU3DRoot up one level and delete UU3DRoot.

  6. #6
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: [ANIMATIONS] how to create new animations

    Of course it is easy to remove extra joints created during conversion.
    But I didn't understand why the converter create them.

    I've also use this option but the result was strange.

    I will post a more complete and detailed post about tests and results.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  7. #7

    Default Re: [ANIMATIONS] how to create new animations

    The FBX,DAE exporter may add a new bone on export to ensure that the root bone is always identity. Some game engines may use the root bone transform for special purposes, like using the translation part for walk animations. Perhaps it should be an option, but that is the default behavior at the moment.

    And you should not get strange results if you follow the basic guidelines before export (e.g. all vertices should be assigned, don't add or delete bones, etc...).

  8. #8

    Default Re: [ANIMATIONS] how to create new animations

    Adding a root bone serves two purposes:
    1. It insures the root transform is always identity. Root translation and rotation will be zero.
    2. It insures that there is only one root. Having multiple roots may cause problems with some game engines. They might treat it as having multiple skeletons.

  9. #9

    Default Re: [ANIMATIONS] how to create new animations

    btw, do I have to have a certain number of posts before I can edit my posts? I cannot edit my posts. It would be easier for me to edit them, rather than add a new one.

  10. #10

    Default Re: [ANIMATIONS] how to create new animations

    Quote Originally Posted by samsonite View Post
    btw, do I have to have a certain number of posts before I can edit my posts? I cannot edit my posts. It would be easier for me to edit them, rather than add a new one.

    Ah, nevermind, I found the limit to be 25 posts.

  11. #11

    Default Re: [ANIMATIONS] how to create new animations

    BTW, you should also pay attention to the handedness of the model, just in case if it was flipped coming from MS3D or elsewhere.

    One way to determine handedness is to take note which way the model is pointing, in either the Z+ or Z- direction. The UU3D exporter expects your model to point in the Z+ direction. Which is exactly how it appears when an original ETW model is loaded.

    And your mesh should be perfectly aligned with your skeleton too, when facing this Z+ direction.

  12. #12
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: [ANIMATIONS] how to create new animations

    Yes, I always avoid to mix model converted using KE converter and UU3D.


    In the example below I used :

    • east_guard_cavalry_ahadis_lod1.variant_weighted_mesh model from vanilla ETW
    • c_axe_charge_attack.anim animation from vanilla ETW



    STEP 1 : opening the east_guard_cavalry_ahadis and importing c_axe_charge_attack animation using UU3D




    STEP 2 : saving model and animation as .fbx file



    First issue : if animation play, it seems that skin modifier is gone...



    After starting over the same processus, I can animate model :



    So, it was probably a bug.


    STEP 3 : removing extra bones up to create a "clean" model




    STEP 4 : saving the "clean" model as .variant_weighted_mesh and exporting .anim



    The new .variant_weighted_mesh model look "bug free" after testing it with the c_axe_charge_attack anim from vanilla ETW



    Then, testing the exported animation (TEST_c_axe_charge_attack), something goes wrong :



    It look like skeleton was flipped


    EDIT : I've tried to flip scene, but with no results


    • Test 1 : .variant_weighted mesh > flip scene > convert to .fbx > .fbx > cleaning model > convert to .variant_weighted_mesh : animation corrupted
    • Test 2 : .variant_weighted mesh > convert to .fbx > .fbx > cleaning model > flip scene > convert to .variant_weighted_mesh : animation corrupted
    • Test 3 : .variant_weighted mesh > flip scene > convert to .fbx > .fbx > cleaning model > flip scene > convert to .variant_weighted_mesh : animation corrupted
    Last edited by wangrin; October 27, 2015 at 03:31 PM.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  13. #13

    Default Re: [ANIMATIONS] how to create new animations using UU3D as converter

    Thanks for the feedback. Try out the new ETW plugin. It should be fixed now.

    Try this:
    1. Import original ETW model with original animation.
    2. Export to FBX.
    3. Import back into UU3D.
    4. Delete any added bones. Bone count should be 41.
    5. Export to ETW. Check both export options.
    6. Import new ETW model with new ETW animation back into UU3D.
    7. Animation should play as expected.

    BTW, there's no need to flip the scene. That's only necessary if the ETW model was exported from MS3D.

  14. #14

    Default Re: [ANIMATIONS] how to create new animations using UU3D as converter

    BTW, when exporting a new ETW model with a new animation, it's best to write it to an empty folder. If you try to write it to the same directory, it may overwrite your old animation, as it has the same filename.

  15. #15
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: [ANIMATIONS] how to create new animations using UU3D as converter

    Tested and approved

    Now animation export work fine.
    Thank you very very much, being able to use 3ds Max to work on animation open new possibilities.

    OP updated.
    I will test with .dae file format and then ask to move the thread to Tools, Tutorials and Resources subforum.

    EDIT : work fine with .dae too.
    Last edited by wangrin; October 28, 2015 at 02:00 PM.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  16. #16
    Primergy's Avatar Protector of the Union
    Join Date
    Mar 2009
    Location
    Augsburg
    Posts
    2,487

    Default Re: Importing and exporting animation using Ultimate Unwrap 3D

    Yes, it works!

  17. #17

    Default Re: Importing and exporting animation using Ultimate Unwrap 3D

    Very nice tutorial, thank you. I was saving some money to buy UU3D and I finally did it! One thing that I wanted to ask you: about the "special" parameter used in the fragments. We see the musket_ramrod for example, which is defined inside the equipment model, in NTW is variant_part_mesh (mesh, mesh2). Is it defined somewhere else? or is this "special" item used during animations just defined inside the fragment file? Because I tried with other items from the equipment mesh file, but it doesnt work.

    It always pops up an error message like this:


  18. #18
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: Importing and exporting animation using Ultimate Unwrap 3D

    I'm not sure to understand the problem.

    When looking at "musket_fragment", we can read a reference to "musket_ramrod"
    Code:
    RELOAD_1                            filename = "Animations/MEN/MUSKET/MUS_POISED/MUS_Reload_01.anim",                                special = musket_ramrod
    RELOAD_2                            filename = "Animations/MEN/MUSKET/MUS_POISED/MUS_Reload_02.anim",                                special = musket_ramrod
    Equipment is "rigid_equip_gen_musket_ramrod01"
    But "musket_ramrod" is defined in "warscape_equipment_items" db tables as "equipment_key".
    It is the same with "grenade"
    Code:
    GRENADIER                            filename = "Animations/MEN/MUSKET/MUS_GRENADIER/MUS_GRENADIER.anim",                        blend_in_time = 0.1             special = grenade

    but not for all "special" option we can find other fragments :
    Code:
    CHARGE                                filename = "Animations/MEN/SABRE/SAB_CHARGE/SAB_Charge.anim",                                      blend_in_time = 0.5, primary_weapon = on, personal = off
    
    RIDER_ATTACK_1                                filename = "Animations/MEN/HORSE_RIDER/C_LAN/C_LAN_LG_Thrust_Level.anim",         blend_in_time = 0.25        equipment_usage = lance
    
    SMASH_WINDOW                        filename = "Animations/MEN/MUSKET/MUS_UNIQUE_ACTIONS/MUS_Window_Butt_Bash.anim",                            equipment_usage = rifle_butt
    
    ATTACK_1                            filename = "Animations/MEN/SABRE/SAB_MG_STAB_KILLS/SAB_MG_STAB_KILL_01.anim",             primary_weapon = off, secondary_weapon = on            equipment_usage = sword    
    ATTACK_1                            filename = "Animations/MEN/MUSKET/MUS_HG_KILLS/MUS-HG_KILL_HIGH_01.anim",                   equipment_usage = rifle_bayonet
    ATTACK_1                            filename = "Animations/MEN/AXE/AXE_Outside_Guard/Axe_OGuard_Cut_1.anim",                                            equipment_usage = axe
    
    DEPLOY_WOODEN_STAKES      filename = "Animations/MEN/SABRE/SAB_UNIQUE_ACTIONS/SAB_STAKE_PLANT.anim",                 blend_in_time = 0.25    primary_weapon = on, secondary_weapon = off, defensive = off, ambient = on, personal = off,    special = wooden_stake
    
    STAND_FOR_STOKE_TO_STOKE                    filename = "Animations/MEN/ARTILLERY/ART_GUNNER/ART_RStand_to_Stoke.anim",            special = cannon_ramrod
    
    LOAD_CANNON                      filename = "Animations/MEN/ARTILLERY/ART_GUNNER/ART_Load_Cannon.anim",                         special = cannon_ball
    
    LOAD_ROCKET                      filename = "Animations/MEN/ARTILLERY/ART_ROCKET/ART_Load_Rocket.anim",                          special = rocket
    
    WALK_1                               filename = "Animations/MEN/ARCHER/ARC_WALK/ARC_walk.anim",                                           special = arrow_man
    special : arrow_man / cannon_ramrod / cannon_ball / grenade / musket_ramrod / rocket
    equipment_usage : axe / lance / rifle_bayonet / rifle_butt / sword

    So, special look like being warscape_equipment_items, but arrow_man isn't.
    So, I'm unsure to know how and where CA defined these data
    Last edited by wangrin; December 15, 2015 at 12:55 PM.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  19. #19

    Default Re: Importing and exporting animation using Ultimate Unwrap 3D

    The problem is that I tried some entries from the equipment tables, as you say, and none worked except the ones you mentioned. With musket_ramrod no problem, with my custom model, properly defined, the game wont recognize it. Same with, for example, euro_knife as I stated above, which has been defined by CA. So... hardcoded maybe? I sure hope not, but it looks that way and it sucks.

  20. #20

    Default Re: Importing and exporting animation using Ultimate Unwrap 3D

    I need help and advice. I created a new standard bearer for FOTS and animated it in 3DSMax 2010 (with cloth and wind force). I already know how to implement an equipment in game (with BOB). But how can I implement that new animation in game?. Is there any possibility to do it with assembly kit (if yes, how? if no, how?)? Can you explain what the steps are. I will really appreciate it?
    I created a new model standard bearer from scratch + new animation (wind), I didn't use any FOTS animation.
    Greets,
    izzi

Page 1 of 2 12 LastLast

Posting Permissions

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