• 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 Failed to convert texture during build

Messages
1,732
Country
australia
I have just finished creating a scenery object using Blender and successfully exported the files required for ADE (.glTF .bin and .xml) and added them to my ADE project via the Library Object Manager.

Before I continue please advise where such files (in their folders) should be placed for ADE. The ModelLib folder or the 'project name'-modelLib folder as I have forgotten so I placed them in BOTH folders but I think that they only need to be in the modelLib folder. What is correct?

During the 'build' I got an error "Failed to convert texture" and the name of the texture file (x.jpg). Although I was told by someone from the Blender 'forum' that the texture image file does not need to be 'square' (ie 1024 X 1024 or 2048 X 2048 etc pixels) I seem to remember reading somewhere that in MSFS the texture file needs to be 'square' with a binary value. Is that correct?

My texture file is 1600 X 382 - it was the file I liked most for my project. Would that be the reason for the error? And does the texture file need to be a binary number eg 512 X 512 or 1024 X 1024 or 2048 X 2048 etc?

If so can I correct it by simply creating a image file which is say 2048 X 2048 and add the 1600 X 382 image in 'the corner' of the larger image with blank space around it. I would then use the reformatted image file in Blender and remap the texture.

Thanks.
 
Your object files (.bin, .gltf and .xml) go in PackageSources/modelLib/ and the texture files (.png) goes in to the texture folder under modelLib.

I had the same issue with the texture files you did. All textures must be in equal height and width. That is 512x512, 1024x1024, 2048x2048 etc. Just resize your texture to one of these sizes and that will fix the error.

Regards,
 
Info on the whys and wherefores as to use of "Powers of Two" in pixel dimensions of texture image materials in 3D modeling graphics: :idea:



https://gamedev.stackexchange.com/q...lways-square-powers-of-two-what-if-they-arent

https://docs.microsoft.com/en-us/wi...1-devices-downlevel-intro?redirectedfrom=MSDN

https://devblogs.microsoft.com/dire...edback-some-useful-once-hidden-data-unlocked/


BTW: I have yet to find where Asobo allegedly cited 'Powers of Four' in an early interview about MSFS-2020 development. :scratchch

Rather, we might best interpret that info as referring to a "Multiple of Four" rule

I can only refer to this recent updated statement in the MSFS-2020 SDK online docs:


"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.

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.


The closest I have found thus far, to an explanation of the "multiple of 4 pixels" reference is this discussion of DX-12 MIPMAPs:

https://devblogs.microsoft.com/dire...edback-some-useful-once-hidden-data-unlocked/

"Granularity

Feedback granularity is controlled through a mip region. The smallest possible mip region is 4×4, and they are powers of two. If you have a mip region of 4×4, then it’s as if “every texel in the feedback map corresponds to a 4×4 area in the texture it’s storing feedback for”.

If you use a small mip region, you get more fine-grained information but the feedback maps are a bit bigger. If you use a larger mip region, you get less-detailed sampler feedback information, but save a bit on memory."


One might wonder if DX-12 development underway for MSFS-2020 might be a basis for future-proofing all 3D content for optimal performance:



This may correlate with the general optimizations required for efficiently rendering MIPMAPs and LODs cited in the MSFS-2020 SDK Docs:



GaryGB
 
Last edited:
Thanks "Nico" and Gary.
Although resizing my image file will fix the compile error I am wondering if it might screw up how the textures are mapped onto the faces in MSFS and that I will need to go back to Render and remap there first and rebuild. I guess I should try it first in MSFS. It might save me time.

BTW I accidentally posted this also to the 3D Objects forum and although I later edited my post to replace all my text with the word "moved" someone had read it and replied that texture images don't need to be 'square' so long as each dimension is a binary number eg 512 X 1024. That seems to contradict what "Nico" states. What is correct? Must be square or not?

BTW do the files need to remain in modelLib for successive builds? I am thinking yes.
 
Textures do not need to be square. Textures need to be a multiple of 4 (divisible by 4). 1600x382 does not compile the texture, 1600x384 does compile. Just change the size of the texture. The glTF will compile just fine. Compile with the fspackagetool and then check the texture folder and see if the texture compiled to .DDS... no need to restart the sim over and over. If the texture doesn't compile, then it was the wrong size.

Of course, as long as you're changing texture sizes, make it as small as you can while still retaining adequate detail to save on vram. Also, I think if the resize is a power of 2, then it will be more efficient using DirectX.
 
Textures do not need to be square. Textures need to be a multiple of 4 (divisible by 4). 1600x382 does not compile the texture, 1600x384 does compile. Just change the size of the texture. The glTF will compile just fine. Compile with the fspackagetool and then check the texture folder and see if the texture compiled to .DDS... no need to restart the sim over and over. If the texture doesn't compile, then it was the wrong size.

Of course, as long as you're changing texture sizes, make it as small as you can while still retaining adequate detail to save on vram. Also, I think if the resize is a power of 2, then it will be more efficient using DirectX.

I can only refer to this recent updated statement in the MSFS-2020 SDK online docs:


"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.

Hi Dick:

IIRC, the OP intends final output as glTFs and not MDLs in legacy FSX compatibility mode, so IIUC, *.DDS is an 'intermediate' Material ? :scratchch


Bearing in mind that glTF requires *.PNG or *.JPG graphic file format as mapped texture Materials rather than *.DDS, one might wonder if this is only to check on the status of a compilation without having to restart MSFS-2020 and visibly inspect a 3D scenery object at run time in-sim ?

GaryGB
 
Last edited:
All textures are compiled to DDS and displayed by DirectX.
 
All textures are compiled to DDS and displayed by DirectX.

Hi Dick:

[EDITED]

I like the way that reads, as it involves a familiar FSX / P3D work-flow (...but now implemented through different glTF-related MS utilities). ;)


But IMHO, some here are still seeking help to better understand the work-flow for output of *.DDS, versus that for output of *.PNG or *.JPG (into the pertinent MSFS-2020 project source \Texture sub-folder chain) ...which AFAIK, ultimately must take place for glTF 3D models to display. :scratchch


I am referring, of course, to the "original recipe" Khronos glTF 1.0 and/or 2.0 specification requiring use of *.PNG or *.JPG.



Are you instead referring to the subsequent extension criteria defined by Microsoft, for use of *.DDS as a mapped Material on glTF 3D models ?

https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Vendor/MSFT_texture_dds/README.md


If so, IIUC, output of *.PNG or *.JPG project files is an 'intermediate' step prior to conversion by MSFS-2020 SDK compiler into *.DDS package files. :pushpin:

In keeping with the subsequent extension criteria defined by Microsoft, for use of *.DDS as a mapped Material on glTF 3D models, mapped *.DDS texture Materials may also be packaged inside glTF *.BIN *.GLB (binary format) files instead of as stand-alone texture files in a \Texture sub-folder (for ex: MSFS-2020 SimObjects), thus IIUC, one may not see a *.DDS as a "final" compiler output ? :duck:

OOPS ! :oops:

After using MCX to delve into the innards of MSFS-2020' proprietary extension *.glTF, and associated *.BIN, and *.XML files, thus far I have found that within the above cited extension criteria defined by Microsoft, for use of *.DDS as a mapped Material on glTF 3D models, mapped *.DDS texture Materials may NOT (...yet ?) be packaged inside glTF *.GLB (binary format) files instead of being utilized as external, stand-alone texture files in a \Texture sub-folder (for ex: MSFS-2020 SimObjects).

Thus, IIUC, one 'should' still see a *.DDS as a "final" compiler output. :tapedshut:laughing:

As an example, consider:

Code:
[MSFS-2020_Packages path]\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\Marshaller\model.Marshaller_Female_Summer_Asian\Marshaller_Female_Summer_Asian_LOD00.gltf

[MSFS-2020_Packages path]\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\Marshaller\model.Marshaller_Female_Summer_Asian\Marshaller_Female_Summer_Asian_LOD00.bin

[MSFS-2020_Packages path]\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\Marshaller\model.Marshaller_Female_Summer_Asian\Marshaller_Female_Summer_Asian_LOD01.gltf

[MSFS-2020_Packages path]\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\Marshaller\model.Marshaller_Female_Summer_Asian\Marshaller_Female_Summer_Asian_LOD01.bin

[MSFS-2020_Packages path]\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\Marshaller\model.Marshaller_Female_Summer_Asian\Marshaller_Female_Summer_Asian_LOD02.gltf

[MSFS-2020_Packages path]\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\Marshaller\model.Marshaller_Female_Summer_Asian\Marshaller_Female_Summer_Asian_LOD02.bin

[MSFS-2020_Packages path]\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\Marshaller\model.Marshaller_Female_Summer_Asian\Marshaller_Female_Summer_Asian.xml


Apparently MCX always switches to 'import' of the *.XML file ...regardless of whether one loads a MSFS-2020 *.glTF, or *.BIN file.

The *.XML file code points to a ASCII *.glTF file (so MCX will then read / load texture image Materials from a [MSFS-2020_Packages path] sub-folder):

Code:
<?xml version="1.0" encoding="utf-8" ?>
<ModelInfo version="1.1" guid="{39fc8a14-cde1-433d-8680-218278c94eb5}">
    <LODS>
        <LOD minSize="25" ModelFile="Marshaller_Female_Summer_Asian_LOD00.gltf">
        <AnimationFileList>
                <AnimationFile>Marshaller_Female.gltf</AnimationFile>
            </AnimationFileList>
        </LOD>
        <LOD minSize="17" ModelFile="Marshaller_Female_Summer_Asian_LOD01.gltf">
        <AnimationFileList>
                <AnimationFile>Marshaller_Female.gltf</AnimationFile>
            </AnimationFileList>
        </LOD>
        <LOD minSize="10" ModelFile="Marshaller_Female_Summer_Asian_LOD02.gltf">
        <AnimationFileList>
                <AnimationFile>Marshaller_Female.gltf</AnimationFile>
            </AnimationFileList>
        </LOD>
    </LODS>

    <AnimationInclude>
        <Include File=".\..\animations.xml"/>
    </AnimationInclude>


</ModelInfo>

The example MCX Event Log for import of Marshaller_Female_Summer_Asian_LOD02.gltf shows mapped texture Materials are loaded from:

D:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ sub-folder (...not from a glTF 2.0 *.GLB binary):

Code:
11:58 AM    glTFReader    Information    Starting reading of file d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\Marshaller\model.Marshaller_Female_Summer_Asian\Marshaller_Female_Summer_Asian_LOD02.bin
11:58 AM    glTFReader    Information    Found matching model XML, reading object using information from model XML file
11:58 AM    CFGReader    Information    Starting reading d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\Marshaller\sim.cfg
11:58 AM    CFGReader    Information    Reading models from aircraft.cfg
11:58 AM    ModelXmlReader    Information    Started reading file d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\Marshaller\model.marshaller_female_summer_asian\marshaller_female_summer_asian.xml
11:58 AM    glTFReader    Information    Starting reading of file d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\Marshaller\model.Marshaller_Female_Summer_Asian\Marshaller_Female_Summer_Asian_LOD02.bin
11:58 AM    glTFReader    Information    Finished reading objects
11:58 AM    ModelXmlReader    Information    Finished reading file d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\Marshaller\model.marshaller_female_summer_asian\marshaller_female_summer_asian.xml
11:58 AM    CFGReader    Information    Reading points from aircraft.cfg
11:58 AM    CFGReader    Information    Read 0 points
11:58 AM    CFGReader    Information    Finished reading aircraft.cfg
11:58 AM    AllObjectReader    Information    Cleaning object: marshaller_female_summer_asian
11:58 AM    AllObjectReader    Information    Removed 0 triangles with small area
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_female_asian_arms_albedo.png.dds
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_female_arms_normal.png.dds
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_female_arms_comp.png.dds
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_female_asian_head_albedo.png.dds
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_female_asian_head_normal.png.dds
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_female_asian_head_comp.png.dds
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_female_indian_head_albedo.png.dds
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_female_indian_head_normal.png.dds
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_female_indian_head_comp.png.dds
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_tarmac_worker_boots_albedo.png.dds
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_tarmac_worker_boots_normal.png.dds
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_tarmac_worker_boots_comp.png.dds
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_tarmac_worker_headset_albedo.png.dds
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_tarmac_worker_headset_normal.png.dds
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_tarmac_worker_headset_comp.png.dds
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_tarmac_worker_suit_albedo.png.dds
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_tarmac_worker_suit_normal.png.dds
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_tarmac_worker_suit_comp.png.dds
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_tarmac_worker_summer_albedo.png.dds
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_tarmac_worker_summer_normal.png.dds
11:58 AM    ObjectRenderer    Information    Loaded texture: d:\MSFS-2020_Packages\Official\OneStore\asobo-simobjects-characters\SimObjects\Humans\texture\ch_tarmac_worker_summer_comp.png.dds

[END_EDIT]


BTW: IIRC, you had previously posted some code (in PowerBuilder ?) to Compile a 3D scenery object project with the MSFS-2020 SDK fspackagetool,

Would you please show us a modified code version with a step to also launch MCX as a viewer for a visual inspection of the compiled 3D model ? :teacher:

Thanks in advance for any further clarification you may be able to offer on this work-flow. :)

GaryGB
 
Last edited:
As I recall Powerbuilder code was needed for early builds of the Steam Edition but are no longer required
 
Thanks everyone.
Some of that info goes 'over my head' and when I mentioned 'square' I meant (does the image) have to be square eg 512 X 512 or 1024 X 1024 etc. I will stretching my image (from 1600X 382) to 1600 X 384. When I stretched it to 2048 X 2048 it looked (as expected) terrible and as such I was concerned that it also would look terrible in the model in MSFS.
 
Back
Top