TEXTURES
This page is for general guidelines related to creating your own textures for add-ons that will be used in Microsoft Flight Simulator. In principle, the game supports all texture formats that can be loaded through the WIC (Windows Imaging Component) and also supports the DDS file format. For glTF models, as per the specification, *.JPG
and *.PNG
are supported. Note that there are a number of pages dedicated exclusively to texture mapping for aircraft in the following section:
When creating your textures, it is important to note that input texture dimensions must be a multiple of 4
pixels and be at least 8
by 8
pixels. Textures do not have to be square, as long as the sides adhere to the multiple of four rule.
Colour Padding
When creating your Albedo Textures you should attempt to always "pad" your textures with an appropriate colour instead of (for example) using a 0 alpha background:
This is very important to prevent "bleeding" when the textures are viewed from a distance. For example, in this following image you'll see some trees that have whitish borders around the leaves beside ones that look correct. These badly textured trees use an albedo map with the leaves texture on a transparent white background, which the GPU then interpolates into the leaves themselves causing this texture bleed effect:
Ensuring that your albedo textures are padded with the appropriate colour around the main shapes ensures that issues like this won't happen.
Quality
It is recommended to use a lossless format at 16
bits per pixel, such as the 16 bpp *.PNG
format. This is especially important for roughness, metal and/or occlusion maps, where Microsoft Flight Simulator remaps the data to a curve to have more precision in the dark areas before compressing (which is then remapped again later in the shader).
It is very important to note that when exporting *.PNG
, some image edition tools write a black color to fully transparent pixels instead of preserving the original color. This can cause color bleeding in mipmaps or at runtime when doing bilinear interpolation, and you should check and ensure that this is not the case for the program you use to edit textures. Note that if your program does do this, there are usually tools and plugins available to fix it - for example Adobe Photoshop has the free, open-source, plugin SuperPNG which has a variety of options for exporting *.PNG
images.
Smoothing Groups
Wherever you have a smoothing group change, you should have a UV seam with space between the shells. This will allow you to bake normals down onto a lower res mesh without bad edges being rendered in your normal map.
See this image for a better visual explanation:
Output Formats And FLAGS File
Microsoft Flight Simulator converts most of its input textures to different varieties of *.DDS
file, and most of the time the output formats chosen by the compiler should be appropriate. However, in some cases, you may want to change how the compiler and the game handle a specific texture. This can be done by adding a *.FLAGS
file next to the input texture with the same name as the input texture plus the extension. The *.FLAGS
file is essentially a text file with the .FLAGS
file extension that needs only one line within in it. This line starts with _DEFAULT=
, followed by the required flags, each one separated by a +
.
For example, next to an input texture named Gauge_FancyText_Albd.png
, we could have a *.FLAGS
file named:
Gauge_FancyText_Albd.png.FLAGS
The file would have the following contents:
_DEFAULT=QUALITYHIGH+NOREDUCE
The table below lists the available flags that can be used:
IMPORTANT! Previously QUALITYHIGH
was always set for AO/Roughness/Metal (COMP) textures by default, but this was changed in a recent update. Therefor, before publishing any new packages - or updating existing packages - you may need to add this high quality flag if you see compression issues with those textures. Keep in mind that you can check the visuals of any texture map in the simulation using the PBR Channel render debug window.
NOTE: These flags should be used carefully, as they can have a serious performance impact when abused.
Flag | Compiler behavior | Sim behavior | Rendering side-effects |
---|---|---|---|
NOREDUCE | N/A | Disables unloading mip levels based on quality settings. | Increased memory usage and higher quality on lower graphics settings. |
QUALITYHIGH | Uses a higher compression quality, if applicable. Some texture usages already compile to the highest available quality (such as normal map textures). | N/A | Increased memory usage, slower rendering, less compression artifacts. |
PRECOMPUTEDINVAVG | Computes the inverse average of the texture, per mipmap, and stores it with the texture. | Allows the sim to read the inverse average color per mip. Not currently necessary for anything, though this data will likely be exposed to add-on code at some point. | N/A |
ALPHAPRESERVATION | Computes mipmaps in a way such that the ratio of transparent/opaque pixels is maintained. This is important for textures that act as alpha masks, to prevent averaging the opacity between neighbouring pixels. | N/A | Sharper alpha masks. |
Reviewing Texture Quality And Memory Usage
When reviewing the texture quality in Microsoft Flight Simulator, it is important to be aware that the in-game graphics settings can affect this. The highest quality settings are meant for users with a top tier GPU, which typically have 8GB+ of GPU memory. The lowest quality settings are meant for users with a low-tier GPU, which could have as little as 2GB of GPU memory.
Microsoft Flight Simulator will automatically reduce the texture resolution of textures loaded into memory based on these in-game texture quality settings. This saves on the texture memory used for those with less GPU memory available, but will result in a more "blurry" display when viewing up close. The table below describes how the texture quality level modifies the texture dimensions:
Quality | Albedo | Others |
---|---|---|
ultra | 1x | 1x |
high | 1x | 0.5x |
med | 0.5x | 0.5x |
low | 0.5x | 0.25x |
A typical texture budgets for aircraft (including cockpits) is between 150MB for small aircraft and 600MB for large aircraft. Since the *.DDS
format is a GPU-ready format, the size of the textures on disk is more or less what the game will be using in texture memory. Thus, the texture memory used by your add-ons can easily be determined by looking at the package output's texture folders.