# FBX-Import Bug - Skeletal Meshes keep reference to unused material IDs

**URL:** <https://forums.unrealengine.com/t/fbx-import-bug-skeletal-meshes-keep-reference-to-unused-material-ids/369614>\
**Category:** Asset Creation\
**Tags:** fbx-import, unreal-engine, question\
**Created:** [September 6, 2016, 10:40pm UTC](https://forums.unrealengine.com/t/fbx-import-bug-skeletal-meshes-keep-reference-to-unused-material-ids/369614 "2016-09-06T22:40:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeFxGuy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LeFxGuy](https://forums.unrealengine.com/u/LeFxGuy)\
**Post date:** [September 6, 2016, 10:40pm UTC](https://forums.unrealengine.com/t/fbx-import-bug-skeletal-meshes-keep-reference-to-unused-material-ids/369614/1 "2016-09-06T22:40:56Z")

</div>

I think I found a bug when Importing Skeletal meshes as they keep a reference to unused materials.  
This is not 4.13 only and at least also valid for 4.12 and 4.11 as well

Steps to reproduce:

1. Create A cube in 3dsMax, animated along an axis from frame 0-100, give it Material ID 1 except for one face, give it ID3 in 3dsMax. Create a Multi-Sub-Material with X materials (where X is is larger than 3, in my case 5)
2. Export the mesh with animation and Import into Unreal as a Skeletal Mesh
3. As the cube uses 2 Material IDs, the skeletal mesh editor shows 2 materials used.

 ![105946-skeletalmesh_cube_2matids.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/a/4/6a4afecfb84e67b2c087d178bb82008b860a80e6.jpeg)

1. Drop the same SkeletalMesh animated cube into the scene or any BP. The Details Panel shows all the material IDs that the 3dsMax Multi-Sub material had

 ![105945-skeletalmeshallmats.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/d/b/0dbbb7c4521a66323717fb9957699ac74675a1e4.jpeg)

1. Now, the problem is that the MaterialIDs shown in the DetailsPanel are also the ones that are used internally. In my case, I created a Texture Parameter with a Green Texture and a BP. Obviously you would want to reference the MatID shown in the skeletalMesh Editor but that does not work. You have to use the ID shown in the Details Panel.

 ![105944-simplebp.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/0/f/60f180ce5f7f8372daf5630b931b00531314db9e.jpeg)

1. To verfiy draw calls, i created a second cube with a “condensed” multisub-material, dropped it into an empty level with only the cube and a point light and at least they both have the same number of draw calls! So the rendering system is unaffected but the internals are still messed up. I can also understand that all materials from the MultiSub Material are imported and I am fine with that but it should not keep MaterialID Slots/References to unused materials.  
In our project cases, we had meshes with 400+ Slots! Just to give you an idea what mess there seems to be although I can’t savely reproduce this with a newly created asset nor make the asset public and I hope this small demo case shows the bug and is reproducible for you.

---

<div class="post-metadata">

**Author:** ![LeFxGuy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LeFxGuy](https://forums.unrealengine.com/u/LeFxGuy)\
**Post date:** [September 6, 2016, 10:45pm UTC](https://forums.unrealengine.com/t/fbx-import-bug-skeletal-meshes-keep-reference-to-unused-material-ids/369614/2 "2016-09-06T22:45:03Z")

</div>

For completeness: Importing that same cube as a staticMesh does not reveal any such behaviour. The cube as 2 Material Slots when opened in the StaticMesh Editor and when dropped in a scene/BP. Thus it seems like the skeletal mesh import is failing at condensing MaterialIDs

---

<div class="post-metadata">

**Author:** ![Tim\_Hobson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tim\_Hobson](https://forums.unrealengine.com/u/Tim_Hobson)\
**Post date:** [September 7, 2016, 5:46pm UTC](https://forums.unrealengine.com/t/fbx-import-bug-skeletal-meshes-keep-reference-to-unused-material-ids/369614/3 "2016-09-07T17:46:20Z")

</div>

Hey LeFxGuy,

Thanks again for the separate post and all the details. This has been submitted and can be tracked here: [Unreal Engine Issues and Bug Tracker (UE-35673)](https://issues.unrealengine.com/issue/UE-35673)

Tim
