Version Blender 3.6.17
Version exporter 1.3.2.3
Version MSFS 2024 1.2.8.0
Frequency : Consistently
Severity :Blocker
It’s difficult to summarize everything that goes wrong when exporting “Winshield” material from Blender, because there are so many details to consider. But overall, it’s impossible to create a correct Windshield based on exactly the same parameters as those described in the SDK examples (DA62). So I decided to produce a short report comparing the SDK and my project…:
Yes, confirm this - a few minor copy paste and mis type (float/bool) in the code, plus the issue I described to Khronos about the duplicating of the BaseColor texture when you have a detail color texture.
there is a schema for rain_options, but the SDK DA62 sample seems to be in error or behind the latest features.
Edit
Another problem is that the handler will delete the detail normal texture slot. The cockpit normal2 texture gets removed on file open, the scale is not set on export, the scale seems to be in the other asobo extention
edit:2 (because I am not allowed to have more than 3 posts in a row)
the scale for the detail nomal is removed when you build the model in the sim. the gltf in the PackageSources folder will be different than the on in the Packages folder.
edit3:
it is strange that the normal frame is NOT connected to the normal input to the BSDF when you have a detail normal texture
Detail map issue may be related to this bug report
EDIT 8:
new finding. wiper lines checkbox reverts to false - unchecked when save and reopen
this means that wiper lines tiling and wiperlines strength both revert to 1.0
But is you set the values and export - wiperlinestiling is ok, but wiper lines strength is not exported.
Reviewing microscratches strength has the value put into wiper lines strength. the wrong value is exported
The windshield material has been fixed and cleaned up in the last Flighting SU1 SDK Core 1.2.3.
Can you confirm that you no longer encounter the issues ?
When trying with my own project, I noted that it fails as soon as any texture past the Secondary Details Details (RGBA) is inserted. Basically, only Reflection (R) roughness (G) Metallic (B) and Secondary Details (RGBA) textures can be added.
If none of the textures below the entry is inserted, it exports correctly:
I have taken these textures from the DA-62 sample.
Secondary Details is from FS-2020. Taking it out has no impact. Inserting any other textures below it stops the material from working. Even if this one is not inserted.
This is under blender 4.2.6LTS and the newer exporter provided with SDK 1.2.3.
This is due to a Khronos change to Blender - the detail texture gets populated in to the BaseColor texture. I have reported this to Khronos - there is no fix by them.
You must check the Detail color texture and see if the gltf has a base color texture or not. The set the basecolor texture to None.
Do this in the gather material hook
OMR does this too in some cases.
def gather_material_hook(
self,
gltf2_material,
blender_material,
export_settings
):
msfs_parameters = bpy.context.scene.msfs_multi_exporter_settings
if not msfs_parameters.enable_msfs_extension:
return
# blender 4.0 and now 3.6 issue with detail textures added twice once correct and once as a regular basecolor texture
# if it has a detail color texture then set basecolor texture to none
#print("*** MSFS WARNING *** - gather_material_hook - Started with gltf2_material", gltf2_material, gltf2_material.pbr_metallic_roughness, gltf2_material.pbr_metallic_roughness.base_color_texture)
#print("*** MSFS WARNING *** - gather_material_hook - blender material - delete base color before", blender_material, blender_material.msfs_detail_color_texture, blender_material.msfs_base_color_texture)
print("gather_material_hook - bmat list", blender_material.msfs_base_color_texture, blender_material.msfs_detail_color_texture, blender_material.msfs_occlusion_metallic_roughness_texture)
print("gather_material_hook - gmat list", gltf2_material.pbr_metallic_roughness.base_color_texture, gltf2_material.pbr_metallic_roughness.metallic_roughness_texture)
if blender_material.msfs_detail_color_texture is not None and blender_material.msfs_base_color_texture is None:
gltf2_material.pbr_metallic_roughness.base_color_texture = None
print("*** MSFS WARNING *** - blender material - delete the base color", blender_material, blender_material.msfs_detail_color_texture, blender_material.msfs_base_color_texture)
if gltf2_material.pbr_metallic_roughness.base_color_texture is not None and blender_material.msfs_base_color_texture is None:
gltf2_material.pbr_metallic_roughness.base_color_texture = None
print("*** MSFS WARNING *** - blender material - delete the base color - has gltf2 base color no blender texture", blender_material, gltf2_material.pbr_metallic_roughness.base_color_texture, blender_material.msfs_base_color_texture)
if (gltf2_material.pbr_metallic_roughness.metallic_roughness_texture is not None or gltf2_material.occlusion_texture is not None) and blender_material.msfs_occlusion_metallic_roughness_texture is None:
gltf2_material.pbr_metallic_roughness.metallic_roughness_texture = None
gltf2_material.occlusion_texture = None
print("*** MSFS WARNING *** - blender material - delete the OMR color - has gltf2 OMR color no blender texture", blender_material, gltf2_material.pbr_metallic_roughness.metallic_roughness_texture, blender_material.msfs_occlusion_metallic_roughness_texture)
MSFS2024_MaterialExtension.export(
gltf2_material=gltf2_material,
blender_material=blender_material,
export_settings=export_settings
)
adding your code in the (correct?) place in msfs_export.py has gotten one of the added warning messages to show up in the console.
However now, not even a windshield material without textures will get exported …