"Import High-Res mesh" feature for Nanite is crippled due to old FBX material ID bug.

I’v been dealing with an infuriating problem trying to hook up Nanite meshes to “normal” meshes where the materials will not be applied properly on the Nanite mesh even if the assets are identical in terms of material count, material name, sub material name etc.

Even a tessalated copy of the exact original mesh, with no changes to the material IDs or anything at all for that matter, once imported as a high res mesh, enabling Nanite has a high likelyhood of causing this.

We tried disabling “Reorder Material to Fbx Order” but no luck.

Anybody have any idea? It’s really driving me absolutely nuts trying to set this up properly…

1 Like

As an update to this issue we have realized it is not the Nanite mesh causing issues but there seems to be a very old bug in the FBX import pipeline where UE messes up the material ID order in the static mesh sections.

A bunch of old threads describing the issue:

This issue is CRIPPLING the high-res mesh import functionality for use as an easy way to enable/disable Nanite on objects with more than 2 materials.

I have encountered the same problem and currently have no idea how to solve it. Do you have any leads?

After a bunch of research it seems like the only solution might be to import assets without “Reorder material to FBX order” enabled. This means your material slots order might not be correct compared to 3ds Max/Blender etc, but importantly it’s now consistent with the static mesh sections.

However you need to create completely new uasset files/re-import everything from scratch as if the asset has already been imported with this issue we haven’t found a way to fix it (Reorder material to FBX order only seems to work on the first initial import).

The problem seems to be that the “Reorder material to FBX order” feature seems to only take into account the material slots and not the static mesh sections so when this is ticked it creates this order mismatch between material slots and mesh sections.

After having further looked into it I can almost confirm there is no way to fix this until Epic does something.

The good new is: https://github.com/EpicGames/UnrealEngine/commit/e43b81ce13a77f7df0d36afb3dac5687e99e0134

The bad news is it’s likely not until 5.3…