Issues with the materials system

I’m encountering several bugs in the materials system. These bugs are causing my work to be corrupted and fail to interop with other programs.

  1. When applying materials to sub-objects, entirely other objects are being affected.

  2. When applying materials to objects, other objects in the same layer are being affected.

  3. Despite showing multi-materials on my object(s), they are not exported with multiple texture slots.

  4. Objects with the same material are being exported with multiple materials instead of sharing a single material.

For 1

Shows the entire object selected.

Two faces selected, about to assign a material via “Assign to Objects”.

The gable (a completely different object) is affected by the material assignment.

For #2

Single object selected. Changing the material from the object properties.

Select no to discard per-face assigns.

Multiple other objects in the entry are affected by the material assignment.

For #3

With nothing selected, 2/3 materials show as not being used in the file.

With the object selected, only 1/3 materials shows as being used by the object.

Running “Select Objects” on “Satin Aluminum”.

Shows the faces that have this material applied.

Same but for the 3rd material.

Exported as binary gtLF and opened in Blender. Only 1 texture slot.

Other objects in the same file export with correct texture slots as read by both Blender and UE5. The objects that export correctly show the gold dot for multiple materials in the material panel (with the object selected).

For #4

Both objects are using the glass material.

Exported as binary gtLF and opened in Blender. “Glass” material.

Exported as binary gtLF and opened in Blender. “Material_1” material.

Note that Material_1 looks to be using the layer color.

FBX_TS.3dm (1.1 MB)
FBX_TM.3dm (256.9 KB)
SystemInfo.txt (2.4 KB)

I will not upload my full 3dm here, but I will send it to mcneel.

Hi @AndrewM - Thanks for the thorough report and the file :slight_smile: . Here’s my take on the different issues:
No 1 - I could not reproduce this one.

No 2 - I could repro this one RH-84074.

No 3 - There seems to be an issue with exporting per-face materials, when the object’s main material is assigned per-layer. If you assign the main material per-object, then the per face materials transfer well using the GLTF format. I’ve logged this under: RH-84083.

No 4 - I believe this is the same issue as above. You’ll notice the glass pane material that fails to make it into GLTF, is on the object that has a Per-Layer assignment.

For #1, I uploaded a couple of videos showing the issue.

Based on your insight around per-layer materials, is it possible the faces affected are the same face indices, but on different objects, but for two object both assigned to the same per-layer material?

At the very least, in both cases, the other objects affected are on the same layer(s). I don’t have insight into if they are per-object or per-layer materials on a per-object basis. #2 actually came about as I was trying to reset an object to be sure it was using the layer material and not a per-object material (despite it being the same material either way).