Invisible parts and severe model corruption when exporting to FS2024

Version: SU5

Frequency: Consistently

Severity: Blocker
Marketplace package name: not available

Context: Devmode

Similar MSFS 2020 issue: not applicable

Bug description:

Exported parts either don’t appear at all, or appear corrupt (duplicated, flipped or otherwise broken). Textures cannot be found, although they exist in the attachments folder.

Interior example: materials are assigned wrong, although they are correct in 3ds max.

When an animated part is clicked you see it animating but there is also a “clone” of the part in its T-Pose (see cupholder on the left and throttle in the middle). I have made sure that the layer exports were correct.

Exterior example: rivets show up pink, but the textures are all in Part_exterior_Airframe. I am also getting the “duplicate parts” when animating the landing gear -a “T-Pose” gear stays in place, while the skinned part moves normally. Lastly, the propeller attachment doesn’t appear, although the GLTF file shows up fine in external editors such as 3dviewer.net.

Repro steps:

Build and load the aircraft

Attachments:

Private attachments: Sent a PM to @PrivateContent

Hello,

Can you send us your package or a package that repros these issues to test it ? you can send it in Private Messages.

Thank you

1 Like

@Yasmine I have send a PM with the source package. If you need anything more let me know via PM.

Edit: the PM was sent to the administrators group.

Update: I did a reset X-form on the entire interior scene and also tried exporting with a pure white base material in case that was the issue. No improvement.

@Yasmine the duplicated parts are due to a mistake on export by me. The other issues (invisible parts on export and badly assigned textures) are still there.

1 Like

I have worked out the problem on my end, expect a report with details tomorrow. I can’t tell if it is a problem on my end, the exporter or 3ds max, but I got it working.

2 Likes

Hello,

I have found some errors in the package you sent.

  1. You have wrong values in your common/config/flight_model.cfg file, i don’t think this is intended:

[AERODYNAMICS]
stallalpha=-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368

stallalpha_ff=-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368

  1. While trying to load your plane, i found unique ids errors in the console:

  2. As for the missing textures, you need to check the warnings in the console to see the list of the models with the missing textures, i can’t find the textures listed in the package you sent us.

  3. There is another warning saying: [USER] VFS Bitmap Loader | Attempt to load texturefor incompatible texture slots. This is not supported; please duplicate your texture:‘vfs://sws-aircraft-kodiak900/simobjects/airplanes/sws_kodiak_900/attachments/sws/part_interior_cockpit/texture/vent_grate_comp.png.ktx2’. It means that you’re using the same texture in different slots (for example comp and detail comp). Even if you want to use the same, this is not allowed you need to duplicate it and use each one for each dedicated slot.

I hope this would help,

Yasmine

@Yasmine here is an update from me, I was able to solve some of these, particularly the wrong textures that you see in my first image (cockpit). I found the cause but I am unclear as to why the material export is wrong.

PROBLEM 1: MISASSIGNED MATERIALS

The cockpit uses a multi-material. I already know that leaving a material slot empty will cause the exporter to “skip” and assign wrong materials, as that is a 3ds max bug. In my case I didn’t have empty materials, but I ran the “clean multi-material”. This removed unused materials from the material stack and caused numbers to skip.

My material IDs skipped numbers like this: 1,2,3,4,5,6,9,13,14,15,16,17,20,21…

I don’t remember this being a problem before; the exporter had problems with empty material slots but I don’t remember it having issues with skipped numbers. Is that a bug with the exporter or should we keep numbers continuous?

I assume that this will also affect this report.

PROBLEM 2: FAILED EXPORTS

Sometimes, when creating a FS2024 material inside a multi-material I will get a pop-up error about Max2Babylon, which could be related to the faulty installations I experience.

When that error crops up, I cannot enter the created sub-material and the material editor always jumps out to the multi-material.

The next thing I did was to reduce the multi-material count by 1 to delete the faulty material and create one that works. The material editor behaves again, but the export to fails. The export log says “Material #10083” failed to export and that is the name of the broken material that isn’t supposed to exist as I deleted it in this step.

Then I go to the Material Exporer and see that the material exists and for some reason it is still assigned to parts of the aircraft, although it is not part of the multi-material that is used. It has not been assigned to isolated parts as a simple material either.

I tried running “gc()” in the listener, problem still there. The final fix was to delete the material from the Material Explorer. I never had that issue before, so I assume it has to do with my faulty SDK installation. If I can get you any information to help let me know.

PROBLEM 3: PINK RIVETS

That one is the major remaining issue. I don’t see any console errors, the texture names in the GLTF are correct and the texture names in the folder are also correct.

PROBLEM 4: INVISIBLE PROPELLER

Will report on it shortly, running tests.

Hello,

I don’t remember this being a problem before; the exporter had problems with empty material slots but I don’t remember it having issues with skipped numbers. Is that a bug with the exporter or should we keep numbers continuous?

-> Yes the multi material has to have continuous numbers to work, unforunatly it’s not a bug, it’s by design (because there is no other way to read these datas from 3dsmax api otherwise)

That one is the major remaining issue. I don’t see any console errors, the texture names in the GLTF are correct and the texture names in the folder are also correct.

-> Can you send us the latest cleaned version of your package to look if we can help solve your problem ?

Files sent via PM!

I finished my propeller check, its material IDs are numbered 1 through 4. I also removed the prop_node line from engines.cfg in case that was at fault. The propeller is still invisible in-game, although if opened in 3D viewers the model is there.

1 Like

@Yasmine the rivets have been fixed. The problem was the multi-material skipping a number, as you explained above. I am working on the propeller which is the last part fighting.

@Yasmine @FlyingRaccoon I was able to fix the propeller as well. The problem is not art-related, but a file structure one. In my Part_Exterior_Propeller_5B folder I have an attachment.cfg file.

When calling that as an attached object from Function_Exterior, the XML file failed to load and the attachment wouldn’t work at all. When attached to a preset, though, it worked fine.

The lessons learnt:

  1. Attachment.cfg files can only be added to a part when it is called by a Preset, not when called by other Attachments. I don’t know if this is by design or not, but it would be good to get a console error if an attachment.cfg file is not supposed to be there.
  2. The material editor should not have empty materials and should not skip IDs, otherwise textures may be assigned wrong during export. The exporter also remembers the “deleted” or skipped material and parts that reference it will appear pink -as the textures may be missing-, despite the material not existing any more in the scene.
  3. 3ds max will not delete unused materials and one needs to find and delete them from Material Explorer. This may be because of my faulty 3ds max installation, but it is important to keep in mind.

You can also close this topic as this was answered by @Yasmine here:

Thank you for your help!