Material Slots not importing in correct order

Hello, I have a character im trying to import from Blender. Once it is in Unreal engine, the eyes need to be the first material in slot 0, and the body needs to be the second material, slot 2. I have set up the materials in blender so the first listed is the eyes, and second is the body, but when I import it into Unreal it always makes the antlers material slot 0 no matter what. I’ve tried reorder them in blender, switching the materials, nothing seems to work (this order process has worked fine for my previous characters)
Is there any way to switch the material slots, or assign them to certain areas on the character in unreal?
Help, i’m basically stuck until I figure this one out!

I was having the same issue, and here’s my current best info/workaround:

The first time you import your mesh, the material slots in UE should match the order that they were assigned within the Material Properties window in Blender. Unfortunately, if you later decide to change the material order in Blender and re-export/import, the slot order in UE currently does not update to reflect these changes.

Therefore, if you find yourself needing to change the material slot order in Unreal from a mesh you’ve already imported, I believe you need to delete the mesh from UE and then re-import a version that was exported with the desired order from Blender. (Caution: if you, or other members of your team, have instances of this mesh used already throughout your project, you may want to avoid doing this, to avoid removing them all!)

For anyone in the future, a different alternative to deleting the asset and reimporting it is to either replace the mesh in the file with something else like a cube with no materials, or remove all of the materials from the current mesh. When reimporting the asset into UE4, this will give you a prompt with the option to “Revert to FBX”. Do that. Adjust the material order in your 3d modelling software like Blender and reimport it into UE4. This will again ask if you would like to "Revert to FBX " say yes and your materials should be in the right order.
Cheers!

1 Like

This works! But instead of using a cube, I just duplicated the mesh I was working on in Blender, the removed all of its materials, then exported that into UE. Then moved around the material slots on the original mesh and exported that to UE. All good. Thanks.

I cant find an answer on how to “Adjust” the Material order in Blender, for UE import?

What determines the Mat index order in Blender, when Exporting as FBX?:

  1. the last Mesh selected becomes the First or Last Mat index??
  2. Or the name of the Mesh determines Mat export order?
  3. Or name of Material?
  • Last year I selected many meshes, then my Armature, then exported as FBX. Imported into UE4, and it set the Mat order. Now I have BP code that references the specific indexes of each mat, in that order (that UE imported as).

  • Now Im trying to Blender Export/Import a 2nd file (not a replacement), based on [copies of] those same meshes/mats, but I dont remember my selection order in Blender, when I Exported.

  • I have modular meshes in Blender with many mats.

  • I joined 4 meshes into 1, and I can go the the Mat tab > and press the up or down arrow to to change which Mat is first.

  • But then I have 5 other meshes that are not joined, and have different mats.

  • So how do I tell the 5 remaining mats to get in the order of my original UE import file?

  • Edit: also I cannot rename all mats like “M_MaterialName_00, 01” - because I will import many meshes/mat names change - too tedious to rename mats. I did however set each Mesh copy, to use the exact same Mat(name) that the original copy uses.

To answer the first question. If you are combining your 5 meshes in UE then I have no idea what determines the Material order, unfortunately.
If the 5 meshes are not being combined in UE then the individual files that are imported will have their material order preserved based on the order in Blender, AFAIK.

To further understand your issue, are the 5 other meshes that are not joined in Blender:

  1. Have individually one material for each mesh?
  2. Or they individually have multiple materials but are in the same order in Blender as the original file you imported into UE?

If option 1, you might need to make sure that you add all the materials present in the same order of your original imported file onto your 5 individual files. If the meshes you imported, used in the BP, have the exact same number of materials and in the right order, there should be no problems.

That’s the full extent of my knowledge on this topic. I’m still learning.

Maybe example images of your current setup might help.

1 Like

Hi, thanks

Clarification. In Blender, I selected multiple Meshes (not joined) > saved as FBX. Then imported a single FBX into UE, as one SK Mesh file.
Thus in the SK window I can check to highlight specific mesh parts, and see their Mats (some have 1 slot, others 3). But total SK Mat list has ~10 mats (from the parts).

So it is #2 - each part has multiple meshes.
But the Order is the problem. I dont remember which order I selected the meshes in Blender, when I exported months ago. (If that matters?)

And for the new file, the mesh names in Blender are slightly changed (with my annotations). Does name matter for order? If yes, should I put my name changes at the end of the name, so that the original name order persists?

Another issue for the new file, I made new sub folders. So idk if that changes the Alphabetical name order in Blender, during Export?

Basically I am asking how does Blender determine the Mat-slot order during Export. Because I dont think UE import is deciding… merely reading the file. (Correct me if Im wrong.) Thank you.