Jump to content
smookie

Animation - explanation of the magic behind

Recommended Posts

Having received a lot of PMs regarding setting up animations, I decided to start up this thread to try and explain all the magic stuff behind it. I will try to keep this post updated with all the variables and examples but I would prefer being asked questions here in public so that i can explain each of them. This is something I do in my spare time so please bear with me if I dont reply instantly, thank you :)

For starters:

1. Configuring animation

Lets say we have an animation that begins in Default Weapon Raised Standing position (the one you enter game when placing soldier in editor). Its an anim of holding rifle with one hand with the other hanging on the side. You are able to shoot in this position. It lasts for 5 seconds and returns to default pose.

config.cpp

.
class CfgMovesBasic; // Reference CfgMovesBasic. This class is used by ArmA3 to store Actionsets, which will be covered at later time
class CfgMovesMaleSdr: CfgMovesBasic // Override CfgMovesMaleSdr class in which all animation states and gestures are stored. You can also make your own class but you need to make sure your unit will be using it. . Usually leave as is.
{
skeletonName="OFP2_ManSkeleton"; // Skeleton indication. If you are doing animations for a T-rex, you will obviously use your custom skeleton for all moves. . Usually leave as is.
gestures="CfgGesturesMale"; // Gestures class. Again, if you are using custom class, change it. Usually leave as is.
class States
{
	class AmovPercMstpSrasWrflDnon;
	class MyAnimation : AmovPercMstpSrasWrflDnon
	{
		looped = 0; // if set to 1, engine will copy first keyframe to last keyframe, resulting in more "looped" motion. for non looping movement, ALWAYS DISABLE
		speed = -5; // if speed is entered as positive number, it will mean it will last for 1/speed seconds (if 0.25, it will last for 4s). You can use negative number to indicate how many seconds should it last, in this example -5 will make it last 5 seconds
		file = "\myAddons\myAnimation"; // path to animation file. may or may not end with ".rtm", there is no difference
		canBlendStep = 0; // sliding effect on/off, we set it to off because we do not want character to move/slide in this move
		minPlayTime= 0.95; // the ratio of animation that is required to play, in this example: 95% of animation must be played before it can be interrupted 
// Interpolation - smooth blending to another state. We use it usually when we know that last keyframe is different to first keyframe of the target animation. If they are the same, use ConnectTo[] instead.
		InterpolateTo[] = 
			{
				"AmovPercMstpSrasWrflDnon", 0.5  
// First string is the class name of target animation, in this example this is default rifle standing pose. The number that follows is animation cost -> the engine will always look for the next target animation with smallest cost if there is more than one chain leading towards called action [again, actions will be explained later]
// You can ignore the number (enter any float you want from 0 to 1) if: 
/// there is only one way leading to target action
/// there is no animation chain involved
			};
	}
}
}     

Variables

  • file [values: any | string] - path to animation file. may or may not end with ".rtm", there is no difference
  • looped [values: 0,1 | integer] - if set to 1, engine will copy first keyframe to last keyframe, resulting in more "looped" motion. for non looping movement, ALWAYS DISABLE
  • speed [values: (-inf, inf) | float] - if speed is entered as positive number, it will mean it will last for 1/speed seconds (if 0.25, it will last for 4s). You can use negative number to indicate how many seconds should it last, in this example -5 will make it last 5 seconds
  • canBlendStep [values: 0,1 | integer] - sliding effect on/off
  • minPlayTime [values: <0,1> | float] - the ratio of animation that is required to play before it can be interrupted

Arrays

  • InterpolateTo[] [values: alternating "String", float+] - smooth blending to another state. First string is the class name of target animation, in this example this is default rifle standing pose. The number that follows is animation cost -> the engine will always look for the next target animation with smallest cost if there is more than one chain leading towards called action. You can ignore it unless you are working towards improving connection between states that are links away in the chain

Please post your questions below. I will try to explain all the variables, arrays and problems as soon as possible. Good luck :)

Edited by Smookie
  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

sticky topic ...

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for starting this topic and providing a little bit of explanation for the back-end of animations Smookie!

I have a more specific question regarding this subject, is there any way to prevent IK animations for handAnim? I'm aware we can force RTM specified via Blending values for gestures, but being able to do the same for handAnim would be wonderful.

An example of a problem I've encountered: I've set a custom hand/arm position for a unique weapon, it require the elbows and arm to shift outward a bit to look natural.

The handAnim IK just finds the shortest route between the shoulder and hand, resulting in a broken wrist or other abnormalities; I wish I could specify this via RTM.

Thanks again for your support Smookie & Dwarden.

  • Like 1

Share this post


Link to post
Share on other sites

Thank you very much for this. Truely is great material. I could instantly tell you had input on these amazing animations for A3 :) Will we ever see the "wall corner" animations like in your A2 add-on? Or will we be able to reproduce them using this tutorial?

Thanks for all your hard work BIS

Share this post


Link to post
Share on other sites
I have a more specific question regarding this subject, is there any way to prevent IK animations for handAnim? I'm aware we can force RTM specified via Blending values for gestures, but being able to do the same for handAnim would be wonderful.

Unfortunately, it's not possible with the current engine state. This is one of the reasons we have decided to drop some nice Magpul style hand animations with AFG for Blufor guns. I will put the request forward for consideration in upcoming DLCs though.

Share this post


Link to post
Share on other sites
Unfortunately, it's not possible with the current engine state. This is one of the reasons we have decided to drop some nice Magpul style hand animations with AFG for Blufor guns. I will put the request forward for consideration in upcoming DLCs though.

Awesome, I really appreciate the clarification on this; thanks Smookie. I'm sure I'm not alone in welcoming some more control in this department. You guys are doing an awesome job!

Share this post


Link to post
Share on other sites

Smookie, could you please explain this to me. How come when I execute unit playmove "AadjPercMstpSrasWrflDdown" the player gets stuck in place until I vault.

But if I execute "amovpercmstpsraswrfldnon_aadjpercmstpsraswrflddown" which leads to "AadjPercMstpSrasWrflDdown", i can move freely in that stance ? I'm trying to configure an animation that supposed to work from any stance.

Share this post


Link to post
Share on other sites

Two possible explanations:

- The animation chain that leads to AadjPercMstpSrasWrflDdown is too long (over 3 states inbetween start being problematic) and costs are unclear to engine

- There is no actual animation chain that leads to AadjPercMstpSrasWrflDdown

If former is the case, you can try some workarounds, like waiting for unit to enter that state and then switchmove to it to unlock control.

Share this post


Link to post
Share on other sites

Thing is, its default BIS config. Just trying to run unit playmove "AadjPercMstpSrasWrflDdown" to set the unit into adjusted state that is one below the default state gets the unit stuck in that animation.

Anyway, I've solved the issue by using connectFrom "aadjpercmstpsraswrfldup_amovpercmstpsraswrfldnon" in custom anim config so it would perform transition back to default stance with raised weapon and then perform my animation.

Share this post


Link to post
Share on other sites

Is it normal for handAnim mask that is defined in weapon config to not be overriden by gestures which use handsWeapon mask ?

Share this post


Link to post
Share on other sites

This is very interesting topic that Id like to see elaborated more as I have trouble forming a new cfgmoves class with actions limited only to walking.

Im working on base for a walker type vehicle that uses man class as legs and I've been trying to figure out witch actions I need to have in my cfgmoves to make the legs move but everything I've tried has led to "no entry 'bin\config.bin/" error.

I've asked around a bit but got no answers so might you be able to point me to right direction?

Share this post


Link to post
Share on other sites

can we please get a working example of how to define and play a custom sound on an animation using soundoverride? i can get it to work using default sounds like "healself" but i can'T for the life of me define my own sound. this shouldn't be such a hassle. what am i missing?

Share this post


Link to post
Share on other sites

@Bad Benson

You need to override class SoundEnvironExt in CAManBase that is in Characters_F/SoundEnvironExt.hpp

To add a new sound, find generic[] array and add your sound there like this:

// generic is array of sounds played on any kind of surface whenever soundname does not exist

generic[] =

{

{"mySoundName", {"\my_addon\sounds\mySoundName_var_1.wav",db-34,1, 27}}, // name | path to file | volume | pitch

{"mySoundName", {"\my_addon\sounds\mySoundName_var_2.wav",db-34,1, 27}}, // if more variants to the same sound sample

// rest of sounds as previously configured

}

---------- Post added at 18:33 ---------- Previous post was at 18:29 ----------

Is it normal for handAnim mask that is defined in weapon config to not be overriden by gestures which use handsWeapon mask ?

I am sorry for late reply, notifications didnt arrive to my email.

I don't think i understand your question. HandAnim mask is only applied if animation or gesture uses IK handling for left or right hand. handsWeapon mask only refers to which bones are affected by use of gesture. Masks do not affect handAnim and handAnim is not a mask.

---------- Post added at 18:34 ---------- Previous post was at 18:33 ----------

I've asked around a bit but got no answers so might you be able to point me to right direction?

You gotta help me with that. Seems like packing issue that you are having. Please post or send your config to me and I will check it out.

Share this post


Link to post
Share on other sites

ok with help of deanosbeanos, smookie and mikero i finally cracked this. here's the general set up. converting my sound to .wss also might have been crucial here. not sure though. but it can't hurt.

#define _ARMA_

class CfgPatches
{
class anim_sound_test
{
	units[] = {};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"A3_Characters_F","A3_Sounds_F","A3_Anims_F"};
};
};
class SoundEnvironExt;
class CfgVehicles
{

       class CaManBase
       {
	class SoundEnvironExt: SoundEnvironExt
	{
		generic[] = {[color="#008000"]{"mySoundName", { "\anim_loop\swoosh",0.8912509,1,70 }},[/color] { "healself",{ "\A3\Sounds_F\characters\ingame\AinvPknlMstpSlayWrflDnon_medic",0.8912509,1,70 } },{ "healselfprone",{ "\A3\Sounds_F\characters\ingame\AinvPpneMstpSlayWrflDnon_medic",0.8912509,1,70 } },{ "healselfpistolkneelin",{ "\A3\Sounds_F\characters\ingame\AinvPknlMstpSlayWpstDnon_medicIn",0.8912509,1,70 } },{ "healselfpistolkneel",{ "\A3\Sounds_F\characters\ingame\AinvPknlMstpSlayWpstDnon_medic",0.8912509,1,70 } },{ "healselfpistolkneelout",{ "\A3\Sounds_F\characters\ingame\AinvPknlMstpSlayWpstDnon_medicOut",0.8912509,1,70 } },{ "healselfpistolpromein",{ "\A3\Sounds_F\characters\ingame\AinvPpneMstpSlayWpstDnon_medicin",0.8912509,1,70 } },{ "healselfpistolprone",{ "\A3\Sounds_F\characters\ingame\AinvPpneMstpSlayWpstDnon_medic",0.8912509,1,70 } },{ "healselfpistolpromeout",{ "\A3\Sounds_F\characters\ingame\AinvPpneMstpSlayWpstDnon_medicOut",0.8912509,1,70 } },{ "adjust_short",{ "\A3\sounds_f\characters\stances\adjust_short1",0.15848932,1,70 } },{ "adjust_short",{ "\A3\sounds_f\characters\stances\adjust_short2",0.15848932,1,70 } },{ "adjust_short",{ "\A3\sounds_f\characters\stances\adjust_short3",0.15848932,1,70 } },{ "adjust_short",{ "\A3\sounds_f\characters\stances\adjust_short4",0.15848932,1,70 } },{ "adjust_short",{ "\A3\sounds_f\characters\stances\adjust_short5",0.15848932,1,70 } },{ "adjust_stand_to_left_prone",{ "\A3\sounds_f\characters\stances\adjust_short1",0.15848932,1,70 } },{ "adjust_stand_to_right_prone",{ "\A3\sounds_f\characters\stances\adjust_short5",0.15848932,1,70 } },{ "adjust_kneelhigh_to_standlow",{ "\A3\sounds_f\characters\stances\adjust_short3",0.15848932,1,70 } },{ "adjust_standlow_to_kneelhigh",{ "\A3\sounds_f\characters\stances\adjust_short1",0.15848932,1,70 } },{ "roll",{ "\A3\sounds_f\characters\stances\adjust_short4",0.35481337,1,70 } },{ "grenade_throw",{ "\A3\sounds_f\characters\stances\adjust_short1",0.35481337,1,70 } },{ "grenade_throw",{ "\A3\sounds_f\characters\stances\adjust_short2",0.35481337,1,70 } },{ "grenade_throw",{ "\A3\sounds_f\characters\stances\adjust_short3",0.35481337,1,70 } },{ "grenade_throw",{ "\A3\sounds_f\characters\stances\adjust_short4",0.35481337,1,70 } },{ "grenade_throw",{ "\A3\sounds_f\characters\stances\adjust_short5",0.35481337,1,70 } },{ "inventory_in",{ "\A3\sounds_f\characters\stances\adjust_short1",0.25118864,1,70 } },{ "inventory_out",{ "\A3\sounds_f\characters\stances\adjust_short2",0.25118864,1,70 } },{ "handgun_to_launcher",{ "\A3\sounds_f\characters\stances\change_handgun_to_launcher",0.25118864,1,70 } },{ "handgun_to_rifle",{ "\A3\sounds_f\characters\stances\change_handgun_to_rifle",0.25118864,1,70 } },{ "handgun_to_unarmed",{ "\A3\sounds_f\characters\stances\change_handgun_to_unarmed",0.25118864,1,70 } },{ "launcher_to_handgun",{ "\A3\sounds_f\characters\stances\change_launcher_to_handgun",0.25118864,1,70 } },{ "launcher_to_rifle",{ "\A3\sounds_f\characters\stances\change_launcher_to_rifle",0.25118864,1,70 } },{ "launcher_to_unarmed",{ "\A3\sounds_f\characters\stances\change_launcher_to_unarmed",0.25118864,1,70 } },{ "rifle_to_handgun",{ "\A3\sounds_f\characters\stances\change_rifle_to_handgun",0.25118864,1,70 } },{ "rifle_to_launcher",{ "\A3\sounds_f\characters\stances\change_rifle_to_launcher",0.25118864,1,70 } },{ "rifle_to_unarmed",{ "\A3\sounds_f\characters\stances\change_rifle_to_unarmed",0.25118864,1,70 } },{ "unarmed_to_handgun",{ "\A3\sounds_f\characters\stances\change_unarmed_to_handgun",0.25118864,1,70 } },{ "unarmed_to_launcher",{ "\A3\sounds_f\characters\stances\change_unarmed_to_launcher",0.25118864,1,70 } },{ "unarmed_to_rifle",{ "\A3\sounds_f\characters\stances\change_unarmed_to_rifle",0.25118864,1,70 } },{ "to_binoc",{ "\A3\sounds_f\characters\stances\change_rifle_to_binoculars",0.25118864,1,70 } },{ "to_binoc_lnr",{ "\A3\sounds_f\characters\stances\change_rifle_to_binoculars",0.25118864,1,70 } },{ "to_binoc_civil",{ "\A3\sounds_f\characters\stances\change_unarmed_to_binoculars",0.25118864,1,70 } },{ "from_binoc",{ "\A3\sounds_f\characters\stances\change_binoculars_to_rifle",0.25118864,1,70 } },{ "from_binoc_lnr",{ "\A3\sounds_f\characters\stances\change_handgun_to_launcher",0.25118864,1,70 } },{ "from_binoc_civil",{ "\A3\sounds_f\characters\stances\change_binoculars_to_unarmed",0.25118864,1,70 } },{ "ladder",{ "\A3\Sounds_F\characters\movements\ladder\ladder_01",0.5011872,1,70 } },{ "ladder",{ "\A3\Sounds_F\characters\movements\ladder\ladder_02",0.5011872,1,70 } },{ "ladder",{ "\A3\Sounds_F\characters\movements\ladder\ladder_03",0.5011872,1,70 } },{ "ladder",{ "\A3\Sounds_F\characters\movements\ladder\ladder_04",0.5011872,1,70 } },{ "ladder",{ "\A3\Sounds_F\characters\movements\ladder\ladder_05",0.5011872,1,70 } },{ "ladder",{ "\A3\Sounds_F\characters\movements\ladder\ladder_06",0.5011872,1,70 } },{ "Acts_CrouchGetLowGesture",{ "\A3\Sounds_F\characters\cutscenes\Acts_CrouchGetLowGesture",0.8912509,1,70 } },{ "Acts_listeningToRadio_Loop",{ "\A3\Sounds_F\characters\cutscenes\Acts_listeningToRadio_Loop",0.8912509,1,70 } },{ "Acts_listeningToRadio_Out",{ "\A3\Sounds_F\characters\cutscenes\Acts_listeningToRadio_Out",0.8912509,1,70 } },{ "Acts_LyingWounded_loop1",{ "\A3\Sounds_F\characters\cutscenes\Acts_LyingWounded_loop1",0.8912509,1,70 } },{ "Acts_LyingWounded_loop2",{ "\A3\Sounds_F\characters\cutscenes\Acts_LyingWounded_loop2",0.8912509,1,70 } },{ "Acts_LyingWounded_loop3",{ "\A3\Sounds_F\characters\cutscenes\Acts_LyingWounded_loop3",0.8912509,1,70 } },{ "Acts_NavigatingChopper_In",{ "\A3\Sounds_F\characters\cutscenes\Acts_NavigatingChopper_In",0.56234133,1,70 } },{ "Acts_NavigatingChopper_Loop",{ "\A3\Sounds_F\characters\cutscenes\Acts_NavigatingChopper_Loop",0.56234133,1,70 } },{ "Acts_NavigatingChopper_Out",{ "\A3\Sounds_F\characters\cutscenes\Acts_NavigatingChopper_Out",0.56234133,1,70 } },{ "Acts_PercMstpSlowWrflDnon_handup1",{ "\A3\Sounds_F\characters\cutscenes\Acts_PercMstpSlowWrflDnon_handup1",0.56234133,1,70 } },{ "Acts_PercMstpSlowWrflDnon_handup1b",{ "\A3\Sounds_F\characters\cutscenes\Acts_PercMstpSlowWrflDnon_handup1b",0.56234133,1,70 } },{ "Acts_PercMstpSlowWrflDnon_handup1c",{ "\A3\Sounds_F\characters\cutscenes\Acts_PercMstpSlowWrflDnon_handup1c",0.56234133,1,70 } },{ "Acts_PercMstpSlowWrflDnon_handup2",{ "\A3\Sounds_F\characters\cutscenes\Acts_PercMstpSlowWrflDnon_handup2",0.56234133,1,70 } },{ "Acts_PercMstpSlowWrflDnon_handup2b",{ "\A3\Sounds_F\characters\cutscenes\Acts_PercMstpSlowWrflDnon_handup2b",0.8912509,1,70 } },{ "Acts_PercMstpSlowWrflDnon_handup2c",{ "\A3\Sounds_F\characters\cutscenes\Acts_PercMstpSlowWrflDnon_handup2c",0.56234133,1,70 } },{ "Acts_SignalToCheck",{ "\A3\Sounds_F\characters\cutscenes\Acts_SignalToCheck",0.56234133,1,70 } },{ "Acts_ShowingTheRightWay_Loop",{ "\A3\Sounds_F\characters\cutscenes\Acts_ShowingTheRightWay_Loop",0.56234133,1,70 } },{ "Acts_ShowingTheRightWay_Out",{ "\A3\Sounds_F\characters\cutscenes\Acts_ShowingTheRightWay_Out",0.56234133,1,70 } },{ "Acts_ShieldFromSun_Loop",{ "\A3\Sounds_F\characters\cutscenes\Acts_ShieldFromSun_Loop",0.56234133,1,70 } },{ "Acts_ShieldFromSun_Out",{ "\A3\Sounds_F\characters\cutscenes\Acts_ShieldFromSun_Out",0.56234133,1,70 } },{ "Acts_TreatingWounded01",{ "\A3\Sounds_F\characters\cutscenes\Acts_TreatingWounded01",0.56234133,1,70 } },{ "Acts_TreatingWounded02",{ "\A3\Sounds_F\characters\cutscenes\Acts_TreatingWounded02",0.56234133,1,70 } },{ "Acts_TreatingWounded03",{ "\A3\Sounds_F\characters\cutscenes\Acts_TreatingWounded03",0.56234133,1,70 } },{ "Acts_TreatingWounded04",{ "\A3\Sounds_F\characters\cutscenes\Acts_TreatingWounded04",0.56234133,1,70 } },{ "Acts_TreatingWounded05",{ "\A3\Sounds_F\characters\cutscenes\Acts_TreatingWounded05",0.56234133,1,70 } },{ "Acts_TreatingWounded06",{ "\A3\Sounds_F\characters\cutscenes\Acts_TreatingWounded06",0.56234133,1,70 } },{ "Acts_AidlPercMstpSlowWrflDnon_pissing",{ "\A3\Sounds_F\characters\cutscenes\Acts_AidlPercMstpSlowWrflDnon_pissing",0.8912509,1,70 } },{ "Acts_BoatAttacked01",{ "\A3\Sounds_F\characters\cutscenes\Acts_BoatAttacked01",0.8912509,1,70 } },{ "Acts_BoatAttacked02",{ "\A3\Sounds_F\characters\cutscenes\Acts_BoatAttacked02",0.8912509,1,70 } },{ "Acts_BoatAttacked03",{ "\A3\Sounds_F\characters\cutscenes\Acts_BoatAttacked03",0.8912509,1,70 } },{ "Acts_BoatAttacked04",{ "\A3\Sounds_F\characters\cutscenes\Acts_BoatAttacked04",0.8912509,1,70 } },{ "Acts_BoatAttacked05",{ "\A3\Sounds_F\characters\cutscenes\Acts_BoatAttacked05",0.8912509,1,70 } },{ "Acts_CrouchingCoveringRifle01",{ "\A3\Sounds_F\characters\cutscenes\Acts_CrouchingCoveringRifle01",0.56234133,1,70 } },{ "Acts_CrouchingIdleRifle01",{ "\A3\Sounds_F\characters\cutscenes\Acts_CrouchingIdleRifle01",0.56234133,1,70 } },{ "Acts_CrouchingReloadingRifle01",{ "\A3\Sounds_F\characters\cutscenes\Acts_CrouchingReloadingRifle01",0.56234133,1,70 } },{ "Acts_CrouchingWatchingRifle01",{ "\A3\Sounds_F\characters\cutscenes\Acts_CrouchingWatchingRifle01",0.56234133,1,70 } },{ "Acts_InjuredAngryRifle01",{ "\A3\Sounds_F\characters\cutscenes\Acts_InjuredAngryRifle01",0.56234133,1,70 } },{ "Acts_InjuredCoughRifle02",{ "\A3\Sounds_F\characters\cutscenes\Acts_InjuredCoughRifle02",0.56234133,1,70 } },{ "Acts_InjuredLookingRifle01",{ "\A3\Sounds_F\characters\cutscenes\Acts_InjuredLookingRifle01",0.56234133,1,70 } },{ "Acts_InjuredLookingRifle02",{ "\A3\Sounds_F\characters\cutscenes\Acts_InjuredLookingRifle02",0.56234133,1,70 } },{ "Acts_InjuredLookingRifle03",{ "\A3\Sounds_F\characters\cutscenes\Acts_InjuredLookingRifle03",0.56234133,1,70 } },{ "Acts_InjuredLookingRifle04",{ "\A3\Sounds_F\characters\cutscenes\Acts_InjuredLookingRifle04",0.56234133,1,70 } },{ "Acts_InjuredLookingRifle05",{ "\A3\Sounds_F\characters\cutscenes\Acts_InjuredLookingRifle05",0.56234133,1,70 } },{ "Acts_InjuredLyingRifle01",{ "\A3\Sounds_F\characters\cutscenes\Acts_InjuredLyingRifle01",0.56234133,1,70 } },{ "Acts_InjuredSpeakingRIfle01",{ "\A3\Sounds_F\characters\cutscenes\Acts_InjuredSpeakingRIfle01",0.56234133,1,70 } },{ "Acts_PknlMstpSlowWrflDnon",{ "\A3\Sounds_F\characters\cutscenes\Acts_PknlMstpSlowWrflDnon",0.56234133,1,70 } },{ "Acts_SittingJumpingSaluting_loop1",{ "\A3\Sounds_F\characters\cutscenes\Acts_SittingJumpingSaluting_loop1",0.56234133,1,70 } },{ "Acts_SittingJumpingSaluting_loop2",{ "\A3\Sounds_F\characters\cutscenes\Acts_SittingJumpingSaluting_loop2",0.56234133,1,70 } },{ "Acts_SittingJumpingSaluting_loop3",{ "\A3\Sounds_F\characters\cutscenes\Acts_SittingJumpingSaluting_loop3",0.56234133,1,70 } }};

	};
       };


};
class CfgMovesBasic;
class CfgMovesMaleSdr: CfgMovesBasic
{
skeletonName = "OFP2_ManSkeleton";
gestures = "CfgGesturesMale";
class States
{
               class aovrpercmstpslowwrfldf;
	class test_anim: aovrpercmstpslowwrfldf
	{
[color="#008000"]                        soundEnabled = 1;
                       soundEdge[] = {0.1}; 
                       soundOverride = "mySoundName";[/color]
               };
};
};

note also that my sound file is a wss converted using the audio tools from the arma tools on steam from .wav mono 16 bit. also keep in mind that i copied the "generic" array from th original game files and added my sound at the beginning of the array. so if that array will change over the course of arma 3 developement, this might break something unless you update it properly. it would be great if adding to config arrays would work. maybe it already does. will keep trying.

i hope this is helpful.

Edited by Bad Benson

Share this post


Link to post
Share on other sites

---------- Post added at 18:33 ---------- Previous post was at 18:29 ----------

I am sorry for late reply, notifications didnt arrive to my email.

I don't think i understand your question. HandAnim mask is only applied if animation or gesture uses IK handling for left or right hand. handsWeapon mask only refers to which bones are affected by use of gesture. Masks do not affect handAnim and handAnim is not a mask.

What I'm trying to do is to play a gesture with my left hand while having a primary weapon in my right. If weapon has handAnim[] defined it won't let go of the rifle when playing the action. Yet reloadAction bypasses that and allows left hand to move freely. Is there a way to detach the left hand to perform a gesture with it ?

Found a solution.

Leaving this here, in case somebody follows my footsteps, just need to include these in the gesture config.

rightHandIKCurve[] = {0};

leftHandIKCurve[] = {0};

Edited by Apache7

Share this post


Link to post
Share on other sites

You do this via IK Curves for given hands. rightHandIKCurve[] = {0}; will cause right hand not to lie down on weapon. You dont want that so you'd better leave it at {1}. As for left hand, you should, in most cases, at least try to smoothen the transition between handAnim driver and gesture. You do this by setting points for curve like this:

leftHandIKCurve[] = {0,1,0.05,0,0.95,0,1,1}; // first number in pair is animation rate marker, second number is target IK value

This means, IK will be active at 0% of animation (beginning), then will smoothly go inactive at 5% of animation played, will remain inactive until 95% of animation is played and smoothly become active again at 100% animation. This way you get rid of "rough edges" of animations.

  • Like 1

Share this post


Link to post
Share on other sites

there are several vanilla gestures that do exactly what you want. you should check them out.

Share this post


Link to post
Share on other sites

Thank you for your explanation, IK numbers never made much sense to me.

Smookie could you please explain the following parameters since they got no explanation on the biki or are very poorly described.

static

relSpeedMin

relSpeedMax

canBlendStep

InterpolationSpeed

InterpolationRestart

duty

useIdles

interpolationRestart

Walkcycles

limitGunMovement

Share this post


Link to post
Share on other sites

EDIT: Just did a copy paste error, in fact I can dance ;) (rtm in the arma 2 samples):

class CfgMovesBasic;
class CfgMovesMaleSdr: CfgMovesBasic
{
skeletonName="OFP2_ManSkeleton";
gestures="CfgGesturesMale";
class States
{
	class AmovPercMstpSnonWnonDnon;
	class CutSceneAnimationBase: AmovPercMstpSnonWnonDnon {};
	class ActsPercMstpSnonWnonDnon_DancingDuoIvan : CutSceneAnimationBase
	{
		looped = 0;
		speed = 0.025;
		file = "\SUPER_dance\data\ActsPercMstpSnonWnonDnon_DancingDuoIvan";
		//canBlendStep = 0;
		minPlayTime= 0.95;
					ConnectTo[]=
		{
			"AmovPercMstpSnonWnonDnon",
			2.000000
		};
		InterpolateTo[] =
			{
				"AmovPercMstpSrasWrflDnon", 2.0

			};
	};
	class ActsPercMstpSnonWnonDnon_DancingDuoStefan : CutSceneAnimationBase
	{
		looped = 0;
		speed = 0.025;
		file = "\SUPER_dance\data\ActsPercMstpSnonWnonDnon_DancingDuoStefan";
		//canBlendStep = 0;
		minPlayTime= 0.95;
							ConnectTo[]=
		{
			"AmovPercMstpSnonWnonDnon",
			2.000000
		};
		InterpolateTo[] =
			{
				"AmovPercMstpSrasWrflDnon", 2.0

			};
	};
	class ActsPercMstpSnonWnonDnon_DancingStefan : CutSceneAnimationBase
	{
		looped = 0;
		speed = 0.010400;
		file = "\SUPER_dance\data\ActsPercMstpSnonWnonDnon_DancingStefan";
		//canBlendStep = 0;
		minPlayTime= 0.95;
							ConnectTo[]=
		{
			"AmovPercMstpSnonWnonDnon",
			2.000000
		};
		InterpolateTo[] =
			{
				"AmovPercMstpSrasWrflDnon", 2.0

			};
	};
};
};

Thanks for the tutorial!

EDIT: little mod for the arma 2 dancing animations in arma 3: https://www.mediafire.com/?4gaxue9zzsiuuvq

Edited by super-truite
added file

Share this post


Link to post
Share on other sites

static - quite frankly no clue

relSpeedMin - minimum relative speed of animation, applicable to fatigue states or AI, 1 means 100% of speed

relSpeedMax - maximum of above, max is used for player actions for most of the time. used when player is 0% fatigued.

canBlendStep - new in A3: blending of position of up to 3 animations between which there is interpolation played

InterpolationSpeed - speed of interpolation, its pretty much self explanatory -> how long it takes for one anim to interpolate to another. its inverse of seconds (interpolationSpeed = 4 means it will take 1/4 s)

InterpolationRestart - mode of interpolation: 0 - interpolation will start before preceding animation is finished (overwriting preceding animation keyframes) and go into first keyframe of second animation. 2 - interpolation will start at the end of preceding animation and overwrite initial keyframe of next animation. 1 - animation will be interpolated from last keyframe of preceding animation to first keyframe of the subsequent animation

duty - ammount of fatigue caused by animation. negative value will result in faster restoring of energy.

useIdles - NEW in A3: if 1, then animations in variantPlayer / variantAI will be played as full body gestures. This is important to reduce glitching resulting from normal interpolations to and from idling states.

Walkcycles - obsolete

limitGunMovement - refers to how the gun movement is actually limited (in vertical and horizontal axis) but only in reference to animation (as defined in aimingBody)

  • Like 1

Share this post


Link to post
Share on other sites

Smookie, maybe you can tell me if its me who is doing this wrong or if its the default config that is misconfigured.

I'm trying to utilize MoveWithInjuredManCarrierNon set of animations, but they refuse to work unless i got a rifle in my inventory.

So for example i execute playmove "AcinPercMstpSnonWnonDnon" it places me into correct animation after picking the injured unit up, but I cannot move. The moment I spawn myself a rifle, which goes on my back I'm able to move again. If I drop it, its back to unable to move mode.

Same exact thing happens with a pistol, unless I got a rifle on me I cannot move. The moment i add a rifle to my inventory it works and i can move with a pistol in hand.

Share this post


Link to post
Share on other sites

Havent looked closely at that yet but most likely it is due to system forcing you into civil/pistol state (depending on whether you have a handgun or not) and therefore reaching a FUBAR state. Movement with injured man was dropped and I was not looking into fixing/improving it as a result.

Share this post


Link to post
Share on other sites

I have a problem with my config it seems, getting this rpt message and the animation doesnt show (only T-pose for turned in, and standard rifle pose for turned in). Dev Build 1.25.125852

bin\config.bin/CfgMovesMaleSdr/States/AmovPknlMevaSrasWpstDr.InterpolateTo: Bad move AmovPknlMsprSlowWpstDf_AmovPpneMstpSrasWpstDnon
 bin\config.bin/CfgMovesMaleSdr/States/AmovPknlMevaSrasWpstDl.InterpolateTo: Bad move AmovPknlMsprSlowWpstDf_AmovPpneMstpSrasWpstDnon
Warning Message: No entry 'bin\config.bin/CfgMovesMaleSdr/States/DefaultDie.connectFrom'.
Warning Message: Size: '/' not an array
Warning Message: Size: '/' not an array
Warning Message: No entry 'bin\config.bin/CfgMovesMaleSdr/States/DefaultDie.connectTo'.
Warning Message: Size: '/' not an array
Warning Message: Size: '/' not an array
Warning Message: No entry 'bin\config.bin/CfgMovesMaleSdr/States/DefaultDie.interpolateWith'.
Warning Message: Size: '/' not an array
Warning Message: Size: '/' not an array
Warning Message: No entry 'bin\config.bin/CfgMovesMaleSdr/States/DefaultDie.interpolateTo'.
Warning Message: Size: '/' not an array
Warning Message: Size: '/' not an array
Warning Message: No entry 'bin\config.bin/CfgMovesMaleSdr/States/DefaultDie.interpolateFrom'.
Warning Message: Size: '/' not an array
Warning Message: Size: '/' not an array
Warning Message: No entry 'bin\config.bin/CfgMovesMaleSdr/States/k40_chimera_cmdr_out_KIA.connectFrom'.
Warning Message: Size: '/' not an array
Warning Message: Size: '/' not an array
Warning Message: No entry 'bin\config.bin/CfgMovesMaleSdr/States/k40_chimera_cmdr_out_KIA.interpolateWith'.
Warning Message: Size: '/' not an array
Warning Message: Size: '/' not an array
Warning Message: No entry 'bin\config.bin/CfgMovesMaleSdr/States/k40_chimera_cmdr_out_KIA.interpolateTo'.
Warning Message: Size: '/' not an array
Warning Message: Size: '/' not an array
Warning Message: No entry 'bin\config.bin/CfgMovesMaleSdr/States/k40_chimera_cmdr_out_KIA.interpolateFrom'.
Warning Message: Size: '/' not an array
Warning Message: Size: '/' not an array
Warning Message: No entry 'bin\config.bin/CfgMovesMaleSdr/States/DefaultDie.connectAs'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgMovesMaleSdr/States/k40_chimera_cmdr_out_KIA.connectAs'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgMovesMaleSdr/States/DefaultDie.file'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgMovesMaleSdr/States/DefaultDie.file'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgMovesMaleSdr/States/k40_chimera_cmdr_out_KIA.preload'.
Warning Message: '/' is not a value
Warning Message: No entry 'bin\config.bin/CfgMovesMaleSdr/States/k40_chimera_cmdr_out_KIA.collisionShape'.
Warning Message: '/' is not a value
LODShape::Preload: shape '' not found
Warning Message: No entry 'bin\config.bin/CfgMovesMaleSdr/States/k40_chimera_cmdr_out_KIA.hasCollShapeSafe'.
Warning Message: '/' is not a value

It should be a regular Tank Crew pose.

My config:

class CfgPatches
{
class k40_Anim
{
	units[]={};
	weapons[]={};
	requiredVersion=0.1;
	requiredAddons[]=
	{
		"A3_CargoPoses_F"
	};
};
};

class CfgMovesBasic
{
class DefaultDie;
class ManActions
{
	///action="state"; (state from CfgMovesMaleSdr\States)
	k40_chimera_cmdr_out="k40_chimera_cmdr_out";
	k40_chimera_cmdr_in="k40_chimera_cmdr_in";

};
};
class CfgMovesMaleSdr: CfgMovesBasic
{
class States
{
	class Crew;
	class crew_tank01_in{};

	class k40_chimera_cmdr_in: crew_tank01_in
	{
		file="\k40_Anim\vehicles\chimera_cmdr_in.rtm";
		interpolateTo[]={"KIA_crew_tank01",1};
	};

	class k40_chimera_cmdr_out: Crew
	{
		file="\k40_Anim\vehicles\chimera_cmdr_out.rtm";
		speed=-11;
		interpolateTo[]=
		{	"k40_chimera_cmdr_out_KIA",1,
		};
	};
	class k40_chimera_cmdr_out_KIA: DefaultDie
	{
		actions="DeadActions";
		file="\k40_Anim\vehicles\Chim_cmdr_out_KIA.rtm";
		speed=0.5;
		looped="false";
		terminal=1;
		connectTo[]=
		{
			"Unconscious",
			0.1
		};
		soundEnabled=0;
	};

};
};

Share this post


Link to post
Share on other sites

You need to specify full file location for example if your parent folder is k40_chimera it would be

k40_chimera\k40_anim\vehicles\file.rpt

Did some formatting changes and removed an extra , from somewhere. Change the animation paths to correct ones and try again.

class CfgPatches
{
   class k40_Anim
   {
       units[] = {};
       weapons[] = {};
       requiredVersion = 0.1;
       requiredAddons[] = {"A3_CargoPoses_F"};
   };
};

class CfgMovesBasic
{
   class DefaultDie;
   class ManActions
   {
       k40_chimera_cmdr_out = "k40_chimera_cmdr_out";
       k40_chimera_cmdr_in = "k40_chimera_cmdr_in";         
   };
};
class CfgMovesMaleSdr: CfgMovesBasic
{
   class States
   {
       class Crew;
       class crew_tank01_in;
       class k40_chimera_cmdr_in: crew_tank01_in
       {
           file = "k40_Anim\vehicles\chimera_cmdr_in.rtm";
           interpolateTo[] = {"KIA_crew_tank01",1};
       };

       class k40_chimera_cmdr_out: Crew
       {
           file = "k40_Anim\vehicles\chimera_cmdr_out.rtm";
           speed = -11;
           interpolateTo[] = {"k40_chimera_cmdr_out_KIA",1};
       };
       class k40_chimera_cmdr_out_KIA: DefaultDie
       {
           actions = "DeadActions";
           file = "k40_Anim\vehicles\Chim_cmdr_out_KIA.rtm";
           speed = 0.5;
           looped = "false";
           terminal = 1;
           connectTo[] = {"Unconscious",0.1};
           soundEnabled = 0;
       };
   };
};  

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

×