Jump to content
POLPOX

Behind the Artwork Supporter - How to Animate

Recommended Posts

Welcome to the tutorial of Artwork Supporter, this is where you need to look at make static animations and its configurations.

You can also find FaceRig to make facial expressions!


Useful links also:

https://community.bistudio.com/wiki/CfgMoves_Config_Reference

 

Disclaimer: this is NOT a turorial for user, but third-party developers.

Requites some basic configuration and Blender knowledge to understand these informations.

 

How to make a static animation and/or gesture

You need:

  •  Blender
  •  ArmaRig by Macser
  •  FHQ Arma Toolbox for Blender by Alwarren
  •  (Optional) Arma 3 Tools
  •  (Optional) Arma 3 Samples

 

0. Set up everything

  1. Install Blender.
  2. Install and enable FHQ Arma Toolbox for Blender, I don't instruct you here. Read some official and/or Blender official documents.
  3. Download ArmaRig.

 

1. Make an RTM

  1. Open ArmaRig in Blender.
  2. Everything you see in the 3D screen is your action figure. You just need to move, rotate to pose it to your desired pose.
  3. Files > Export > Arma 2/3 RTM Animation and save as.

 

2. Configure

  1. Configure. More informations stated below.

 

To make an animation:
You need to modify CfgMovesMaleSdr. This is the (my) basic config.

class CfgMovesBasic;
class CfgMovesMaleSdr: CfgMovesBasic
{
    class States
    {
        class AmovPercMstpSnonWnonDnon;
        class YourAwesomeStaticAnim: AmovPercMstpSnonWnonDnon
        {
            actions = "NoActions"; //You always need this to prevent animation related problem
            speed = 1e+010; //speed = n; means the animation will take 1/n seconds to play
            connectTo[] = {}; //Defines next animation to play, should nothing when is static and not intended to use in actual gameplay
            interpolateTo[] = {}; //Same
            aiming = "empty"; //Currently I suggest you to keep "empty" here
            head = "empty"; //Same
            canReload = 1; //If is 1 the animation can reload
            file = "Path\to\your\awesome\static\anim.rtm";
        };
    };
};


Optional configurations:

/* To make fire-able */
canPullTrigger = 1; //Put his finger to trigger
disableWeapons = 0; //Declares anim can fire or not, 0 to open fire
disableWeaponsLong = 0; //Same, what's difference BTW?
weaponLowered = 0; //I believe this does not so much but I put

/* Weapon IK */
//Weapon IK, or Inverse Kinematics is a technology to fit units' hands/arms to weapon dynamically. This won't do any when the weapon has no such config and animation.
weaponIK = 1; //Defines what weapon to fit hands, 0 is none, 1 is rifle, 2 is pistol (HIGHLY not recommend to use) and 4 is launcher
rightHandIKCurve[] = {1}; //{1} to fit hand to weapon, {0} to leave hand to animation. {0.6} to blend IK:non-IK(FK) 6:4.
leftHandIKCurve[] = {1}; //Same but for left hand

/* Show optional things */
showHandgun = 1; //1 to show pistol to their right hand, 0 to hide and/or to their holster if the vest has one
showItemInHand = 1; //1 to show binoculars to left hand
//Note: you can't move pistol/binoculars to somewhere other than their pre-defined position, pistol is always sticked to their right hand, same goes for binoculars

dgFs89d.jpg?1
weaponIK example with the same RTM, left to right, {0}, {0.5} and {1}, note these hands.

 

You also can make a macro to re-use same configurations. If you've enough knowledge though.

My customized macros:

#define    StaticBase \
    actions = "NoActions";\
    speed = 1e+010;\
    connectTo[] = {};\
    interpolateTo[] = {};\
    aiming = "empty";\
    head = "empty";\
    canReload = 1;\
    
#define    EnableFireBase \
    canPullTrigger = 1;\
    disableWeapons = 0;\
    disableWeaponsLong = 0;\
    weaponLowered = 0;\
    
#define    IKBase(Wpn,Right,Left) \
    weaponIK = Wpn;\
    rightHandIKCurve[] = {Right};\
    leftHandIKCurve[] = {Left};\

To make a gesture:
The basic principle is the same with CfgMovesMaleSdr but little complicated-er. You need to modify CfgMovesBasic and CfgGesturesMale. This is the (my) basic config.

class CfgMovesBasic
{
    class ManActions
    {
        YourAwesomeGesture[] = {"YourAwesomeGesture","Gesture"};
    };
};
class CfgGesturesMale
{
    class Default;
    class States
    {
        class YourAwesomeGesture: Default
        {
            looped = 1; //Recommend to 1
            speed = 1e-010;
            connectTo[] = {};
            interpolateTo[] = {};
            aiming = "empty";
            head = "empty";
            canReload = 1;
            file = "Path\to\your\awesome\gesture.rtm";
            mask = "leftHand"; //The most complicated and important thing is here... More informations stated below
        };
    };
};

mask can be anything in configFile >> "CfgGesturesMale" >> "BlendAnims". In this case,

leftHand[] = {"LeftShoulder",0.3,"LeftArm",1,"LeftArmRoll",1,"LeftForeArm",1,"LeftForeArmRoll",1,"LeftHand",1,"LeftHandRing",1,"LeftHandPinky1",1,"LeftHandPinky2",1,"LeftHandPinky3",1,"LeftHandRing1",1,"LeftHandRing2",1,"LeftHandRing3",1,"LeftHandMiddle1",1,"LeftHandMiddle2",1,"LeftHandMiddle3",1,"LeftHandIndex1",1,"LeftHandIndex2",1,"LeftHandIndex3",1,"LeftHandThumb1",1,"LeftHandThumb2",1,"LeftHandThumb3",1};


Will be applied to the RTM. And this means, "LeftShoulder" bone applies the RTM 30%, "LeftArm" bone applies the RTM 100%, and so on.
You also can make your own mask.

vopU2TF.jpg
Left to right, base animation, gesture animation and the result with mask = "leftHand".

 

It won't work unless both of CfgMovesBasic and CfgGesturesMale are configurated properly the same time to make a gesture.

 

My customized macros:

#define    StaticBase \
    looped = 1;\
    speed = 1e-010;\
    connectTo[] = {};\
    interpolateTo[] = {};\
    aiming = "empty";\
    head = "empty";\
    canReload = 1;\
    
#define    DisableFireBase \
    canPullTrigger = 0;\
    disableWeapons = 1;\
    disableWeaponsLong = 1;\
    weaponLowered = 1;\
    
#define    EnableFireBase \
    canPullTrigger = 1;\
    disableWeapons = 0;\
    disableWeaponsLong = 0;\
    weaponLowered = 0;\
    
#define    IKBase(Wpn,Right,Left) \
    weaponIK = Wpn;\
    rightHandIKCurve[] = {Right};\
    leftHandIKCurve[] = {Left};\
    
#define    IKLeft(value) \
    leftHandIKCurve[] = {value};\
    
#define    IKRight(value) \
    rightHandIKCurve[] = {value};\
    
#define    ActionsBase(Name) Name[] = {Name,"Gesture"};

3a. Pack and Binarize RTM (Optional)

  1. 13 KB is large enough if you're about to make an PBO with a lot of RTMs. You can binarize them to reduce file size.
  2. Paste Arma 3 Samples\Addons\Test_Character_01\model.cfg to your MOD directory.
  3. Open Addon Builder and check Binarize. Make sure model.cfg is located in the same directory with Addon source directory.
  4. Pack.
  5. The RTM has only about 2 KB now, in return, you can't open RTM with OB anymore.

 

3b. Pack

  1. Follow 3a instruction, just ignore every instructions about binarizing.

 

4. Make a MOD, enable it and enjoy

  1. You can use switchMove/playMove/playMoveNow to play animation, playAction/playActionNow to play gesture.

 

How to make a facial expressions aka mimic

You need:

0. Set up everything

 

1. Make an RTM

  1. Open FaceRig in Blender.
  2. Everything you see in the 3D screen is your action figure. You just need to move, rotate to pose it to your desired expression.
  3. Files > Export > Arma 2/3 RTM Animation and save as.

 

2. Open in OB or O2 the RTM and export

  1. You need to do this so you can show proper RTM in-game.
  2. Open Arma 3 Samples\Addons\TemplateRTM\Male.p3d.
  3. Make sure Window > Animations is checked.
  4. Right click on the Animations Window and From Matrices, select the RTM.
  5. Change the Keyframe time to check the RTM is imported properly. Make sure some of the diamonds around model's head are moved.
  6. Right click again on the Window and Export Matrices, and save as an RTM.
  7. You have a proper RTM which has about 33 KB now.

 

3. Configure

You need to modify CfgHeads. This is the (my) basic config.

class MaskFace_A3;
class LipMask_A3;
class CfgHeads
{
    class Default_A3
    {
        class Grimaces
        {
            class RTM_Face;
            class YourAwesomeMimicFace: RTM_Face
            {
                anims[] = {"Path\to\your\awesome\mimic.rtm",1};
                animsAI[] = {"Path\to\your\awesome\mimic.rtm",1};
            };
            class YourAwesomeMimic
            {
                type = "compound";
                class Items
                {
                    class YourAwesomeMimicFace: MaskFace_A3{};
                    class Lipsync: LipMask_A3{};
                };
            };
        };
    };
};

You don't need to configure a lot. In this case, you can use YourAwesomeMimic as a your custom mimic entry now.
Make sure both of configFile >> "CfgHeads" >> "Default_A3" >> "Grimaces" >> X and configFile >> "CfgHeads" >> "Default_A3" >> "Grimaces" >> Y >> X have the same name.

My custom macros:

#define MimicBase(MimicName,MimicRTMPath)\
    class ##MimicName##Face: RTM_Face\
    {\
        anims[] = {##MimicRTMPath##,1};\
        animsAI[] = {##MimicRTMPath##,1};\
    };\
    class ##MimicName##\
    {\
        type = "compound";\
        class Items\
        {\
            class ##MimicName##Face: MaskFace_A3{};\
            class Lipsync: LipMask_A3{};\
        };\
    };

4a. Pack and Binarize RTM (Optional)

  1. 33 KB is large enough if you're about to make an PBO with a lot of RTMs. You can binarize them to reduce file size.
  2. Paste Arma 3 Samples\Addons\Test_Character_01\model.cfg to your MOD directory.
  3. Open Addon Builder and check Binarize. Make sure model.cfg is located in the same directory with Addon source directory.
  4. Pack.
  5. The RTM has only about 2 or 3 KB now, in return, you can't open RTM with OB anymore.

 

4b. Pack

  1. Follow 4a instruction, just ignore every instructions about binarizing.

 

5. Make a MOD, enable it and enjoy

  1. You can use setMimic to change facial expression. Note that, setMimic only accepts lower cases.

 

That's mostly all to animate so far.

 

Special thanks: racdenis, Macser

  • Like 9
  • Thanks 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×