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

LODs with gltf objects for MSFS

Messages
637
Country
unitedstates
I am using MCX to convert my FSX models to gltf for MSFS and am having problems with LODs. When the object is placed using ADE with the latest hotfix, it appears in ADE and builds with no errors. However, the object does not appear in MSFS. If the last reference in the object's .xml file that was generated by MCX is changed from the LOD2.gltf to LOD0.gltf the object appears in MSFS. LOD0.gltf is the full object, LOD1.gltf is reduced in vertices and LOD2.gltf is empty, and they appear properly in MCX. All are listed in the MCX level of detail creator as LOD -1, and when selected, it causes an error stating that -1 is not valid. Can I get an explanation? The object files generated by MCX are attached, including the original .mdl file.
 

Attachments

There are no negative Levels Of Detail, in the same way we only ever count the eggs in a carton, as opposed to the ones taken. Higher numbers, correspond to higher detail and the ratio can be loosely defined, to be the size of the object on the monitor. Typically, they start at 100; 100 being the highest detail and for high quality models, I have seen as high as LOD 800, for the PMDG Queen of the Skies. You mention MCX, which automatically creates LOD's in the proper intervals, starting at 100 and you can see that the LOD Creator starts with high LOD and high numbers of polygons and that each iteration has a lower LOD and fewer polygons, but I don't see that you've expressed why you have reversed that scale.
LOD0.gltf is the full object, LOD1.gltf is reduced in vertices and LOD2.gltf is empty, and they appear properly in MCX.
Nor has it been made clear why an empty level of detail is necessary, that is a zero, zilch, nothing level of detail. I know that people deploy empty LOD's in FSX to get effects, or clouds to render properly, but MCX is only a GUI and the fact that it will store and display LOD level parameters, that are not recognized by the simulator, is no indication of their validity and finally, another misplaced indication of validity:
If the last reference in the object's .xml file that was generated by MCX is changed from the LOD2.gltf to LOD0.gltf the object appears in MSFS. LOD0.gltf is the full object, LOD1.gltf is reduced in vertices and LOD2.gltf is empty, and they appear properly in MCX
OK, if a LOD is "empty," then to appear "properly" in MCX, it would be invisible. So MCX is displaying evidence of an object that you have defined to be invisible and what do you know, you take the empty LOD2.glTF and replace it with the full model LOD0.glTF - and now it is visible in the sim, just as one would expect.
 
Thanks for the detailed reply. What you say about LODs is understood by me when working with models in FSX, and the .mdl file I started with complies with what you say (LOD 100, 90, 10). When I convert the .mdl file to .gltf using MCX, I get the crazy stuff I described and don't know how to correct it. I tried changing the LOD2.gltf to LOD0.gltf because I suspected that MSFS displaying the empty LOD was the reason that the object was not displaying. When I try changing it to LOD1.gltf, the LOD0.gltf object displays instead of the LOD1.gltf object that is expected using that logic.

Whenever I convert any .mdl into a .gltf using MCX, a -1 LOD is listed in MCX for the generated .gltf files. Is this a problem with MCX or do I have a setting wrong? I'm not sure this has any affect on the functioning of the object in MSFS since objects without multiple LODs work fine.
 
As Rick indicates, you might want to review the concept of LODs in MSFS. Load your FSX model into MCX and select LOD100, which is your highest LOD for that model. Then actually shrink the MCX window vertically until you have some trouble seeing the posts for example. Now see what the vertical size of the MCX viewport is of the whole monitor... I get about 25%. That would be your LOD0 minsize... the minimum size you can view the detail at that level.

I would then make LOD1 minsize as 5; that's 5% of the vertical screen size. That would show the LOD1 from between 5% and 25% of the vertical screen size.

And don't use the LOD2 (non-existent) as Rick indicates. You could try to make an LOD2 that is the same as LOD1, but uses colors rather than textures, as in MSFS colors use no drawcalls... just use an "average" of the texture. I made one to view at 1% and deleted the textures and altered the colors to a gray that somewhat matched the texture.

LOD0 minsize of 100 means you only get detail when the whole screen is vertically filled with the object... probably not what you want.

I made an example and attached it.
 

Attachments

Last edited:
Thanks Dick, that sure cleared things up for me, I think. In order to verify that the LODs were working with your files, I changed the LOD0 minSize to 50 and the LOD1 minSize to 25 to see them transition. Yep, worked perfectly.

It is now my understanding that MCX does not correctly convert .mdl files to .gltf with proper LODs automatically. You need to create the individual LOD.gltf files and write or modify the .xml file to get the object to display the LODs. Or, an alternative might be to just let you correct my messes. ;)
 
I think MCX does work, but you'll need to edit the XML file to get it where you want it. I loaded the LOD0 of your example, and had MCX create the lower LODs for me. Edited the xml, and used MCX to delete the textures from the LOD2 (and altered the color). The SDK says it wants us to use 4 LODs. The latest word from Asobo is that we need to use at least 3 LODs going forward, or the sim will cut off or objects early. ( Xbox requirements ).
 
The latest word from Asobo is that we need to use at least 3 LODs going forward, or the sim will cut off or objects early. ( Xbox requirements ).
So what happens when objects are present with no LODs? I am seeing no problems, or does it just affect Xbox users.
 
I think MCX does work, but you'll need to edit the XML file to get it where you want it. I loaded the LOD0 of your example, and had MCX create the lower LODs for me. Edited the xml, and used MCX to delete the textures from the LOD2 (and altered the color). The SDK says it wants us to use 4 LODs. The latest word from Asobo is that we need to use at least 3 LODs going forward, or the sim will cut off or objects early. ( Xbox requirements ).
I simply import my model into MCX, I create the first reduced LOD by changing one value from, I believe 5, to about .02~.05. I then change that generated lod to 80. Then I reduce the next increment, by changing the number from .02 to .07~1.0. I do this two more times, with the ultimate goal of having my final LOD under 1000 polygons.

I then export that the glTF in my project folder, build it and I get four functioning LODs.
 
Here's the Alcatraz model from MSFS' Microsoft USA POI. I ran it through MCX and then cleaned up the glTF ( to make sure it uses PNG files) and XML (to get rid of the decimal fractions of the LODs that MCX creates). Load the XML into MCX and you can examine what Microsoft does with it's models.

Microsoft_Alcatraz.zip
 
Hi,

I guess you might have solved your issue already, but when I load the MDL file that you attached in the first post I don't see LOD -1 for each LOD. They do get the right LOD here. Which version of MCX are you using? I believe there was a development release a few months ago that had a bug in reading the levels of detail correctly. But that has been fixed by now.
 
1.5.0.0 c9fbe692 DEV 1/5/2021

Didn't look past 1.5.0.0. Just downloaded latest dev release and all LOD gltfs show as LOD 100 instead of -1. Thanks Arno.
 
Last edited:
Glad to hear the latest development release fixed it.
 
Back
Top