• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

MSFS Primer to 3D asset creation for MSFS

Vitus

Resource contributor
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.

animation1.png


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;

animation2.png


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.

animation3.png


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:
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".
After reviewing the sample aircraft in the SDK, this "model behaviour" IS the old modeldef.xml, just not precompiled into the model binary (which is awesome). So I really don't think that it is "fundamentally different"

...

Wait, wait, wait.

...

As I was writing this I though, surely OP MUST be correct in their assertion. So I went and checked the XML file in the Caravan's XML files.... Sure enough that has the ModelBehaviours object. Hmmmmm OK So instead of looking at the sample aircraft we have to dig through the existing aircraft. Good to know :D
 

Vitus

Resource contributor
The way this was explained to us is the following:
Underlying all of this, MSFS is using the same procedures to read those animation/visibility/mouserect functions. The big, big difference is that this functionality now comes in form of those highly-parameterizable templates, which are loaded through #includes at the beginning of the xml behavior file of the aircraft. Digging into those templates, you'll be left scratching your head, because it looks very convoluted, because the top-level includes, like common.xml just include a bunch of other template files, which itself include a bunch of other templates, which include some sub-templates. But once you reach the bottom of this, you'll find kind-of-familiar modeldef-similar code. Internally, the sim is flattening out this structure and compiling it.
You can actually define your own templates and deploy them as a separate assetGroup in your package.

All that said, you're right in pointing out that the sampleAircraft source is using old-style animation code and it works just fine. So to convert an aircraft, this is certainly the fastest way to go about this. (You'll still have to flip the aircraft by 180 degrees, which is a pita in Blender)
 

Pyscen

Resource contributor
@Vitus

Are you sure about that flipping 180 degrees is difficult in Blender. If it Blender is set for Global, yes it would be difficult. Changing it to Local should help and make it easier.
 

Vitus

Resource contributor
Local or global makes no difference in this case - if the part has keyframes, you can't just flip it by 180 without keying in the rotation to all keyframes as well. That at least has been my experience so far. Someone on blenderartists recommended to put everything into a collection, link-duplicate it, which will allow you to set a transform for the collection as a whole, but so far I had no luck getting that to work.
 

Pyscen

Resource contributor
That does make sense. Sounds like that Blenderartist is suggesting to place in a different "Collection", much like a backup mechanism but not sure about "linking it" is the right term. That would defeat the purpose would it not?. After you have done the correction you would most likely need to reset the scale and rotation. Is that a possible reason why you are having difficulty?
 

Vitus

Resource contributor
For aircraft modeling, The package has to be rebuilt every time there is an update to the gltf?
No. The way that I currently do it is by opening the package in dev mode from within the sim to have the aircraft show up in the menu. When you change something about model or texture, you can use the "Resync" button in the aircraft tool to reload the aircraft with the new assets, no rebuild needed.
 
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.

View attachment 60884

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;

View attachment 60885

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.

View attachment 60886

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.
Thank you very much for the details, would you be willing to share with us your source code for your project above please? I am trying to fix the FA-18 and would really appreciate another example to bounce across.
 
Thank you very much for the details, would you be willing to share with us your source code for your project above please? I am trying to fix the FA-18 and would really appreciate another example to bounce across.
The only way to "fix" the FA18 would be to redo it as a fully native model. Even then the Sim does not yet support fast Jets. You would also have to convert all the gauges to new native HTML gauges.
 
Vitus,

Thanks so much for the new tool. I reviewing the animation portion in this post and can't quite figure out how stock behaviors were tagged to the model. I have the MSFS Properties listed under Object Properties but nothing is listed beneath and there is no ability to tag. Sorry if this has been addressed someplace else. I am trying to wrap my head around all the new changes. I am using version .37.

Many thanks

Wally
 
Vitus,

Thanks so much for the new tool. I reviewing the animation portion in this post and can't quite figure out how stock behaviors were tagged to the model. I have the MSFS Properties listed under Object Properties but nothing is listed beneath and there is no ability to tag. Sorry if this has been addressed someplace else. I am trying to wrap my head around all the new changes. I am using version .37.

Many thanks

Wally
We "tag" the animations by "naming" the NLATrack :D
1600322724047.png


And then in the ModelBehavious section of the XML we reference the animation and node:
Code:
<UseTemplate Name="ASOBO_HANDLING_Elevator_Template">
    <TRIM_ONLY>True</TRIM_ONLY>
    <ANIM_NAME_TRIM>trimtab_elevator_key_pct</ANIM_NAME_TRIM>
</UseTemplate>

This template references and animation only, so we insert the NLA Track name `trimtab_elevator_key_pct`

Code:
<UseTemplate Name="ASOBO_ENGINE_Propeller_Template">
    <ID>1</ID>
    <ANIM_NODE_ID>prop0_rotate</ANIM_NODE_ID>
    <ANIM_NAME>prop01_rotate</ANIM_NAME>
    <STILL_NODE_ID>prop0_still</STILL_NODE_ID>
    <SLOW_NODE_ID>prop0_slow</SLOW_NODE_ID>
    <PROP_BLURRED_NODE_ID>prop0_blurred</PROP_BLURRED_NODE_ID>
</UseTemplate>

This template references an animation `ANIM_NAME` and a node/object `ANIM_NODE_ID`
1600322942136.png

So you see i have objects (or nodes) called prop0_still/slow/blurred and an animation track called prop01_rotate

These NLA Tracks allow us to combine the animation from several objects to a single reference:
1600323063722.png

(there's actually about 8 more objects in that animation "group" :D
 
Hey guys,
just dropping in to see if I understand the procedures of animating an aircraft right.
From examining the sample files I mean to understand the following:

We animate helper objects, not the actual geometry (using 3dsmax terms here)

So the procedure would be to
- create a helper object, animate it and link the actual geometry to it.
- The animated helper objects (not the geometry) are put into a Babylon animation group
- those animation groups are named according to the sim variables

Is that correct so far?
 

Vitus

Resource contributor
You can animate the helper or the part itself - makes no difference. The important things is that you pass the name of the animation to the animation template/modeldef behavior in your behavior XML file.

Templates are a beast to get into - I personally find it easier to write my own rather than trying to understand what variables I need to set using Asobo templates. But I stick to their nomenclature as much as I can - <ANIM_NAME> will set the name of the animation, <NODE_ID> will set the name of the object, <ID> to keep the template flexible.

If you just need animations, you usually don't need to reference a NODE_NAME, it's enough to reference just the animation name. NODE_IDs are necessary if you want to interact with the object, or if you want to set it's visibility. If you're writing templates, make sure that all behaviors that are interactive in this way have a separate <Component>.
 
You can animate the helper or the part itself - makes no difference. The important things is that you pass the name of the animation to the animation template/modeldef behavior in your behavior XML file.

Templates are a beast to get into - I personally find it easier to write my own rather than trying to understand what variables I need to set using Asobo templates. But I stick to their nomenclature as much as I can - <ANIM_NAME> will set the name of the animation, <NODE_ID> will set the name of the object, <ID> to keep the template flexible.

If you just need animations, you usually don't need to reference a NODE_NAME, it's enough to reference just the animation name. NODE_IDs are necessary if you want to interact with the object, or if you want to set it's visibility. If you're writing templates, make sure that all behaviors that are interactive in this way have a separate <Component>.
Vitus, I have been following the discussions for a bit but only found this topic recently and I must say thank you because after re-reading it for a couple of days it finally made sense to me and I have been able to proceed down the road to getting my plane into the sim. I have a small problem though that maybe you or one of the other kind folk around here may be able to make sense off. When in 3ds Max, the animation is fine (gear door example pics below), but in the sim, it doesn't appear to complete he cycle (pic 2). Might you have any idea why this might be happening?
animation problem 2.jpg
animation problem 1.jpg
 
Hi,

Templates are the Samples directory in the SDK installation.
For your animation, are you sure to use the max lenght of the animation : if it is defined between 0-100, you should have a keyframme at 0 and the final to 100 on the time scale.
 
Last edited:
Hi,

Templates are the Samples directory in the SDK installation.
For your animation, are you sure to use the max lenght of the animation : if it is defined between 0-100, you should have a keyframme at 0 and the final to 100 on the time scale.
Is the 0 to 100 lenght mandatory for all animations?
 
Top