How to export animated objects from Blender for MSFS
This article explains how to create 3D objects in Blender that rotate, scale, or perform other animations, and import them into Microsoft Flight Simulator (MSFS) scenery. To do this, we will use glTF-Blender-IO-MSFS , a plugin that allows Blender to export 3D data for MSFS. In the game, you can rotate radar antennas, lighthouse lights, windmills, and more, and use scaling to make lights (light-emitting objects) blink.
このページを日本語で見る
Contents
Installing the Blender plugin glTF-Blender-IO-MSFS
To create add-on content for Microsoft Flight Simulator, you will need to install various tools onto your computer, including the Blender plugin glTF-Blender-IO-MSFS. Please refer to the page below.Creating animated 3D objects with Blender
First, we will explain how to create a 3D object with a simple animation (action).
First, decide the number of frames for your animation. Click on the area indicated by the arrow in the image and enter the number of frames.
Here we'll define a 180 frame animation. Blender's animation playback speed is about 22.5 fps, so specifying 180 frames will result in a roughly 8 second animation.

First, in the top right of the screen, click to select the part you want to animate, "Cone." Next, drag the blue square left and right on the timeline at the bottom left of the screen to select 1 (frame). Finally, click the

However, with regards to the "Scale" column, regardless of which axis you specify, the scale will be the same in all axis directions when imported it into MSFS. You cannot change the shape of an object using the "Scale" column. When using the "Scale" field, it is sufficient to specify only one axis.

Additionally, an orange dot will appear on the first frame of the timeline at the bottom left of the screen, indicating that a keyframe has been set. The color of the Z-axis field under "Transform" - "Rotation" at the bottom right of the screen will turn yellowish, and the "・" mark on the right will change to a "◆" mark.
The generated node name "ConeAction" can be changed by clicking on it. You can delete this animation by selecting "Clear Animation Data" from the right-click menu.


Now try clicking the [▶] button at the bottom centre of the screen. The cone parts should rotate 360 degrees approximately once every 8 seconds. You can also see the cone parts rotating by dragging the blue square left and right on the timeline at the bottom left of the screen.

But this setting is not absolutely required. For example, animations such as opening and closing a door may be better suited to Bézier curve animations.
Setting Blender animation for MSFS
From here onwards, we will be configuring for MSFS. The task is to "add the generated actions to the NLA (NonLinear Animation) stack." However, you don't need to understand what this means :P[Technical explanation]
Converts individual actions into new NLA strips (tracks) that are placed on top of the NLA stack. You can then use the NLA Editor to edit multiple animations at the same time. The NLA stack allows you to assign and manage multiple actions to a single object.






Your animated object is now ready, export it using the plugin glTF-Blender-IO-MSFS .



Output animation objects to glTF format files for MSFS
Use the plugin glTF-Blender-IO-MSFS to output the animation object you created to a glTF format file for MSFS. For information on how to use glTF-Blender-IO-MSFS, see the page How to use glTF-Blender-IO-MSFS to export and import 3D data between Blender and MSFS .
How to use glTF-Blender-IO-MSFS to export and import 3D data between Blender and MSFS

In the "Object" tab, specify the objects to export. Select the collection you want to export from the collection list in the upper right of the screen. Next, click the "Reload LODs" button. Then, each mesh data in the scene will be recognized and displayed in a list. Check "Grouped by collections".
Check "Genete XML" when exporting for the first time. Uncheck "Genete XML" if you are exporting for the second or subsequent time to correct the model.
In the "Export Path" field, specify the destination folder for the .glTF file.
In the field below that, select the name of the collection to export (here, "tower").

This image shows an example for Blender version 3.3.
Check the boxes in the "Animation" column as shown in this image. "Always Sample Animations" is unchecked by default. Check this box manually. If this box is not checked, animations will not work properly in-game.

For “Animation Mode”, select “NLA Tracks”. And check the boxes in the "Animation" column as shown in this image. "Sampling Animations" is unchecked by default. Check this box manually. If this box is not checked, animations will not work properly in-game.


Note that even if you do not specify [Interpolation Mode]-[Linear] in Blender, "LINEAR" will be set here. In that case, the animation will generate a Bézier curve movement.
"animations":[
{
"channels":[
{
"sampler":0,
"target":{
"node":1,
"path":"rotation"
}
}
],
"name":"ConeAction",
"samplers":[
{
"input":8,
"interpolation":"LINEAR",
"output":9
}
]
}
],
Add animation tag to object XML file
To make animations exported from Blender work in MSFS games, you need to add animation tags to the ".xml" file automatically generated by the exporter plugin. This is done only once at the beginning. If you re-export the model after making corrections, you don't need to add it again. Instead, use the xml file you added last time as is. Be careful not to overwrite this xml file when exporting.For more information on the xml files that define 3D models and animation tags, see the following page.
MODEL DEFINITIONS (MSFS SDK docs)
MODEL ANIMATION DEFINITIONS (MSFS SDK docs)
The content of the xml file automatically generated by the exporter plugin will be one of the following.
<?xml version="1.0" encoding="utf-8"?>
<ModelInfo guid="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" version="1.1">
<LODS>
<LOD minSize="0" ModelFile="tower.gltf"/>
</LODS>
</ModelInfo>
or
<?xml version="1.0" encoding="utf-8"?>
<ModelInfo guid="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" version="1.1"/>
Add a line with the animation tag
<Animation name="ConeAction" guid="yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy" type="Standard" typeParam="Autoplay"/>
to it.
In the name="ConeAction" field, write the name of the animation action you incorporated in Blender (the NlaTrack track name).
In the guid="yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy" field, obtain a globally unique GUID and write it there.
How to obtain a GUID
There are several tools to generate GUIDs, including the software development tool "Microsoft Visual Studio." Here we will use the Online GUID / UUID Generator , which is available for free online.

You can specify the output format in the "Format:" field. Check "Hyphens".
You can specify the encoding format in the "Encording:" field. There is no need to check anything. Then click the [Generate some GUIDs!] button.

GUIDs (MSFS SDK docs)
Completed xml file
After adding the animation tag, the completed xml file will look like this:
<?xml version="1.0" encoding="utf-8"?>
<ModelInfo guid="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" version="1.1">
<LODS>
<LOD minSize="0" ModelFile="tower.gltf"/>
</LODS>
<Animation name="ConeAction" guid="yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy" type="Standard" typeParam="Autoplay"/>
</ModelInfo>
or
<?xml version="1.0" encoding="utf-8"?>
<ModelInfo guid="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" version="1.1">
<Animation name="ConeAction" guid="yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy" type="Standard" typeParam="Autoplay"/>
</ModelInfo>
When multiple animations are set for one model, the animation tag will also be written on multiple lines.
Note that if the ModelInfo line originally ended with "/>", don't forget to delete this "/".
Checking animated objects in-game

How to use glTF-Blender-IO-MSFS to export and import 3D data between Blender and MSFS
When animations don't work
If the animation doesn't work, please check the following two points:Exporter Plugin "Settings" Tab
Make sure the "Sampling Animations" or "Always Sample Animations" option is checked in the "Settings" tab of the exporter plugin.

animation tag in xml file
Make sure that the name of the animation action you incorporated in Blender (the NlaTrack track name) is correctly written in the "name=" field of the animation tag in the xml file. If there is a spelling mistake here, the animation will not work.
When you delete an animation (Clear Animation Data) and reset it in Blender, a sequence number such as ".001" is added to the end of the action's name. In this case, rename the action (remove the sequence number) in the Collection screen before adding it to the NLA stack. Or modify the animation tag in the xml file.