Jump to content
smookie

Animation - explanation of the magic behind

Recommended Posts

The part that I could really use help with is getting my own animations and skinned character into game.

Here is what I mean:

1. I export my character from Maya with all the skin weight data and then again with my animation data baked in with full the joint hierarchy. I have tried this part with hundreds of different FBX option variations to try and guess what is the best way.

2. I then import my mesh separately with all the skin weights into Object Builder. Everything looks good.

3. I then import my animation data. Set the t-pose to -0.5, the first frame to 0.0 and the last to 1.0. I then do a 'Auto time 1'.

4. I test the animation out in Object Builder by going through the key frames. Everything looks great!

5. I create a model.cfg using the same joint hierarchy as my skeleton. I set up a basic gesture cfg to test the animation.

6. I export matrices to an RTM file.

7. I binarise and load the addon.

8. Start the game.

From here, something always goes wrong. Usually part of the mesh distorts. It seems keyframe data is not being fully realized by the engine in the same way as in object builder, so joints are left isolated where as the rest deform with the animation data. Its not mesh issues, as the t-pose without the animation is fine. As said it also works fine in object builder.

I have spent so many hours trying to crack this now. Every time changing one small detail and running through different work flows. I can do the whole thing into Unity / UE4 with my eyes closed, as its quite well documented. But I cannot find anything to give me a direction to take.

If you guys could share this part of your work flow, I would be really grateful.

Perhaps you could just show your FBX export options / animation baking options?

Edited by shinkicker

Share this post


Link to post
Share on other sites

I am in the process of creating a tutorial for Motionbuilder on simple animation creation and importing into the engine. Perhaps, if i get motivated enough:P, there will be one for 3DS as well.

Share this post


Link to post
Share on other sites
I am in the process of creating a tutorial for Motionbuilder on simple animation creation and importing into the engine. Perhaps, if i get motivated enough:P, there will be one for 3DS as well.

This would be awesome and I believe higly beneficial for the whole modding community!

Share this post


Link to post
Share on other sites
I am in the process of creating a tutorial for Motionbuilder on simple animation creation and importing into the engine. Perhaps, if i get motivated enough:P, there will be one for 3DS as well.

That would be really useful. Do you know if there are any factors that make it problematic to go from Maya > FBX > RTM.

As I say, everything is ok in Object Builder, but I always get problems in game.

Edited by shinkicker

Share this post


Link to post
Share on other sites

@shinkicker

how does your distortion look?

If you import FBX (from max) , it seems that objectbuilder for some reason will ignore all bones that do not have child. In case of characters this would be the fingertips, toetips, weapon bones etc. Those will appear distorted. That means you have to add sacrificial "end" bones to your skeleton.

Maybe its the same for you?

Does anyone know how the origin of the camera is determined for a crew cargo animations? Is it defined by the animation? My camera is off center by 10cm and it doesnt seem to change when changing the skeleton. I'm a bit at a loss there

Share this post


Link to post
Share on other sites
Does anyone know how the origin of the camera is determined for a crew cargo animations? Is it defined by the animation? My camera is off center by 10cm and it doesnt seem to change when changing the skeleton. I'm a bit at a loss there

It's exactly the position of the head relative to proxy position. Your best bet is to place head bone at 0,y,0 point of the animation and ensure the proxy is centered in the aircraft.

Share this post


Link to post
Share on other sites
It's exactly the position of the head relative to proxy position. Your best bet is to place head bone at 0,y,0 point of the animation and ensure the proxy is centered in the aircraft.

I have centered the headbone and proxy but it still happens. I had to move the proxy 10cm to the right to get the view centered, but that's less then ideal and i can't explain why

testpilotrcsuv.jpg

maybe something is missing? I'd appreciate it if somebody could take a look if something is wrong there

Pilot_Test_rtm.zip

Share this post


Link to post
Share on other sites

Send your model and animation to me and i will take a look

Share this post


Link to post
Share on other sites
@shinkicker

how does your distortion look?

If you import FBX (from max) , it seems that objectbuilder for some reason will ignore all bones that do not have child. In case of characters this would be the fingertips, toetips, weapon bones etc. Those will appear distorted. That means you have to add sacrificial "end" bones to your skeleton.

Maybe its the same for you?

Does anyone know how the origin of the camera is determined for a crew cargo animations? Is it defined by the animation? My camera is off center by 10cm and it doesnt seem to change when changing the skeleton. I'm a bit at a loss there

You're right. Just checked. The skin weight of the terminating joints get passed over with the mesh, but if you import your skeleton its always missing the last child joints. Must be a bug.

Edited by shinkicker

Share this post


Link to post
Share on other sites
I am in the process of creating a tutorial for Motionbuilder on simple animation creation and importing into the engine. Perhaps, if i get motivated enough:P, there will be one for 3DS as well.

Ive got to say as a game modder who is experienced with 3dsmax /zbrush for modelling but turn to Motionbuilder for animating And having really struggeld to get animations in to A3 im really looking forwards to your tutorial.

For me it cant come soon enough

Share this post


Link to post
Share on other sites

Hi all! Don't know if you noticed it yet or not but I have renamed veryuglylowercase animation state names to LeadingLetterCamelCase for better visual orientation. This only relates to AxxxPxxxMxxx... animation name format, special animation names has been ignored.

I would like to ask you to let me know via PM if you will encouter any animation state name which is still affected by this and I will fix it. ;)

NOTE: This is reflected in Development Branch EXE rev. 129474 and later.

Regards, Burkhar

Share this post


Link to post
Share on other sites
Guest

Hope this is the appropriate place to post this question.

I'm just getting into making custom animations for my vehicles. I've got the animations into Arma and for the most part they are working well for simple things like the default crew positions.

However I am currently totally lost when it comes to the CFGmoves setup, particularly how the actions/states work and how the A...P...M...S...W...D Classname stuff needs to be set up in the context i am trying to get animations working in.

I've looked at the cfgmoves classes for the stock arma tanks but there is little or no reference in them to the A...P...M...S...W...D system. I think I could figure out how to get this working properly if i could find out where the FFV cargo animations are defined but so far I cant seem to locate them within the configs i would have expected them to be located.

I'm trying to make a custom FFV pose for tank crews. it works fine but you cannot lower your weapon like you can with the stock ones and you cannot switch weapons (well, it says i have bino's out but no animation change)

I also have actual manual loading by the loader working now but need to implement the animations of him doing that to complete it. The animations are done but again i cannot figure out whats going on in the CfgMoves beyond what I already know.

If anyone can shed some light on how this should be set up in the context of vehicle positions, where i can see the cfgmoves definition for the ffv cargo actions or provide a sample of how this should be set up i would be extremely grateful ;)

cheers guys

Share this post


Link to post
Share on other sites

Quick question about animations. We have added working doors to a vehicle. What we need to do now is somehow slow / delay the 'get in' animation that plays when you get into the vehicle. This is because the unit gets into the vehicle before our door animation opens. You are already sitting in the vehicle before the door fully opens. If we could add a slight delay - at max 1 second - to the animation playing once you select the option to get in, it would solve the problem. Does anyone know if you can add a sleep or delay count to a default 'get in' animation (I believe it is a get-in-low animation) or would we have to create new custom animations?

Share this post


Link to post
Share on other sites

I now have my animations and rigged character in game. Seems if a joint extends even a tiny bit beyond the mesh, it won't move, so that is resolved now.

I am now wondering how to get walk cycles to work? My character stays on the spot.

There is the following section in O2, but no documentation on how to use it.

89482f2dc1.png

Has anyone used this before? What values map to each entry field?

Edited by shinkicker

Share this post


Link to post
Share on other sites

Many thanks to Bad Benson!

You need these to enable walk (tweak the value below zero to change speed of movement)

Bzglwib.jpg

Share this post


Link to post
Share on other sites
Guest

I'm trying to make a custom FFV pose for tank crews. it works fine but you cannot lower your weapon like you can with the stock ones and you cannot switch weapons (well, it says i have bino's out but no animation change)

disregard this. I figured it out in the end.

Share this post


Link to post
Share on other sites

How would I have two animations run one after the other? To coincide with the time it takes for a vehicle door to open (activated by the 'get in' command), I want an animation for the crew where the unit reaches forward (as if activating the handle on a door), and then the unit climbs in. I am thinking of using the animation for rearming at a crate, which then moves directly into an MRAP_Getin animation. During the time of the combined animations, the door will have swung into the open position and will swing closed after the unit has mounted the vehicle. How would I go about this in the CrewAnimations.hpp? Is it a case of interpolate from one animation into another?

Thanks for any help.

Share this post


Link to post
Share on other sites
Guest
How would I have two animations run one after the other? To coincide with the time it takes for a vehicle door to open (activated by the 'get in' command), I want an animation for the crew where the unit reaches forward (as if activating the handle on a door), and then the unit climbs in. I am thinking of using the animation for rearming at a crate, which then moves directly into an MRAP_Getin animation. During the time of the combined animations, the door will have swung into the open position and will swing closed after the unit has mounted the vehicle. How would I go about this in the CrewAnimations.hpp? Is it a case of interpolate from one animation into another?

Thanks for any help.

you need to define a class in cfgmoves for each animation you want to play then in each define a connectTo[] array that says what animation to play next.

so something like this in your states class in cfgmoves:

class animation_name_1: Crew

{

file = "file_path_to_rtm";

connectTo[] = {"animation_name_2",1};

};

class animation_name_2: Crew

{

file = "file_path_to_rtm";

connectTo[] = {"animation_name_3",1};

};

this example is very simplified but i think shows the part you are interested in

the second component in the array initializer is frames to interpolate i think but i could be wrong on that and you may also need an interpolateTo[] entry in there too. I'm still experimentng with these myself so might be able to provide more information soon.

Share this post


Link to post
Share on other sites

Hi Burnes, thanks for the reply. Here is what I currently have:

class CfgMovesBasic

{

class DefaultDie;

class ManActions

{

Jackal_3CB_GetIn_Delay = "Jackal_3CB_GetIn_Delay";

Jackal_3CB_GetIn_Delay2 = "Jackal_3CB_GetIn_Delay2";

};

};

class CfgMovesMaleSdr: CfgMovesBasic

{

class States

{

class Crew;

class Jackal_3CB_GetIn_Delay: Crew

{

file= "\a3\anims_f\data\Anim\sdr\inv\erc\stp\ras\rfl\ainvpercmstpsraswrfldnon_in";

ConnectTo[]={"Jackal_3CB_GetIn_Delay2", 1};

speed = 0.75;

};

class Jackal_3CB_GetIn_Delay2: Crew

{

file= "\a3\anims_f\Data\Anim\Sdr\crg\knl\stp\non\non\driver_MRAP_01_getin";

interpolateTo[]={"", 1};

speed = 0.75;

};

};

};

When I run it in game, the unit reaches forward as if using the door, then he is in the vehicle. For whatever reason, it doesn't play the second animation which should show him climbing into the vehicle. Any thoughts?

Edit: Not sure why there are spaces in the animation names. There are none in the actual code I pasted, so discount those as a possible error. The first animation plays fine.

Edited by evrik

Share this post


Link to post
Share on other sites
@Kydoimos: Head movement is irritaiting and you cannot disable it. I will be placing an internal request to fix this problem but I dont have ETA's for fixing.[/Quote]

Hi Smookie,

I've noticed that defining an animation in the cutsceneAnimationBase helps a little with head movement - still getting a bit of crazy neck twisting though! :p Seems the character model is always fighting against the urge to look frantically from left to right, up and down! Ah, fingers crossed for a fix one day! :D Again, thanks for this awesome thread!

Share this post


Link to post
Share on other sites

Regarding disabling head movement for animations - I have had some luck on a workaround! If the unit that the animation is being played on does not need to speak, or do anything other than play the animation, you can setDamage 1 / setDamage 0 and have the unit still perform the animation! Unfortunately, this is no good if the unit needs to speak some dialogue, as they will not speak (being dead!) :)

 

@Kydoimos: Head movement is irritaiting and you cannot disable it. I will be placing an internal request to fix this problem but I dont have ETA's for fixing.

 

 

EDIT: Ok, if anyone's interested, I believe I may have a good way of disabling head movement for custom animations (I say this tentatively, as it still needs a bit of testing!) - basically, in the animation config, add:

terminal = 1;

and then, make sure the unit's mimics are disabled with:

_unit enableMimics false;

Pretty sure this should do the trick! Seems to be working for me at least.

Share this post


Link to post
Share on other sites

Is it possible to make custom animations for your own plane possible, like a start up procedure prime engine where as you could have the propeller rotate a couple times ,and add sound to simulate this, and add an add action say user action animation?

Share this post


Link to post
Share on other sites

@nitro65 - anything and everything is possible in Arma :) Starting a custom animation for a custom plane is certainly within the game's scope.

  • Like 1

Share this post


Link to post
Share on other sites

Hey guys

 

Wondering if anyone knows how to have it so only one limb is affected by an animation ( like the wave gesture)

 

say, for example, the character lifts his left hand off of the gun and starts to count down with his fingers. I  would still want him to be able to walk around, but his gun would be lowered.

 

Do I have to make the animation for each one or is it as simple (or complex) as a config tweak?

 

Thanks guys

Share this post


Link to post
Share on other sites

Hey!

I have been working with custom animations for our assets again and ran into a problem I can't seem to solve.

I have a unit that uses custom skeleton and custom animations with highly stripped custom cfgMoves class and while forward walking works fine, going backwards plays the animation only once and then just glides along.

Ive made a video out of it here:

As you can see the forward animation works fine, but going backwards bugs out.
https://www.dropbox.com/s/sfwvrwckcbqdl0p/LoDR_Walker_AnimationProblem_01.avi

This one shows the animation playing in the animation viewer
https://www.dropbox.com/s/x08eeiwohxumbkf/LoDR_Walker_AnimationProblem_02.avi

I've checked via script that it still plays the same animation, but nothing seems to happen.

I've messed around with the config values, tried the same ones as with the forward movement and unedited ones.

At some point some version of the backward animation worked, but cant use that since the skeleton has changed a little and this problem showed up before the changes anyhow.

Heres the animation class I currently have put together. Most of it is the same I have for the forward movement.
 







class AmovPercMwlkSnonWnonDb: AmovPercMwlkSnonWnonDf
		{
			actions = "CivilWlkActionsB";
			file = "LoDR_Opfor_E_Vehicles\LoDR_Opfor_Walker_01_Legs\Anim\WalkerWalkB.rtm";
			//file = "\A3\anims_f\Data\Anim\Sdr\Mov\Erc\Wlk\non\non\AmovPercMwlkSnonWnonDb";
			speed = 0.35;
			soundEdge[] = {0.04,0.3,0.55,0.8};
			duty = 0.1;
			soundOverride = "run";
			soundEnabled = 1;
			static = 1;
			limitGunMovement = 0.1;
			Walkcycles = 4;
			disableWeapons = 1;
			InterpolateTo[] = 
			{
				"AmovPercMwlkSnonWnonDbl",0.025,
				"AmovPercMstpSnonWnonDnon",0.06,
				"AmovPercMwlkSnonWnonDbr",0.025,
				"AmovPercMrunSnonWnonDb",0.025,
				"AmovPknlMwlkSnonWnonDb",0.03,
				"Unconscious",0.1
			};
		};

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

×