Vitus
Resource contributor
- Messages
- 1,480
- Country
The following information is a primer for asset creation for MSFS. Information presented here is meant as a supplement to the documentation found in the official SDK. Described here are some of the more important aspects of 3D asset design, especially those that are fundamentally different to older methods for P3D/FSX.
This document is by no means complete, but should give everyone a good starting point.
The following information was compiled and written by @Deano1973 and @Vitus.
glTF 2.0
The glTF format for 3D models was developed by the Khronos group, the same group that developed the openGL standard. glTFs are designed with fast rendering in mind, while simultaneously retaining a high level of flexibility and customization.
The 2020 Microsoft Flight Simulator is using the glTF 2.0 format for all 3D assets. And while the format itself is so universal that most 3D programs can export into it, special consideration has to be given when it comes to MSFS assets. The flight simulator's rendering engine makes heavy use of special extensions, which tell the sim HOW some of the materials are being rendered. This is why you will still need a customized exporter that can add those extensions to the glTF file.
You can find the schemata of the MSFS extensions and extras in the SDK under "Schemas".
Model topology
added 19/08/2020
It is worthwhile pointing out, that glTF files do not like rectangles. So, when building your topology, don't stretch the polygons to far out in one side, instead try to keep everything square. stretched polygons tend to distort the textures of the model, so rather add another edge-loop. It's not 2006 anymore!
Model behavior
The way your 3d assets come to life in the sim is fundamentally different to what we’ve all been used to in FSX/P3D. When it comes to animations, visibility conditions, mouse-interactions or attach points, clear your head of all previous knowledge and let's start afresh! All those types of interactions are now grouped together into one category, the "model behavior".
At the moment of writing this, the SDK doesn't include details on how the new system works. So the information provided here has to be taken with a grain of salt and should be updated as more information becomes available.
For FSX/P3D model behaviors were defined utilizing and appending the modeldef.xml file of the SDK. The .mdl exporter would then take the relevant section of code from the modeldef file and write it into the .mdl file.
The new MSFS is going about this problem in a different way. 3D assets are now deployed with an accompanying mode behavior file. For aircraft, these XML files can be found in the 'model' folder. This XML file contains a <ModelInfo> node, which is pointing to the glTF file for the 3D asset, or even multiple glTF files if necessary. The second node in the file is the <ModelBehaviors> node, which references all animations, visibility conditions and mouse interactions for that model. Generally speaking, the node will link to a number of include files, which contain what's called "templates", and those templates are then referenced for each <component>.
The object in the glTF file doesn't contain any more references to a specific behavior, instead it is the model behavior file that contains a reference to the part of the 3D model. This reference can be the name of the object, or the name of the animation of an object - depending on the template you are using.
Since the 3D model itself doesn't contain any references to the behavior, a user interface to attach said behavior is not required in your 3D modeling program anymore. The link between an animated object in your 3D asset and a specific model behavior can be made by editing the model behavior file for your 3D asset.
Packages
Asobo updated the way flight simulator addons are deployed to the sim. All addons are now deployed in the form of “packages”, which can be built using the fspackagetool.exe in the SDK. There is also a way to create those packages from within the flight simulator, however this option currently has some problems when updating textures, so while this problem consists, it is recommended to use the external package tool from the SDK instead.
Note that using either of the package creation tools will produce a new folder with all the content needed for deployment. It will also convert all PNG/JPG textures into DDS files and create manifest files for each file of the package. It is therefore not advised to manually edit any content of a package, but instead always use the package tool to update your project for the sim.
Forward Axis
The “forward” direction of aircraft has flipped. When porting aircraft into the new flight simulator, the first thing you would want to do is turn the model by 180 degrees around the z axis. Unfortunately, a simple rotation will only work for objects that don’t have keyframes. Therefore, if you want to rotate an aircraft that is already fully animated, you need to find a way to “key in” this transform. One easy solution is to create a new empty at the origin of your scene, attach all parent nodes of your hierarchy to that empty and then rotate the empty by 180 degrees around.
Material composition
The material composition for PBR materials is different to the PBR material of P3D. For MSFS, the metallic textures are composed of:
R-channel: Ambient Occlusion
G-channel: Roughness (NOT smoothness!)
B-channel: Metallic
Textures
Due to limitations of both the Khronos Exporter as well as the packagetool, it is recommended to use PNG files for your textures. As described above, those textures are always automatically converted to the DDS format by the packagetool.
Normal map shenanigans
Normal maps for MSFS follow the industry standard. When you create normal maps, make sure to use the directX format and don’t do the old-school “red-in-alpha”.
Animations
In order to export animations from Blender, it is necessary to perform a number of steps in order that the simulator can “read” from the Model Behaviour File the animation conditions of the object in question.
In the first instance, animate the object required as one would normally do, and give the item an animation name. A list of Simulation Variables is available in the MSFS Software Development Kit. In this example, we will animate the rudder of an airplane in Blender 2.83, but a similar procedure applies to 3DSMax.
Here, the rudder is selected while using the animation screen. Using a stock animation such as the rudder, the number of keyframes should match those of the stock part. In the case of the rudder, it’s 100 frames.
After exporting the model, the Model Behaviour File will need to be adjusted according to the reference name of the actual animation in Blender/3DSMax. This is not the name we are used to seeing - rudder_percent_key, but can instead be found at the left of the screen;
The animation name is in fact RudderLAction. This name should be inserted into the relevant entry in the behaviour file, which would read as follows;
A similar entry for RudderRAction would appear for the right rudder on a twin-tail airplane.
All animations have this secondary naming convention for any animated component on the airplane. It is also possible to re-name the animation within Blender via the parts list at top right, by selecting first the component, and then its animation entry: double click on the animation name, or press F2, and re-name as required.
While this process is more convoluted than the direct export from Blender to MDL format, it has the advantage that animations, once assigned, can be edited at will, from within the simulator using the project editor. The user can change the name of an animation, use the editor to re-synch the airplane, and those changes will be updated in the model within the simulator.
The Behaviour file can be edited to access both existing stock templates and even those created by the user, with specific lists of entries pertaining to the aircraft model in question, allowing for considerable modification without affecting the simulator’s stock behaviour files.
This document is by no means complete, but should give everyone a good starting point.
The following information was compiled and written by @Deano1973 and @Vitus.
glTF 2.0
The glTF format for 3D models was developed by the Khronos group, the same group that developed the openGL standard. glTFs are designed with fast rendering in mind, while simultaneously retaining a high level of flexibility and customization.
The 2020 Microsoft Flight Simulator is using the glTF 2.0 format for all 3D assets. And while the format itself is so universal that most 3D programs can export into it, special consideration has to be given when it comes to MSFS assets. The flight simulator's rendering engine makes heavy use of special extensions, which tell the sim HOW some of the materials are being rendered. This is why you will still need a customized exporter that can add those extensions to the glTF file.
You can find the schemata of the MSFS extensions and extras in the SDK under "Schemas".
Model topology
added 19/08/2020
It is worthwhile pointing out, that glTF files do not like rectangles. So, when building your topology, don't stretch the polygons to far out in one side, instead try to keep everything square. stretched polygons tend to distort the textures of the model, so rather add another edge-loop. It's not 2006 anymore!
Model behavior
The way your 3d assets come to life in the sim is fundamentally different to what we’ve all been used to in FSX/P3D. When it comes to animations, visibility conditions, mouse-interactions or attach points, clear your head of all previous knowledge and let's start afresh! All those types of interactions are now grouped together into one category, the "model behavior".
At the moment of writing this, the SDK doesn't include details on how the new system works. So the information provided here has to be taken with a grain of salt and should be updated as more information becomes available.
For FSX/P3D model behaviors were defined utilizing and appending the modeldef.xml file of the SDK. The .mdl exporter would then take the relevant section of code from the modeldef file and write it into the .mdl file.
The new MSFS is going about this problem in a different way. 3D assets are now deployed with an accompanying mode behavior file. For aircraft, these XML files can be found in the 'model' folder. This XML file contains a <ModelInfo> node, which is pointing to the glTF file for the 3D asset, or even multiple glTF files if necessary. The second node in the file is the <ModelBehaviors> node, which references all animations, visibility conditions and mouse interactions for that model. Generally speaking, the node will link to a number of include files, which contain what's called "templates", and those templates are then referenced for each <component>.
The object in the glTF file doesn't contain any more references to a specific behavior, instead it is the model behavior file that contains a reference to the part of the 3D model. This reference can be the name of the object, or the name of the animation of an object - depending on the template you are using.
Since the 3D model itself doesn't contain any references to the behavior, a user interface to attach said behavior is not required in your 3D modeling program anymore. The link between an animated object in your 3D asset and a specific model behavior can be made by editing the model behavior file for your 3D asset.
Packages
Asobo updated the way flight simulator addons are deployed to the sim. All addons are now deployed in the form of “packages”, which can be built using the fspackagetool.exe in the SDK. There is also a way to create those packages from within the flight simulator, however this option currently has some problems when updating textures, so while this problem consists, it is recommended to use the external package tool from the SDK instead.
Note that using either of the package creation tools will produce a new folder with all the content needed for deployment. It will also convert all PNG/JPG textures into DDS files and create manifest files for each file of the package. It is therefore not advised to manually edit any content of a package, but instead always use the package tool to update your project for the sim.
Forward Axis
The “forward” direction of aircraft has flipped. When porting aircraft into the new flight simulator, the first thing you would want to do is turn the model by 180 degrees around the z axis. Unfortunately, a simple rotation will only work for objects that don’t have keyframes. Therefore, if you want to rotate an aircraft that is already fully animated, you need to find a way to “key in” this transform. One easy solution is to create a new empty at the origin of your scene, attach all parent nodes of your hierarchy to that empty and then rotate the empty by 180 degrees around.
Material composition
The material composition for PBR materials is different to the PBR material of P3D. For MSFS, the metallic textures are composed of:
R-channel: Ambient Occlusion
G-channel: Roughness (NOT smoothness!)
B-channel: Metallic
Textures
Due to limitations of both the Khronos Exporter as well as the packagetool, it is recommended to use PNG files for your textures. As described above, those textures are always automatically converted to the DDS format by the packagetool.
Normal map shenanigans
Normal maps for MSFS follow the industry standard. When you create normal maps, make sure to use the directX format and don’t do the old-school “red-in-alpha”.
Animations
In order to export animations from Blender, it is necessary to perform a number of steps in order that the simulator can “read” from the Model Behaviour File the animation conditions of the object in question.
In the first instance, animate the object required as one would normally do, and give the item an animation name. A list of Simulation Variables is available in the MSFS Software Development Kit. In this example, we will animate the rudder of an airplane in Blender 2.83, but a similar procedure applies to 3DSMax.
Here, the rudder is selected while using the animation screen. Using a stock animation such as the rudder, the number of keyframes should match those of the stock part. In the case of the rudder, it’s 100 frames.
After exporting the model, the Model Behaviour File will need to be adjusted according to the reference name of the actual animation in Blender/3DSMax. This is not the name we are used to seeing - rudder_percent_key, but can instead be found at the left of the screen;
The animation name is in fact RudderLAction. This name should be inserted into the relevant entry in the behaviour file, which would read as follows;
Code:
<UseTemplate Name="ASOBO_HANDLING_Rudder_Template">
<ANIM_NAME>RudderLAction</ANIM_NAME>
</UseTemplate>
A similar entry for RudderRAction would appear for the right rudder on a twin-tail airplane.
All animations have this secondary naming convention for any animated component on the airplane. It is also possible to re-name the animation within Blender via the parts list at top right, by selecting first the component, and then its animation entry: double click on the animation name, or press F2, and re-name as required.
While this process is more convoluted than the direct export from Blender to MDL format, it has the advantage that animations, once assigned, can be edited at will, from within the simulator using the project editor. The user can change the name of an animation, use the editor to re-synch the airplane, and those changes will be updated in the model within the simulator.
The Behaviour file can be edited to access both existing stock templates and even those created by the user, with specific lists of entries pertaining to the aircraft model in question, allowing for considerable modification without affecting the simulator’s stock behaviour files.
Last edited: