Thalixte / Google-Earth-Decoder-Optimization-Tools

Python blender scripts designed to be used with Google Earth Decoder Tool sceneries
34 stars 4 forks source link

Optimize step fails due to missing LODs #4

Closed Roucou closed 1 year ago

Roucou commented 1 year ago

I downloaded the city of Leuven (BE) for LOD levels 17, 18 and 19. However, some LODs seem to be missing for parts of the map. This makes step 2 (optimize) fail, as the 999999999.xml files inside the _PackageInt\_tempFiles\somename\somemodellib directory always assume .bin and .gltf files exists for all LOD levels. On creating these .xml files, the script should not add tags if the corresponding .bin and .gltf files don't exist.

Roucou commented 1 year ago

Interestingly, if I delete the missing LOD entries from the .xml files, and try to compile the package manual, it still tries to compile the missing .gltf files. So they must be referenced to from somewhere else too.

Roucou commented 1 year ago

Ah, the plot thickens, those missing LODs in the _PackageInt folder DO actually exist in the PackageSources\leuven-modelLib directory. And load correctly in the Windows .gltf viewer. So something breaks when moving/copying/converting them from the original download directory to the _PackageInt* directory.

Roucou commented 1 year ago

OK, figured it out! Some downloaded tiles (via Earth2Msfs) have one or more validation errors. These break the process further up the chain, most noticeably when compiling the package via the fspackagetool.

By looking at the error log from fspackagetool, I then import the offending .gltf files in Blender (one by one), and immediately reexported them in Blender (as a .gltf file with the exact same name). Then the whole optimize step work fine, including building the package.

So no issue directly related to GEDOT, closing this.

I might write a feature request later on. ;-) An extra step in GEDOT could be check the .gltf files for validation errors (e.g. via an external command line tool such as the one supplied by the Khronos Group), then simply import/export offending files automatically, like I did manually above.