Warning: file_put_contents(/ff_dc327a2b8ad0a8d0d10fb3bae5e88bc1696a7dc0918d52df.php): failed to open stream: Permission denied in /home/ofpecsav/public_html/forum/Sources/Subs-ForumFirewall.php on line 1619
RTM Animation Tutorial | OFPEC The Editing Center

RTM Animation Tutorial

By Gnat

by da12thMonkey
special thanks to StalkerGB & [GLT]Myke

Why?

RTM animations files determine both the position of limbs in many of those "poses" that found ingame and any "fidget" movement a AI might do. Examples are Cargo and Pilot poses for AI or players sitting in Aircraft.

Compatible

The below method works for ArmA 2 and OA 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, check this forum post.

First Needs

The ArmA 1 skeleton is available in the original set of MLODs that BIS published. If you don't have it already you can download it from here.

Step (1)

Open BISkeleton.p3d with O2. If you look at it in buldozer you'll see that it just looks like a very simple manequin with basic geometric shapes for the body part selections. these selections are the 'bones' of the skeleton.

pic1

Step (2)

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.

Pic2

Step (3)

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 centre 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.

Pic3

Step (4)

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.

Pic4

Step (5)

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). Pic5

Step (6)

Using the buttons in the second row of tools restricts movement of the bone to the selected x, y and z directions. Pic6

Step (7)

If you select x, and rotate with the mouse (ctrl+rightclick and drag the mouse cursor) you can lift the leg up and down.

Pic7

Step (8)

If you select z the leg will move side to side.

Pic8

Step (9)

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 keyframes 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\

Pic9

Step (10)

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.

Pic10

Step (11)

The name of the keyframe 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 keyframes are the same (apart from the first one with the default pose), you can just edit one keyframe, then delete the others, go back to your edited keyframe and right click the anim window to create new keyframes to replace the ones you deleted. The new ones will have new pose you've created, rather than having you editing all the keyframes 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.

Pic11

Step (12)

Then right-click the keyframes window and click 'export matrices' to save your new .rtm.

Pic12

Step (13)

To add your new RTM to the game, make a PBO patch addon which is simply a config.cpp like below.

// CODE THANKS TO [GLT]Myke
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};
        };
    };
};
// CODE THANKS TO [GLT]Myke

To then use this pose in your other addons:

driverAction = "F16_Pilot";

Alternate layout

Raw HTML Page

Advertisement