Bug description:
When using the Blender exporter with multiple materials on different objects, with ‘Export in Background’ disabled, many objects appear in the sim without a material applied. Additionally, in the gltf file, these objects are linked to a material name ‘mat_export.XX’ as opposed to their given names.
My investigation brought me to check the ‘Export in Background’ via the call to MSFS2024_MaterialUtils.set_objects_materials_for_export having a different value for the duplicate_materials parameter depending upon the value of called_in_subprocess which may be related.
I could not reproduce this.
Can you share with us a blender sample that reproduce the issue along with your gltf please ?
See section 3) How to report a bug or crash
@Boris This is also happening to me, except whenever i have Export in background enable the sim always give me on error about the gltfs that were exported. So i’m stuck with objects not having any materials applied. My GLTf aslo has that “mat_export.xx” in it. Some objects in the gltf have the material, while other objects/nodes using the same material in the same gltf are just white, as if no material is applied.
i’m using Blender 3.6.23 LTS
The latest core. And I don’t get any blender errors. It seemingly exports fine. I fixed the error the package builder gave me by removing the custom split normals data from one of my objects in blender. So I can now export in background with no issue. But if I uncheck “export in background” I get no errors but I have objects with no materials in the sim.
Unfortunately, the Issue persists with the latest exporter.
Exporter 5.4.2
Blender 4.2
I’ve also noticed a performance decrease with this version but don’t have time to investigate why at the moment. I did not change any settings in the exporter after upgrading, and left the performance improvements in the Khronos exporter I described in my other thread:
’Blender 3.6, exporter 4.3.3, ‘Sampling rate’ not ignored when ‘Sampling Animations’ deselected’
(the forum won’t allow me to post links)
Apologies for being a bit unhelpful, I haven’t been able to reproduce the issue with a fresh scene either. I’m in a good place with my project and exporter 4.3.3, <2 min export with a complex scene containing many animations, and I don’t want to alter my environment further at the moment. Disabling ‘Export in Background‘ is really a non-issue once you’re aware of the root cause when the above issues appear.
Quick update, the performance issues I was having with the latest exporter were due to the viewport hiding being re-enabled during the update. All is now well once the above fixes are implemented in the GLTF exporter.