# Reimporting LODs causes duplicate materials to be added to mesh

**URL:** <https://forums.unrealengine.com/t/reimporting-lods-causes-duplicate-materials-to-be-added-to-mesh/328189>\
**Category:** Rendering\
**Tags:** Blender, unreal-engine, import, question\
**Created:** [August 10, 2015, 9:57am UTC](https://forums.unrealengine.com/t/reimporting-lods-causes-duplicate-materials-to-be-added-to-mesh/328189 "2015-08-10T09:57:58Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![VSZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VSZ](https://forums.unrealengine.com/u/VSZ)\
**Post date:** [August 10, 2015, 9:57am UTC](https://forums.unrealengine.com/t/reimporting-lods-causes-duplicate-materials-to-be-added-to-mesh/328189/1 "2015-08-10T09:57:58Z")

</div>

Tested using Blender and UE4:

1. Create a simple mesh in Blender and import it into Unreal
2. Create an LOD 1 version of the mesh in Blender, import into Unreal using the “Import LOD 1” button under LOD Settings-\>LODImport in the static mesh viewer
3. Place the static mesh in the world and check the details panel. You should see 2 materials (this is correct)
4. Now reimport either LOD1 or the base mesh again. Now the details panel shows 3 materials instead of 2! Reimporting more times inflates the material count even further.

The only workaround is to import the base mesh from scratch with a new name, setup LODs from scratch and delete the bad mesh and make it point to the new one. Not ideal!

---

<div class="post-metadata">

**Author:** ![Lovecraft\_K](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lovecraft\_K](https://forums.unrealengine.com/u/Lovecraft_K)\
**Post date:** [August 10, 2015, 5:50pm UTC](https://forums.unrealengine.com/t/reimporting-lods-causes-duplicate-materials-to-be-added-to-mesh/328189/2 "2015-08-10T17:50:11Z")

</div>

Hi VSZ -

Thank you for your report. This is a known issue currently under investigation as UE-1394. I have added your information to the report and updated the community interest. As we continue to investigate and work toward a solution I will keep you informed here.

Eric Ketchum

---

<div class="post-metadata">

**Author:** ![bstone](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bstone](https://forums.unrealengine.com/u/bstone)\
**Post date:** [February 22, 2016, 12:20pm UTC](https://forums.unrealengine.com/t/reimporting-lods-causes-duplicate-materials-to-be-added-to-mesh/328189/3 "2016-02-22T12:20:31Z")

</div>

Hi Eric,

Any updates on this one? It’s chasing me as well. It seems the dummy material slots hold valid references to materials. I had a number of cases where I was cleaning the project up and removing unused materials and I couldn’t do that. And there’s no way to break those references since they don’t appear in the Static Mesh Editor (just in the Details panel for the related static mesh actors).

---

<div class="post-metadata">

**Author:** ![Lovecraft\_K](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lovecraft\_K](https://forums.unrealengine.com/u/Lovecraft_K)\
**Post date:** [February 22, 2016, 3:21pm UTC](https://forums.unrealengine.com/t/reimporting-lods-causes-duplicate-materials-to-be-added-to-mesh/328189/4 "2016-02-22T15:21:38Z")

</div>

Hi bstone -

No updates for this issue. It is currently backlogged in our system, but I have added you information to it and updated the community interest.

Thank You -

Eric Ketchum

---

<div class="post-metadata">

**Author:** ![Tom\_H](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tom\_H](https://forums.unrealengine.com/u/Tom_H)\
**Post date:** [May 16, 2016, 4:43pm UTC](https://forums.unrealengine.com/t/reimporting-lods-causes-duplicate-materials-to-be-added-to-mesh/328189/5 "2016-05-16T16:43:04Z")

</div>

To add more info I’ve discovered that having imported a base LOD and added 3 other LODs to it, then reimporting those a few times to get the material slot count up to 9 - in the static mesh editor I go to Assets-\>reimport and it’s now down to 2 slots, which seems odd when there are 4 LODs and each use the same material in blender. Surely that’s either 4 slots or just 1?

Thanks,

Tom

---

<div class="post-metadata">

**Author:** ![VSZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VSZ](https://forums.unrealengine.com/u/VSZ)\
**Post date:** [May 16, 2016, 7:32pm UTC](https://forums.unrealengine.com/t/reimporting-lods-causes-duplicate-materials-to-be-added-to-mesh/328189/6 "2016-05-16T19:32:18Z")

</div>

This is a valid concern for Blender users IMO.

I read [elsewhere on Answerhub](https://answers.unrealengine.com/questions/60837/material-duplication-after-reimport-lod.html) that this was considered an editor-only bug with no in-game impact. This is not accurate though; run-time mesh/material assignment code is seriously affected because the order of material indices can no longer be relied on! Also spawning duplicate materials all over the place is not a benign usability issue (as bstone’s problem with invalid project references illustrates) so I would consider this a major bug by any metric.

EDIT: Another example; consider a project that has been in development for a year and has a mesh that has been reimported say 30 times. That mesh will now have \>30 material slots if it had 2 LODs and close to 100 material slots if it had 3 LODs. Even considering just the Editor, surely, this is a bug worth fixing!

In terms of workflow, while Maya/Max users can simply bundle their LODs into a single FBX, Blender users rely solely on the LOD Importer pipeline to get their LODs in. AFAIK the LOD importer feature introduced was specifically to support LODs for Blender so it would be nice to finally see a resolution for this ancient bug! I’ve been tediously reimporting meshes from scratch all this time even for a tiny change to any given mesh.

My thanks to bstone and TomH for bumping this! I haven’t followed up on my bug report as keenly as I should have due to a real lack of time, so I thank you for keeping the focus on this bug going. Also thanks to Eric Ketchum and Epic for looking into this!

---

<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:** [May 23, 2016, 8:32pm UTC](https://forums.unrealengine.com/t/reimporting-lods-causes-duplicate-materials-to-be-added-to-mesh/328189/7 "2016-05-23T20:32:48Z")

</div>

@VSZ

I’ve added your concerns and notes here to the ticket in question. I’ll bring it up and see if we can get this to a higher priority but I cannot guarantee that currently.

Thanks!

Tim

---

<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:** [June 2, 2016, 3:35pm UTC](https://forums.unrealengine.com/t/reimporting-lods-causes-duplicate-materials-to-be-added-to-mesh/328189/8 "2016-06-02T15:35:15Z")

</div>

@VSZ @Tom H

If you have a test FBX that can reproduce this can you please attach something here in a .zip file. I’ve not been able to reproduce this in the latest 4.12. Thank you!

---

<div class="post-metadata">

**Author:** ![VSZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VSZ](https://forums.unrealengine.com/u/VSZ)\
**Post date:** [June 2, 2016, 5:23pm UTC](https://forums.unrealengine.com/t/reimporting-lods-causes-duplicate-materials-to-be-added-to-mesh/328189/9 "2016-06-02T17:23:07Z")

</div>

Hi Tim, which Blender version did you use? (assuming you used Blender that is, but it if not it shouldn’t matter as I believe the bug is in the LOD Importer code itself). I’m asking so we’re on the same page when I send you a test file.

PS: To recap, the duplicate materials do not show up in the Static Mesh editor itself but they are visible when you place a static mesh in the map. More importantly they manifest internally; i.e. any material operation relying on index like _mesh-\>GetMaterial(i)_ or _mesh-\>CreateDynamicMaterialInstance(i)_ won’t work logically because of the duplicate materials messing up the index order.

---

<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:** [June 2, 2016, 9:24pm UTC](https://forums.unrealengine.com/t/reimporting-lods-causes-duplicate-materials-to-be-added-to-mesh/328189/10 "2016-06-02T21:24:28Z")

</div>

I was actually able to get it to reproduce now. Happens with any FBX no matter software. The one point I didn’t do was place an actor in the world and look at its Details panel there. I was only looking at the one in the Static Mesh editor. One of the engineers is in progress to get this fixed for 4.13. Thanks!

---

<div class="post-metadata">

**Author:** ![Doctor\_Kannon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/doctor_kannon/32/1130101_2.png) [@Doctor\_Kannon](https://forums.unrealengine.com/u/Doctor_Kannon)\
**Post date:** [January 17, 2019, 1:02am UTC](https://forums.unrealengine.com/t/reimporting-lods-causes-duplicate-materials-to-be-added-to-mesh/328189/11 "2019-01-17T01:02:39Z")

</div>

This is still happening. Reimported LODs 1 - 6. Messages indicated success for each. The editor added something like 66 Material Slots.

These are FBX files exported from Blender 2.79.

Also, LODs 1 - 6 aren’t actually appearing, but that would be a different issue.

 ![265643-lod-material-issue.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/7/c/67c61f3093741cc7af9a8fc4dde3d101ee1f654f.png)

---

<div class="post-metadata">

**Author:** ![Alex\_iceman](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alex\_iceman](https://forums.unrealengine.com/u/Alex_iceman)\
**Post date:** [March 8, 2019, 5:47pm UTC](https://forums.unrealengine.com/t/reimporting-lods-causes-duplicate-materials-to-be-added-to-mesh/328189/12 "2019-03-08T17:47:44Z")

</div>

Try to check the sameness of material names in Blender and Slot Names in UE4 Static Mesh Editor. Edit if needed.

 ![270709-equal-names.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/6/2/462165f21b2e37b22e77cd962725f460e4e9bd9a.jpeg)

---

<div class="post-metadata">

**Author:** ![Doctor\_Kannon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/doctor_kannon/32/1130101_2.png) [@Doctor\_Kannon](https://forums.unrealengine.com/u/Doctor_Kannon)\
**Post date:** [March 8, 2019, 8:30pm UTC](https://forums.unrealengine.com/t/reimporting-lods-causes-duplicate-materials-to-be-added-to-mesh/328189/13 "2019-03-08T20:30:34Z")

</div>

FWIW I don’t normally apply materials in Blender. The import comes with a default material that then gets discarded.

I suppose I could try that though. Thanks.

---

<div class="post-metadata">

**Author:** ![HRISTOBOSS\_3000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HRISTOBOSS\_3000](https://forums.unrealengine.com/u/HRISTOBOSS_3000)\
**Post date:** [April 15, 2021, 8:31am UTC](https://forums.unrealengine.com/t/reimporting-lods-causes-duplicate-materials-to-be-added-to-mesh/328189/14 "2021-04-15T08:31:11Z")

</div>

Few years down the line, the problem still persists. I have distributed my foliage, made some changes to the lightmaps, reimported and now I have plenty of unused empty material slots, which I can neither get rid of, nor populate with a material. In order to fix that, I’ll now have to delete ALL foliage from my level, delete the mesh from content browser, reimport, setup LODs and their distances and populate the level back again.

Incredible workflow!
