Dynamic Model, DynaModel, DNM, or .dnm files are a type of visual file that allows animation of certain parts. Every .dnm is made up of one or more .srf. The internal .srfs can be applied to any of the animation channels (CLA) and moved in-game by the appropriate control. The entirety of an animated aircraft visual model is contained within a .dnm.
File structure[]
The DNM file has two main sections, one for mesh definition and one for mesh property and animation definition.
Header[]
The header declares the dnm format version (currently only the 2011 aircraft additions have .dnms that are a version other than 1, so DNMVER 2 features are not entirely understood).
DYNAMODEL DNMVER 1
Mesh Definition Section[]
Mesh objects or SRFs can be defined inside the DNM file or an externally defined SRF can be linked inside the DNM.
Internally-Defined SRFs[]
Unlike stand-alone SRF files, additional properties can be defined after the mesh generation. The SRF mesh definition format is identical to stand-alone SRF files, however the first line is different.
PCK Cube 44
PCK indicates an internally defined object, the second element is the name of the internally-defined mesh object and the number indicates the number of lines that the internally-defined SRF takes up, including any and all DNM-specific face property modifications.
DNM Internally-Defined SRF Face Modifiers Edit[]
The codes will appear in the SRF definition section in the order they appear in the list. GF lines first, followed by ZA, ZL and finally ZZ lines. These modifiers will only appear if a face has one of them applied. For an SRF object without any of these modifiers, no additional lines beyond a stand-alone SRF file will be present in the DNM file. The exception for this is when the SRF file is external to a DNM file and linked in the DNM file.
Code |
Format |
Meaning |
---|---|---|
GF | GF FACEID FACEID ... | TBD |
ZA | ZA FACEID VALUE FACEID VALUE... Up to 10 face / value elements per line. | he transparency or Alpha of a face (0=opaque/255=clear). |
ZL | ZL FACEID FACEID FACEID ... Up to 10 face ids per line. | Creates a sprite at the center of the face. |
ZZ | TBD | TBD |
Externally Defined SRFs[]
Externally defined SRF files are handled in the SRF Object Property Definition section.[]
SRF Object Property Definition[]
The second half of the DNM file controls virtually everything about each of the SRF meshes. The section starts with a line that begins with "SRF" and finishes with a row that only has "END" in it.
SRF "0076" FIL parts/afterburner.srf CLA 2 NST 2 STA -0.0000 0.0000 0.0000 0 0 0 0 STA -0.0000 0.0000 0.0000 0 0 0 1 POS -0.0000 0.0000 0.0000 0 0 0 1 CNT 0.00 0.00 0.00 REL DEP NCH 1 CLD "0077" END
The Table below shows the different meaning of each prefix and the format of the data that will be on each line.
Line Prefix | Format | Meaning |
---|---|---|
SRF | SRF "Overall SRF Name" | This line begins the SRF Property definition for an object that will be named as the characters inside the quotation marks. |
FIL | FIL [Path or Internal Mesh Name] | The FIL line assigns a mesh to the SRF. This can be either an internally defined SRF or an externally defined SRF. If the mesh is internally defined, then the name will match the PCK line of the SRF. If the SRF is externally defined, then the path from the .dnm file's location to the mesh is required. |
CLA | CLA # | The CLA number defines the type of animation applied to the SRF. If no animation is applied, then this will default to zero. See the CLA page for a breakdown of the different types of animations are associated with which number. |
NST | NST # | The number of STAs that are valid for this animation. |
STA | STA # # # # # # # | The 7 numbers indicate the (y,z,x) position, (y,z,x) rotation and visibility of the SRF at each STA condition. See the STA page for more information about STAs. |
POS | POS | The position of the srf, for example left side landing gear |
CNT | CNT | The centre of rotation of the object defined in the .srf |
REL | ||
NCH | NCH # | The number of child object linked to this SRF object |
CLD | CHD "Name" | The name of the SRF Object (see SRF line) that is a child of this SRF object. |
END | Finishes off the SRF Properties definition section. |
nsert Text here
SRF "F-35B_cam" FIL Mesh.017 CLA 0 NST 0 POS -0.0000 0.0000 0.0000 0 0 0 0 CNT 0.00 0.00 0.00 REL DEP NCH 0 END
The .dnm has two sections, a header, and a footer.
The second section of the dynamodel is the pack section. The pack section lists individual .srf segments in the format of:
PCK "FILENAME.SRF" [NUMBER OF LINES IN THIS .SRF]
[.srf goes here] (contains a large number of lines with many numbers, each denoting a vertex, or a point in the file. These are then joined into polygons later in the code.)
All of the .srf meshes that will be included in the dnm for use as animation or static meshes will be listed in the first part of the file.
Following this is a section that positions, rotates, declares centerpoints, and attributes the CLA animation to each .srf. This section is also used to declare children models, which move in coordination with parent models. See reconfighter's tutorial for more on the .dnm.