Model not working in SDK (export problem Blender)

Hello everyone,

I’m facing a problem with importing a custom model into SDK. Something goes wrong and I just don’t understand (which is offcourse quite confusing)…

I already found out that something’s not right when exporting the model from Blender. When I try to load the object into SDK I get some errors. Without the custom model all is fine. I managed to load some other custom models into SDK, so I don’t understand what’s going on.

First of all, when building the package, SDK gives me the next errors:

*PackageBuilder | Reading D:\Microsoft Flight Simulator\Projects\Scenery\Traumacentrum-ZW-NL\Traumacentrum-ZW-NL.xml...*
*PackageBuilder | Preparing asset groups...*
*PackageBuilder | Done, 4 asset groups registered.*
*PackageBuilder | Generating commands for package montagne-ehl1-traumacentrum...*
*PackageBuilder | Preparing commands for asset group ModelLib...*
*used extension not supported: KHR_materials_specular*
*used extension not supported: KHR_materials_ior*
*PackageBuilder | Preparing commands for asset group Scenery...*
*PackageBuilder | Preparing commands for asset group ContentInfo...*
*PackageBuilder | Ready, 32 commands added.*
*PackageBuilder | Listing took 0s004ms.*
*PackageBuilder | Starting the build...*
*PackageBuilder | Building assets for the package montagne-ehl1-traumacentrum...*
*Compiling GLTF data file md-ehl2-fuelbox.gltf...*
*mesh[0] primitive[5] has an invalid triangle mode, only triangle lists are supported*
*primitive[5] of mesh[0] ('Cube.005') has no faces*
*used extension not supported: KHR_materials_specular*
*used extension not supported: KHR_materials_ior*
*Material[0] ('concrete') is used by mesh[0], and has textures, but it doesn't have any UVs.*
*GltfCompiler | Failed to load model data from file*
*Compiling BGL file from in-memory data to output file Modellib.BGL...*
*Can not find model file: 'D:\Microsoft Flight Simulator\Projects\Scenery\Traumacentrum-ZW-NL\_PackageInt\_tempFiles\montagne-ehl1-traumacentrum\ModelLib\md-ehl2-fuelbox\md-ehl2-fuelbox.gltf'*
*INTERNAL COMPILER ERROR:  #C2006: Parse failed  (0x80004005)*
*INTERNAL COMPILER ERROR:  #C2340: Failed to finalize MODEL_DATA!*
*INTERNAL COMPILER ERROR:  #C2032: XML Parse Error!  Element tree follows:*
*ERROR: <FSData *
*ERROR: 	version = 9.0*
*ERROR: >*
*ERROR: 	<GLTFData *
*ERROR: 		sourceFile = D:\Microsoft Flight Simulator\Projects\Scenery\Traumacentrum-ZW-NL\_PackageInt\_tempFiles\montagne-ehl1-traumacentrum\ModelLib\md-ehl2-fuelbox\md-ehl2-fuelbox.xml*
*ERROR: 	>*
*ERROR: *

*INTERNAL COMPILER ERROR:  #C2024: Failed to process closing element tag <GLTFData> near line 4!*
*INTERNAL COMPILER ERROR:  #C2607: Compilation errors detected, compilation failed!*
*INTERNAL COMPILER ERROR:  #C2006: Parse failed  (0x       0)*
*PackageBuilder | Output path does not exist: D:\Microsoft Flight Simulator\Projects\Scenery\Traumacentrum-ZW-NL\Packages\montagne-ehl1-traumacentrum\Scenery\ehl1-traumacentrum\ModelLib\Modellib.BGL*
*PackageBuilder | Skip mirroring due to command failures.*
*PackageBuilder | Skip generation of package information due to command failures.*
*PackageBuilder | Finished, 32 skipped, 0 done and 2 failed, took 0s020ms.*

*Failed:*
*[montagne-ehl1-traumacentrum/ModelLib](6089179898518140248) - Command class AssetBuilder::glTFCompilerCommand_G*
*[montagne-ehl1-traumacentrum/ModelLib](6089179898518140248) - Command class AssetBuilder::BGLCompilerCommand_G*

I use Blender version 3.3.12 LTS, SDK has latest updates and I’m using the MSFS plugin. Earlier export are working, so that won’t be the issue I guess.

My Blender model (which is a fuelbox) consist of 7 sub-objects. When exporting, I select all, and export the model using Multi-Export glTF2.0. Use the following options during export:

image
image

Next to that I tried to solve the problem with the following (thanks to several tips):

  • I used All Transforms to reset settings;
  • I elaminated NGONS (used triangles);
  • I cleaned up Mesh;
  • Used Merge by Distance

I just don’t understand what is going wrong…
Anyone tips?

Not enough cleaning

You have to run mesh/clean up/delete loose
And mesh/clean up/Degenerate Dissolve
Several times, until you reach 0 vertex/0 edges/0 faces removed for both of the functions above

Of course make sure you select all meshes
(That cube.005 is our most suspicious one)

A note about your export options

You definitely don’t want loose edges and points in your geometry
And ranges are not supported, so removing them will avoid the compiler to complain
Also add punctual lights, sooner or later you will need them!

2 Likes

Thanks for the reply!

I didn’t expect a word from the teacher himself, Ive been watching your videos a lot. They are great and very helpfull.

I’ll give it another try this afternoon with your tips and then I’ll share the result in a post down here. Thanks!

1 Like

This indeed was the solution! Thank u very much!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.