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

Still having problems with LODS export.

Messages
300
Country
unitedkingdom
Hi all,

I am trying to export a model to MSFS with LODS.

My model exports fine if I only use one LOD but when I try to export with two LODS it fails to build the package and
I cannot see it in the objects list. As I say, it all works ok without LODS.

Here is the error I get.....
Code:
tinygltf: accessor[15] invalid bufferView
glTFLister | Failed to load model: 'C:\Users\keith\Desktop\Weston\WESTONPIER\PackageSources\modelLib\WESTONPIERModel\WestonPier_LOD01.gltf'.
ModelLibLister | Failed to spawn the gltfLister for input file C:\Users\keith\Desktop\Weston\WESTONPIER\PackageSources\modelLib\
PackageBuilder | Failed to spawn lister for asset group mymodellib (type ArtProj)

My workflow when I create the second LOD in Blender is........
I duplicate the collection of the first LOD then rename the collections as x00 and x01
I then remove some parts of the model that won't be seen at a distance.
I then export in the normal way and update the xml that the exporter creates.
Here is my xml.....

Code:
<?xml version="1.1" encoding="utf-8" ?>



    <ModelInfo guid="{6a448074-29f1-478c-a266-9a67b9012cae}" version="1.1">

        <LODS>

            <LOD ModelFile="WestonPier_LOD00.gltf" minSize="50"/>

            <LOD ModelFile="WestonPier_LOD01.gltf"/>

        </LODS>

    </ModelInfo>

Can anyone help please, this is driving me nuts!
cheers
Stinger
 
Try making minSize=0 for your LOD 0 and set minSize to something larger in LOD 1. I am far from an LOD expert but it is where I would start.


Sent from my iPhone using Tapatalk
 
A good suggestion but unfortunately I have already tried this with various figures in the minSize to no avail. Appreciate the suggestion though, thanks.

This morning I have tried again without actually changing the model of LOD01. Just a straight copy of LOD00. It still fails to load LOD01?

cheers
Stinger
 
Hey buddy.

This is apparently a bug with the exporter\sdk.

Workaround:
Just export once with "batch export lods" checked to get the correct xml. Keep the xml somewhere outside the folder.
Then export each lod separately, without the "batch LOD" checked.
Copy the xml back in, and you should be able to compile :)


-- Finn
 
Hey buddy.

This is apparently a bug with the exporter\sdk.

Workaround:
Just export once with "batch export lods" checked to get the correct xml. Keep the xml somewhere outside the folder.
Then export each lod separately, without the "batch LOD" checked.
Copy the xml back in, and you should be able to compile :)


-- Finn
Ok, thanks. I wonder how come it works for Flying Theston on youtube.

Cheers
Stinger

Sent from my SM-G935F using Tapatalk
 
Did anyone figure out how to do this?
I was just able to export LODs however the workaround mentioned in these forums still applies. Your LODs have to be in collections x00, x01, x02 and so on just like in Flying Theston's video. First make sure all of your models are selected and export using "Batch export LOD". This will generate all of the correct gltf for each LOD and the XML file in your exported folder. Everything will appear to be correct however now you have to go back to each individual LOD collection and export them NOT using "Batch export LOD" but don't change anything else. Save each exported collection as the appropriate LOD filename that you originally exported when you did all of them. Do this for each LOD gltf model. After doing it this way it should compile.

Some "catches" I found out....

I had already exported my model and placed it in the sim before making LODs. I had to delete all of the GLTF files from my package sources folder and export everything like a new model for LODs with a new GUID and place it in the sim again.

You can check your XML file after running the batch export the first time and you should see a valid XML file with the GUID and the "Min Size" entries for each LOD. (The last LOD will not have a MinSize entry and this is normal). The bug/problem is while your batch export appears to work your LOD models below LOD0 are not going to compile. This is why you have to then go back and export each individual LOD separately and overwrite their corresponding GLTF files. Make sure you uncheck batch export LOD when doing this and that's the only change you have to make.

Hopefully this process will work correctly using the batch export option some day. I hope this makes sense.
 
I was just able to export LODs however the workaround mentioned in these forums still applies. Your LODs have to be in collections x00, x01, x02 and so on just like in Flying Theston's video. First make sure all of your models are selected and export using "Batch export LOD". This will generate all of the correct gltf for each LOD and the XML file in your exported folder. Everything will appear to be correct however now you have to go back to each individual LOD collection and export them NOT using "Batch export LOD" but don't change anything else. Save each exported collection as the appropriate LOD filename that you originally exported when you did all of them. Do this for each LOD gltf model. After doing it this way it should compile.

Some "catches" I found out....

I had already exported my model and placed it in the sim before making LODs. I had to delete all of the GLTF files from my package sources folder and export everything like a new model for LODs with a new GUID and place it in the sim again.

You can check your XML file after running the batch export the first time and you should see a valid XML file with the GUID and the "Min Size" entries for each LOD. (The last LOD will not have a MinSize entry and this is normal). The bug/problem is while your batch export appears to work your LOD models below LOD0 are not going to compile. This is why you have to then go back and export each individual LOD separately and overwrite their corresponding GLTF files. Make sure you uncheck batch export LOD when doing this and that's the only change you have to make.

Hopefully this process will work correctly using the batch export option some day. I hope this makes sense.
Thank you for taking the time to respond.... I followed the instructions but I must be doing something wrong as I still get error:
glTFLister | Failed to load model
ModelLibLister | Failed to spawn the gltfLister for input file
PackageBuilder | Failed to spawn lister for asset group mymodellib (type ArtProj)
 
Thank you for taking the time to respond.... I followed the instructions but I must be doing something wrong as I still get error:
glTFLister | Failed to load model
ModelLibLister | Failed to spawn the gltfLister for input file
PackageBuilder | Failed to spawn lister for asset group mymodellib (type ArtProj)

did you close the sim before trying to compile your LODs? I also had this error but it was because I was trying to compile the LODs after I had already put the main model in the sim.

once I deleted my compiled project and compiled it again from scratch before starting the sim it worked. Just making sure that’s what you’re doing
 
did you close the sim before trying to compile your LODs? I also had this error but it was because I was trying to compile the LODs after I had already put the main model in the sim.

once I deleted my compiled project and compiled it again from scratch before starting the sim it worked. Just making sure that’s what you’re doing
Yes, I restarted the sim. There was nothing complied anyway in previous attempt but I restarted anyway but still same error.
glTFLister | Failed to load model
ModelLibLister | Failed to spawn the gltfLister for input file
PackageBuilder | Failed to spawn lister for asset group mymodellib (type ArtProj)
 
Do you by any chance know how these minSize numbers work? what are they based on? I've been playing with them and it's very confusing.
What if I want one:
Model A: visible from 0 to 5 miles
Model B: visible from 5 to 10 miles
Model C: visible from 10 to 30 miles.
 
The LODs are supposedly controlled by the vertical percentage of the current viewport. It's not controlled by distance. An LOD of 100 means the objects bounding box touches (or nearly touches) the top and bottom of the screen. LOD 50 means it is about 50% of the vertical screen size. Zooming in or out will affect the LOD appearance.

Also, I'm not sure anything is visible from 30 miles away in the sim.
 
So I guess it's not possible to have 2 models only with these numbers?
Model A: visible from closeup to ~5 miles
Model B: visible from 5 miles to infinity or as far as possible.
 
So I guess it's not possible to have 2 models only with these numbers?
Model A: visible from closeup to ~5 miles
Model B: visible from 5 miles to infinity or as far as possible.
Not possible to specify by distance, only by screen size. Figure out how large it will appear at those distances. (... and hopefully a model not too resource intensive if it is to be seen at those distances)
 
Back
Top