====== ArmA 2 Pilot Proxy RTM ======
[[https://www.pmctactical.org/forum/viewforum.php?f=50|ArmA 2 Forum]], [[:arma2|ArmA 2 Home]], [[arma2:config|ArmA 2 Config]], [[arma2:file_formats|ArmA 2 File Formats]], [[arma2:missions|ArmA 2 Missions]], [[arma2:modeling|ArmA 2 3D Modeling]], [[arma2:scripting|ArmA 2 Scripting]], [[arma2:terrain|ArmA 2 Terrain]], [[arma2:texturing|ArmA 2 Texturing]], [[arma2:tools|ArmA 2 Tools]]
New animations for aircraft pilot proxy using rtm file.
If you wanted to create a new pilot proxy which has adjusted legs and arms, you can do it by .rtm file which is a slightly edited version of the AH1Z Pilot proxy model.
Proxies are placeholders for other p3d objects. On planes they're usually used for missiles/bombs as well as for units (Driver/Pilot/Gunner/Cargo/Commander) to determine the exact location where they will sit finally.
Unit proxies include a .rtm animation file as this file defines the exact positioning of each body part. So as example the driver has the hands not on the knees but on the steering wheel.
Also true, usually in O2 a proxy is represented by a simple triangle but you can make the proxy shape visible when selecting respective menu option in the view menu of O2 (DX mode has to be off for this). Makes placing a lot easier as you can see the real shape and not only a vague triangle.
To setup the proxy with new rtm file, first create the rtm file, then create config entries for it like shown below:
class CfgMovesBasic
{
class DefaultDie;
class ManActions
{
F16_Pilot = "F16_Pilot";
};
};
class CfgMovesMaleSdr: CfgMovesBasic
{
skeletonName = "OFP2_ManSkeleton";
gestures = "CfgGesturesMale";
class States
{
class Crew;
class F16_Pilot: Crew
{
file = "glt_f16\anims\F16_Pilot.rtm";
interpolateTo[] = { KIA_AH1Z_Pilot, 1 };
};
};
};
And class cfgVehicles
driverAction = "F16_Pilot";
====== Notes ======
* This doesn't create a new proxy in O2/Buldozer, only finally in-game. For proxy to O2, check [[arma:modeling:proxy#pilot_proxy_visible_in_buldozer|this]].
* To create your own .rtm, check out the BIS proxies and select the one as base which already comes close to what you need. For example AH1Z Pilot.
====== RTM Tutorial ======
RTM animations files determine both the position of limbs in many of those "poses" that found in-game and any "fidget" movement a AI might do. Examples are Cargo and Pilot poses for AI or players sitting in Aircraft.
The below method works for ArmA 2 and Operation Arrowhead even with the ArmA 1 skeleton. You can use the released ArmA 2 skeleton in a similar fashion, but it has a few quirks that make it more difficult to use - namely the 'local axis' wont automatically reposition itself to the joint when you select a bone. Best to use the ArmA 1 skeleton.
For ArmA2/OA specific weapon hand animation RTMs require a different setup to get them to work.
First Needs:
The ArmA 1 skeleton is available in the original set of MLODs that BIS published.
Open BISkeleton.p3d with O2.
If you look at it in buldozer you'll see that it just looks like a very simple mannequin with basic geometric shapes for the body part selections. these selections are the 'bones' of the skeleton.
You will see that the named selection window contains twice as many selections as a normal character model. There being duplicate names of the selections with a hyphen (-) in front.
The ones with the hyphen in front are the ones you will use to animate as they will select and move the entire limb attached to that bone, not just the bone itself.
In order to create an animation it is important to make sure 'points\transform 3D\show local axis' is switched on. This means when you select the bones/limbs the center of rotation will switch to the position defined as the joint within the skeleton.
You can see the position of these joints in the memory LOD of the skeleton.
Say for example we want to lift the character's left leg. We would use the '-leftupleg' selection and the axis would shift to the position of the '-leftupleg' joint vertex in the memory LOD.
Looking at the axis we can see there are red blue and green lines that show the direction of the x (red) y ( green) and z (blue).
Using the buttons in the second row of tools restricts movement of the bone to the selected x, y and z directions.
If you select x, and rotate with the mouse (CTRL-RMB and drag the mouse cursor) you can lift the leg up and down.
If you select z the leg will move side to side.
And with Y, you will twist the bone. You only want to use this when using a selection named '-***roll' such as '-leftarmroll' or '-rightuplegroll' because as the name suggest, these bones are designed to be rolled and twisted.
You can load existing .rtms onto the skeleton by right-clicking the key frames animation window and choosing 'from matrices' or the option to apply it to all LODs.
This is useful previewing anims on proper models where you want the shadow LOD to move too when you look at it in buldozer.
Find the .rtm you want to edit and click on it to open. An example would be the AH1Z_Gunner.rtm or AH1Z_Pilot.rtm files found in \ca\air\Data\Anim\
You will see that the keyframes fill up with the various frames of the animation. You can switch between frames by double clicking on them and the skeleton will move appropriately.
The name of the key frame corresponds to the time in seconds at which the animation frame occurs. For static crew anims you will see that the first frame is the default position of the model, and has a negative time code and you have two frames with the same pose with positive time codes.You can then edit the animation using the selection manipulation procedure I outlines earlier.
I haven't looked at the gun holding anim you wanted to edit, but if the all the key frames are the same (apart from the first one with the default pose), you can just edit one key frame, then delete the others, go back to your edited key frame and right click the anim window to create new key frames to replace the ones you deleted.
The new ones will have new pose you've created, rather than having you editing all the key frames individually to get the same result.
If you want the animation to be ergonomically correct for a model you want the character to be interacting with; use 'file\merge' to add your model in with the skeleton.
It's best to make a version of the model with only one selection so it is easier to select and delete before you export the new animation, since the rtm references all existing named selections when the files is exported.
To export the new .rtm, delete anything that wasn't part of the original skeleton, right-click on the selections window and click 'delete empty' to remove selections for objects you deleted.
Then right-click the key frames window and click 'export matrices' to save your new .rtm.
To add your new RTM to the game, make a PBO patch addon which is simply a config.cpp like below.
class CfgMovesBasic
{
class DefaultDie;
class ManActions
{
F16_Pilot = "F16_Pilot";
};
};
class CfgMovesMaleSdr: CfgMovesBasic
{
skeletonName = "OFP2_ManSkeleton";
gestures = "CfgGesturesMale";
class States
{
class Crew;
class F16_Pilot: Crew
{
file = "glt_f16\anims\F16_Pilot.rtm";
interpolateTo[] = {KIA_AH1Z_Pilot,1};
};
};
};
To then use this pose in your other addons;
driverAction = "F16_Pilot";