{"name":"Rtm (Animation) File Format","title":"Rtm (Animation) File Format","type":"topic","url":"https://community.bistudio.com/wiki/Rtm_(Animation)_File_Format","revid":373422,"updated":"2025-05-08T11:27:12Z","aliases":["RTM"],"markdown":"> **Disclaimer: This page describes internal undocumented structures of Bohemia Interactive software.**\n>\n> This page contains unofficial information.\n>\n> Some usage of this information may constitute a violation of the rights of Bohemia Interactive and is in no way endorsed or recommended by Bohemia Interactive.\n> Bohemia Interactive is not willing to tolerate use of such tools if it contravenes any general licenses granted to end users of this community wiki or BI products.\n\n### Binary Format\n\nFor binary rtm's see Rtm Binarised File Format\n\n### Conventions\n\nsee Generic FileFormat Data Types\n\n### Animations\n\n- RTM files are applied to any P3d that has a 'skeleton'. Not ALL p3d's have them.\n\n- The appropriately termed 'skeleton' consists of 'bones' such as heads, arms, legs, feet, doors.\n\n- The skeleton as such, is not used by an rtm file. Part, or all, of the bones of the skeleton are.\n\n- An rtm frame consists of a collection of bones. Each frame contains identical bones but each of those bones are individually displayed at differing orientations.\n- The same rtm file can be applied to different p3d's on the assumption of course that the bone names in each of those p3d's are identical. This would be reasonable for a collection of soldiers eg.\n\nAnd so:\n\n### RtmFile\n\n```\nRtmFile\n{\n char[8] \"RTM_MDAT\"    //optional. Must appear 1st see frame properties. These are not asciiz\n char[8] \"RTM_0101\"; //mandatory\n};\n```\n\n### RTM_MDAT\n\nIntroduced at arma3\n\n```\nProperties\n{\n char    \"RTM_MDAT\"\n ulong   Zeroes;\n ulong   nFrameProperties;\n Property[nFrameProperties];\n};\n```\n\n#### Property\n\n```\n{\n float        phase;\n lAsciiz*    name;\n lAsciiz*    value;\n}\n```\n\n##### lAscii\n\n```\n{\n  byte nChars   // there is no null char 'byte' might be a compressed byte (see flashpoint strings)\n  char [nChars];// there is no null char\n]\n```\n\n### RTM_0101\n\n```\nRtmData\n{\n char       \"RTM_0101\"\n XYZTriplet Vertex;                // Total Moving XZY. At 0,0,0 'soldier' runs in same spot.\n ulong      nFrames;               // Self Explanatory?\n ulong      nBones;                //\n BoneName   BoneNames[nBones];     //\n RtmFrame   Frames[nFrames];\n};\n```\n\nThe number of frames (and bones in each frame) extend to the end of file. There is no checksum or end of file signature.\n\n#### BoneName\n\n```\nchar BoneName[32];   //fixed 32 byte record for each bone. NOT asciiz\n```\n\n#### RtmFrame\n\n```\nRtmFrame\n(\n  float          FrameTime; // Values 0.0 to 1.0\n  BoneTransform  Bone[nBones];\n};\n```\n\n#### Frametime\n\nRepresents a percentage of 'time' relative to the *total* time taken to display all frames.\nThe overall time is *not* indicated in the rtm. External sources cause the 'frames' to move\nfast, or slow, or whatever.\n\nThis is one of those parameters that are easy to understand, and difficult to explain.\n\nThe value represents percentage of the expiry time for the **entire** frameset.\n\nGiven ten frames, all of which you want displayed for the same amount of time. the frametime value would progress, 0,0.1,0.2,0.3 etc, not, as would be intuitive, 0.1,0.1,0.1,0.1.........\n\n##### BoneTransform\n\n```\nBoneTransform\n{\n  BoneName   BoneName;      //Identical to that found in header above, and in same relative order\n  Transform  Transform;     //The orientation of the model.\n};\n```\n\nThe exact same number of bonesis specified inside every Frame, as per the initial list in exactly the same order. In effect, naming again, in every component, in every frame is redundant. This has since been corrected in the binarised rtm version.\n\n###### Transform\n\n```\nTransform\n{\n  XYZTriplet Triplet[4]; // eg float[4][3]\n};\n```\n\nThis is the transform matrix used directly by Microsoft DirectX engines.\n\nIn fact, the 'correct' matrix is actually 4 x 4, but the last column always represents 0,0,0,1 thus\n\n```\nM11,M12 M13 (0.0)\nM21,M22,M23 (0.0)\nM31,M32,M33 (0.0)\nM41,M42,M43 (1.0)\n```\n\nand so is never stored.\n\nsimilar Transform matrices are used for WRP and P3d files as well.\n\nThe last row (M41...) happens to be the position of the object X Z Y co-ordinates, and is often referred to separately.\n\nFor further information visit\n\n[Microsoft Transforms (Direct3D 9)](https://msdn.microsoft.com/en-us/library/windows/desktop/bb206269.aspx)\n\n### Examples\n\nBonenames apply to p3d models that have skeleton structure. This, chiefly, to class man objects (soldiers, civilians, etc). They are internal to the engines.\n\nThere are 25 bone names in ofp, and 65 in arma1.\n\n#### Ofp\n\n```\n           hlava(Head)\n           krk(Neck)\n           zebra(Spine) //ribs\n           hrudnik(Spine1 2 or 3) //chest\n            bricho(Pelvis) //abdomen\nlrameno(LeftShoulder) prameno(RightShoulder)\nlbiceps(LeftArm)      pbiceps(RightArm)\nlloket(LeftForeArm)   ploket(RightForeArm)\nlruka(LeftHand)       pruka(RightHand) //right fist\nlprsty(LeftHand)      pprsty(RightHand) //left right fingers\nlstehno(LeftUpLeg)    pstehno(RightUpLeg)\nlholen(LeftLeg)       pholen(RightLeg) // lower legs\nlchodidlo(LeftFoot)   pchodidlo(RightFoot)\nlzadek                pzadek          // right buttock\n           zbran(weapon)   //primary weapon proxy\n           roura(launcher) //secondary weapon proxy\n```\n\n#### Arma\n\n```\n          Head\n          Neck\n          Neck1\n          Spine\n          Spine1\n          Spine2\n          Spine3\n          Pelvis\nLeftShoulder  RightShoulder\nLeftArm       RightArm\nLeftArmRoll   RightArmRoll\nLeftForeArm   RightForeArm\nLeftForeArmRoll RightForeArmRoll\nLeftHand      RightHand\nLeftHandThumb1  RightHandThumb1\nLeftHandThumb2  RightHandThumb2\nLeftHandThumb3  RightHandThumb3\nLeftHandIndex1  RightHandIndex1\nLeftHandIndex2  RightHandIndex2\nLeftHandIndex3  RightHandIndex3\nLeftHandMiddle1 RightHandMiddle1\nLeftHandMiddle2 RightHandMiddle2\nLeftHandMiddle3 RightHandMiddle3\nLeftHandRing    RightHandRing\nLeftHandRing1   RightHandRing1\nLeftHandRing2   RightHandRing2\nLeftHandRing3   RightHandRing3\nLeftHandPinky1  RightHandPinky1\nLeftHandPinky2  RightHandPinky2\nLeftHandPinky3  RightHandPinky3\nLeftUpLeg              RightUpLeg\nLeftUpLegRoll          RightUpLegRoll\nLeftLeg                RightLeg\nLeftLegRoll            RightLegRoll\nLeftFoot(pchodidlo)    RightFoot\nLeftToeBase            RightToeBase\n           weapon\n           launcher\n           camera\n```","sections":[{"heading":null,"level":1,"markdown":"> **Disclaimer: This page describes internal undocumented structures of Bohemia Interactive software.**\n>\n> This page contains unofficial information.\n>\n> Some usage of this information may constitute a violation of the rights of Bohemia Interactive and is in no way endorsed or recommended by Bohemia Interactive.\n> Bohemia Interactive is not willing to tolerate use of such tools if it contravenes any general licenses granted to end users of this community wiki or BI products."},{"heading":"Binary Format","level":3,"markdown":"For binary rtm's see Rtm Binarised File Format"},{"heading":"Conventions","level":3,"markdown":"see Generic FileFormat Data Types"},{"heading":"Animations","level":3,"markdown":"- RTM files are applied to any P3d that has a 'skeleton'. Not ALL p3d's have them.\n\n- The appropriately termed 'skeleton' consists of 'bones' such as heads, arms, legs, feet, doors.\n\n- The skeleton as such, is not used by an rtm file. Part, or all, of the bones of the skeleton are.\n\n- An rtm frame consists of a collection of bones. Each frame contains identical bones but each of those bones are individually displayed at differing orientations.\n- The same rtm file can be applied to different p3d's on the assumption of course that the bone names in each of those p3d's are identical. This would be reasonable for a collection of soldiers eg.\n\nAnd so:"},{"heading":"RtmFile","level":3,"markdown":"```\nRtmFile\n{\n char[8] \"RTM_MDAT\"    //optional. Must appear 1st see frame properties. These are not asciiz\n char[8] \"RTM_0101\"; //mandatory\n};\n```"},{"heading":"RTM_MDAT","level":3,"markdown":"Introduced at arma3\n\n```\nProperties\n{\n char    \"RTM_MDAT\"\n ulong   Zeroes;\n ulong   nFrameProperties;\n Property[nFrameProperties];\n};\n```"},{"heading":"Property","level":4,"markdown":"```\n{\n float        phase;\n lAsciiz*    name;\n lAsciiz*    value;\n}\n```"},{"heading":"lAscii","level":5,"markdown":"```\n{\n  byte nChars   // there is no null char 'byte' might be a compressed byte (see flashpoint strings)\n  char [nChars];// there is no null char\n]\n```"},{"heading":"RTM_0101","level":3,"markdown":"```\nRtmData\n{\n char       \"RTM_0101\"\n XYZTriplet Vertex;                // Total Moving XZY. At 0,0,0 'soldier' runs in same spot.\n ulong      nFrames;               // Self Explanatory?\n ulong      nBones;                //\n BoneName   BoneNames[nBones];     //\n RtmFrame   Frames[nFrames];\n};\n```\n\nThe number of frames (and bones in each frame) extend to the end of file. There is no checksum or end of file signature."},{"heading":"BoneName","level":4,"markdown":"```\nchar BoneName[32];   //fixed 32 byte record for each bone. NOT asciiz\n```"},{"heading":"RtmFrame","level":4,"markdown":"```\nRtmFrame\n(\n  float          FrameTime; // Values 0.0 to 1.0\n  BoneTransform  Bone[nBones];\n};\n```"},{"heading":"Frametime","level":4,"markdown":"Represents a percentage of 'time' relative to the *total* time taken to display all frames.\nThe overall time is *not* indicated in the rtm. External sources cause the 'frames' to move\nfast, or slow, or whatever.\n\nThis is one of those parameters that are easy to understand, and difficult to explain.\n\nThe value represents percentage of the expiry time for the **entire** frameset.\n\nGiven ten frames, all of which you want displayed for the same amount of time. the frametime value would progress, 0,0.1,0.2,0.3 etc, not, as would be intuitive, 0.1,0.1,0.1,0.1........."},{"heading":"BoneTransform","level":5,"markdown":"```\nBoneTransform\n{\n  BoneName   BoneName;      //Identical to that found in header above, and in same relative order\n  Transform  Transform;     //The orientation of the model.\n};\n```\n\nThe exact same number of bonesis specified inside every Frame, as per the initial list in exactly the same order. In effect, naming again, in every component, in every frame is redundant. This has since been corrected in the binarised rtm version."},{"heading":"Transform","level":6,"markdown":"```\nTransform\n{\n  XYZTriplet Triplet[4]; // eg float[4][3]\n};\n```\n\nThis is the transform matrix used directly by Microsoft DirectX engines.\n\nIn fact, the 'correct' matrix is actually 4 x 4, but the last column always represents 0,0,0,1 thus\n\n```\nM11,M12 M13 (0.0)\nM21,M22,M23 (0.0)\nM31,M32,M33 (0.0)\nM41,M42,M43 (1.0)\n```\n\nand so is never stored.\n\nsimilar Transform matrices are used for WRP and P3d files as well.\n\nThe last row (M41...) happens to be the position of the object X Z Y co-ordinates, and is often referred to separately.\n\nFor further information visit\n\n[Microsoft Transforms (Direct3D 9)](https://msdn.microsoft.com/en-us/library/windows/desktop/bb206269.aspx)"},{"heading":"Examples","level":3,"markdown":"Bonenames apply to p3d models that have skeleton structure. This, chiefly, to class man objects (soldiers, civilians, etc). They are internal to the engines.\n\nThere are 25 bone names in ofp, and 65 in arma1."},{"heading":"Ofp","level":4,"markdown":"```\n           hlava(Head)\n           krk(Neck)\n           zebra(Spine) //ribs\n           hrudnik(Spine1 2 or 3) //chest\n            bricho(Pelvis) //abdomen\nlrameno(LeftShoulder) prameno(RightShoulder)\nlbiceps(LeftArm)      pbiceps(RightArm)\nlloket(LeftForeArm)   ploket(RightForeArm)\nlruka(LeftHand)       pruka(RightHand) //right fist\nlprsty(LeftHand)      pprsty(RightHand) //left right fingers\nlstehno(LeftUpLeg)    pstehno(RightUpLeg)\nlholen(LeftLeg)       pholen(RightLeg) // lower legs\nlchodidlo(LeftFoot)   pchodidlo(RightFoot)\nlzadek                pzadek          // right buttock\n           zbran(weapon)   //primary weapon proxy\n           roura(launcher) //secondary weapon proxy\n```"},{"heading":"Arma","level":4,"markdown":"```\n          Head\n          Neck\n          Neck1\n          Spine\n          Spine1\n          Spine2\n          Spine3\n          Pelvis\nLeftShoulder  RightShoulder\nLeftArm       RightArm\nLeftArmRoll   RightArmRoll\nLeftForeArm   RightForeArm\nLeftForeArmRoll RightForeArmRoll\nLeftHand      RightHand\nLeftHandThumb1  RightHandThumb1\nLeftHandThumb2  RightHandThumb2\nLeftHandThumb3  RightHandThumb3\nLeftHandIndex1  RightHandIndex1\nLeftHandIndex2  RightHandIndex2\nLeftHandIndex3  RightHandIndex3\nLeftHandMiddle1 RightHandMiddle1\nLeftHandMiddle2 RightHandMiddle2\nLeftHandMiddle3 RightHandMiddle3\nLeftHandRing    RightHandRing\nLeftHandRing1   RightHandRing1\nLeftHandRing2   RightHandRing2\nLeftHandRing3   RightHandRing3\nLeftHandPinky1  RightHandPinky1\nLeftHandPinky2  RightHandPinky2\nLeftHandPinky3  RightHandPinky3\nLeftUpLeg              RightUpLeg\nLeftUpLegRoll          RightUpLegRoll\nLeftLeg                RightLeg\nLeftLegRoll            RightLegRoll\nLeftFoot(pchodidlo)    RightFoot\nLeftToeBase            RightToeBase\n           weapon\n           launcher\n           camera\n```"}],"categories":["Operation Flashpoint: Modelling","Real Virtuality File Formats"],"groups":["Tools and File Formats"]}