Search the Community
Showing results for tags 'facial expressions'.
Found 1 result
-
animation Behind the Artwork Supporter - How to Animate
POLPOX posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
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 Install Blender. Install and enable FHQ Arma Toolbox for Blender, I don't instruct you here. Read some official and/or Blender official documents. Download ArmaRig. 1. Make an RTM Open ArmaRig in Blender. Everything you see in the 3D screen is your action figure. You just need to move, rotate to pose it to your desired pose. Files > Export > Arma 2/3 RTM Animation and save as. 2. Configure 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 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. 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) 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. Paste Arma 3 Samples\Addons\Test_Character_01\model.cfg to your MOD directory. Open Addon Builder and check Binarize. Make sure model.cfg is located in the same directory with Addon source directory. Pack. The RTM has only about 2 KB now, in return, you can't open RTM with OB anymore. 3b. Pack Follow 3a instruction, just ignore every instructions about binarizing. 4. Make a MOD, enable it and enjoy You can use switchMove/playMove/playMoveNow to play animation, playAction/playActionNow to play gesture. How to make a facial expressions aka mimic You need: Blender FaceRig by Macser, modified by POLPOX FHQ Arma Toolbox for Blender Object Builder or Oxygen 2 (Optional) Arma 3 Samples 0. Set up everything 1. Make an RTM Open FaceRig in Blender. Everything you see in the 3D screen is your action figure. You just need to move, rotate to pose it to your desired expression. Files > Export > Arma 2/3 RTM Animation and save as. 2. Open in OB or O2 the RTM and export You need to do this so you can show proper RTM in-game. Open Arma 3 Samples\Addons\TemplateRTM\Male.p3d. Make sure Window > Animations is checked. Right click on the Animations Window and From Matrices, select the RTM. Change the Keyframe time to check the RTM is imported properly. Make sure some of the diamonds around model's head are moved. Right click again on the Window and Export Matrices, and save as an RTM. 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) 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. Paste Arma 3 Samples\Addons\Test_Character_01\model.cfg to your MOD directory. Open Addon Builder and check Binarize. Make sure model.cfg is located in the same directory with Addon source directory. Pack. The RTM has only about 2 or 3 KB now, in return, you can't open RTM with OB anymore. 4b. Pack Follow 4a instruction, just ignore every instructions about binarizing. 5. Make a MOD, enable it and enjoy 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