Lesson 3 - Breaking Down the DNM File

The DNM file houses all visual animation information. Therefore it makes sense to dig into it to learn about what is required for a YSFlight animation.

DNM File Structure

DNM files are typically structured in 2 parts. Part 1 defines the different meshes used in the model. Part 2 defines how the meshes should be placed, animated and related to other parts of the model. While Part 1 can have several different flavors, including referring to external .srf files, Part 2 is fairly standard.

Stock F-22 DNM

For this lesson I will be using the Stock F-22 DNM file from the 2015 version of YSFlight. I've uploaded a copy in case you cannot find yours. We will break down some of the key parts of this block in order to understand what we are creating in Blender.

SRF "NoseGear"

FIL 00000112.srf

CLA 0

NST 2

STA 0.0000 0.0000 0.0000 -32767 15218 -32767 0

STA 0.0000 0.0000 0.0000 0 0 0 1

POS 0.0000 -0.5514 2.8518 0 0 0 1

CNT 0.0000 -0.5514 2.8518

PAX 1.000000 0.000000 0.000000

REL DEP

NCH 2

CLD "NoseGearStrut-1"

CLD "LandingLight"

END

CLA

The CLA number indicates what kind of animation is applied to this particular object. There are dozens of different animations, but a complete list can be found on the YSFlight Wiki. In Blender some of these animations are listed in a drop-down menu in the DNM View script. In the example above, the CLA number is zero indicating that this object is either not animated or part of the landing gear. When starting to define animations you will see in Blender that the default CLA number is zero precisely for this reason.

On a side note, there has not been a project I have worked on without needing to refer to the CLA and STA tables (See below) on the YSFlight Wiki. This resource is something you should 100% use.

NST / STA

These lines tell YSFlight where to move an animation. Some animations require a different number of STAs because there is more information required. The YSFlight Wiki page on CLAs breaks down what CLAs require what STAs. One key piece of information in this page is what Order the STAs are defined in. CLAs will require between 1 and 3 STAs which we will define in Blender. If the STAs are not defined in the correct order then the animation will not look right.

The STAs define the X, Y, Z position, X, Y, Z rotations, and visibility of the object at that particular point in the animation.

NCH / CLD

These lines indicate if the object has any children. If it does, it will list how many and place their SRF name on individual lines.

DNM & YSFlight Animation Limitations

YSFlight has quire a few limitations when it comes to animations. Working around these limitations for more complex animations becomes a regular occurrence but when you get to that point, it will be like second nature.

  1. Only one CLA can be applied to any object.

  2. Only predefined and hard-coded CLAs can be used.

  3. Only position, rotation and visibility can be described with STAs

  4. Animations only travel linearly between STAs.

The Big Picture

The DNM file must convey our intent to have certain components animated in specific ways. The CLAs link a player's input (for example flaps) to specific components in the DNM file. YSFlight then executes the animation looking at what STAs are applied to know where to move a component to. While there are certainly animations we wish we could have, within the constraints of YSFlight CLAs and STAs there is an incredible amount that can be done. Once you work through these animations lessons and practice on your own, you will have all the tools needed to experiment and innovate with animations.

When ready, you can proceed to the next lesson!