GENERAL MODELLING PRINCIPLES
This section lists some of the general modelling principles that you should follow when creating aircraft and scenery models. You can also find some information on the gLTF format.
In-Sim Graphics Settings
When switching graphics settings in the simulation, Microsoft Flight Simulator changes certain properties related to models, so you need to be aware of the following:
- Texture quality settings reduce the resolution of textures. This affects visual quality when viewing an object in close-up and significantly reduces memory used. You can find more information on this from the section on Reviewing Texture Quality And Memory Usage.
- Object LOD quality settings change the "minSize" properties of LODs. Please see the page on LODs for more information. In general, we recommend tweaking your LoDS in the "high" quality setting, which is neutral for LOD selection (meaning a LOD with 50% "minSize" will switch at 50% size on screen), and reduces the quality of only some textures.
Model Optimization
The goal for model optimization is to reduce CPU/GPU costs, in both execution time and memory, while retaining an as high as possible visual quality. Execution time and memory cost is often a trade-off. A primary example of that is the creation of several LODs. Having a single model LOD is optimal for memory. However, execution time is poor when viewing the model from far away. Because of this, it is necessary to create multiple levels of detail for all of your models, where each level of detail performs better than the previous, starting at the first LOD, typically named "LOD0" or "x0".
The Landscape Elements page outlines in more detail some of the factors that can be used to optimise your models, and the page on LODs goes into more detail on how to generate them correctly.
Instancing
It is worth noting that the Microsoft Flight Simulator engine will make use of "instancing" when rendering your models within the scene. This means that if you place the same model 10 times in the same scene, then all 10 of these model "instances" will be batched into a single draw call, saving on performance.
The caveat to this is that it's only applicable to non-skinned meshes, and a model that uses a skinned mesh will not be instanced. Additionally, if a model has some skinned meshes and some non-skinned ones, then the non-skinned ones will be instanced, even though the skinned ones are not.
UV Precision
When you create a package for Microsoft Flight Simulator, models are processed by the package tool into compatible gLTF files that are optimised for use within the simulator. Part of this optimisation process involves storing the UV data as 2-byte floating point numbers, instead of regular floats, to save on memory usage. What this means is that UVs will have less precision, and if you have a UV that tiles too much, this lack of precision will become very noticeable. You can see this illustrated in the image below, where the left image is the original, and the right is after processing:
To resolve this issue, you should try and maintain the UV values as close to 0 as possible, since the further from that value the less precise the values will be. In general we recommend maintaining the UVs between 0 and 1, but if you require a texture that tiles, we understand that this may not be possible. In those cases, one trick is to shift the UVs to use negative values, for example, a UV of 0 to 10 could be shifted to be a UV of -5 to 5, and so keep precision errors to a minimum.
Tangents
When a mesh is imported for the first time, Microsoft Flight Simulator always calculates the tangents. In order to avoid any issues with the normal map, ensure the mesh has a smooth surface and no connected vertices overlap in position or UV space.
For skinned meshes, the tangents are calculated using the default position of the mesh (the T-pose
). In the Babylon Exporter, the T-pose
is the pose at frame 0. To ensure no problems occur, a good convention would be to start all animations at frame 1 or later.
Collision Meshes
Many objects in the Microsoft Flight Simulator world are required to detect collisions, whether it's a cockpit button with the user mouse cursor, or a scenery object with an aircraft. You can find details on how these mesh collisions can be set up from the following pages:
Performance Metrics
Below you can find a list of the different metrics that need to be considered and optimised when creating landscape elements. These metrics apply to individual objects (buildings, landscape features, etc...) but are also very important when considering the performance of a large asset like an entire airport. So, for optimal performance, all of the following metrics should be kept to the minimum possible values:
- Texel Count: This is the number of texels (pixels) used by the combined textures. This is a rough indication of memory usage, though different GPU formats will have different memory consumption characteristics. When the package tool compiles a texture, it compiles it to a GPU-ready format (
*.DDS
). The size of this file is the size it will have in GPU memory. - Material Count: This is the number of materials used. This number, multiplied with the number of meshes using them, is a rough estimation for the number of draw calls. Mesh instances with the same material are grouped in one draw call.
- Mesh Object Count: This is the number of meshes in the element. This, multiplied with the number of materials used, is a rough estimation of the number of draw calls.
- Vertex Count: The number of vertices in the element.
- Face Count: The number of faces (triangles) in the element.
- Skinned Vertex Count: The number of skinned vertices. Skinned vertices use more memory and GPU time than regular vertices.
- Skinned Face Count: The number of skinned faces.
- Texture Count: The number of textures used.
- Bone Count: This is the number of nodes used as bones in skinned meshes. In Microsoft Flight Simulator, this is the entire hierarchy of all the bones used by a skinned mesh, up to the last common ancestor (the "root" node of the skeleton). These bones cost memory in addition to the node they represent.
- Node Count: This is the number of nodes. This translates to objects such as meshes, dummies and helpers in 3DS Max.
- Collision Vertex Count: The number of vertices used for collision detection.
- Collision Face Count: The number of faces used for collision detection.
The table below gives a basic overview of whether these metrics affect the CPU or GPU (or both):
Metric | GPU Time | GPU Memory | CPU Time | CPU Memory |
---|---|---|---|---|
Vertex And Face Count | ||||
Skinned Vertex And Face Count | ||||
Collision Vertex And Face Count | *On Raycast |
|||
Node Count | ||||
Bone Count | **If Moved |
|||
Material Count | ||||
Mesh Object Count | ||||
Texture Total Size |
* Collision vertices and faces only consume CPU time when they are used for collision detection. This variable cost depends on the situation. It is usually not very high, but minimizing them is recommended.
** Bones only consume CPU when they move, or when their parent hierarchy moves. This is to recompute their world-space matrix.
The gLTF Format
Microsoft Flight Simulator currently supports glTF 2.0
models, and your model assets should be created using this. Before starting, however, it is important to note that there are a number of differences between the general glTF format and what is supported by Microsoft Flight Simulator:
Model Data
Currently there is no support for the following features in the model data:
- hierarchical non-uniform scaling
- morph targets
- sparse accessors
- secondary UVs
- custom tangents
Additionally, for skins, the inverse-bind matrices are ignored.
Images
The following caveats should be respected when adding images:
- Only URIs to external images are supported
- The
mimeType
parameter is ignored, unless theimage.uri
does not have an extension
Materials
When creating materials for Microsoft Flight Simulator you should follow these rules:
- normal maps must use DirectX conventions for normal vector packing instead of OpenGL conventions
- texture values for roughness, metal and occlusion must be packed into the same texture
The following is also worth noting:
- double-sided materials do not modify the normals when viewing the back-face of materials (i.e. the normals will always be point outwards)
- texture sampler information is ignored (wrapping method is always
CLAMP_TO_EDGE
) - animation sampler interpolation method is ignored (interpolation method is always
LINEAR
).
Finally, note that there is no support for the following:
- No support for a primitive.mode other than TRIANGLES
- No support for the Occlusion Strength parameter.
Custom Materials
Microsoft Flight Simulator has support for a custom material type, which allows access to a few render-specific techniques. It is therefore recommended to use the Microsoft Flight Simulator Plugin for 3D Studio Max, especially for aircraft. You can find out more information about this plugin on the following page:
Animation Groups
When working with animations, it's very important to ensure that all your animations are correctly grouped for exporting in the glTF. With 3DS Max, this is done from the Babylon Animation Groups window, which is opened from the right-click menu: Right Mouse Button > Babylon > Babylon Animation Groups.
As you create each set of animations - for a wheel, for an aileron, etc... - you then need to define this animation within the Babylon Animation Groups window. This will then include the animation groups in the glTF when you export the file for use with Microsoft Flight Simulator using the Babylon Exporter.
Legacy Support
Microsoft Flight Simulator has legacy support for the FSX .MDL
format. However, it is not recommended to use this old format, mainly due to large differences in rendering techniques used between FSX and Microsoft Flight Simulator. In addition, we do not support uploading model files in this format to the store.