- Home /
Unity imports .obj with extra material
I'm working in Blender and exporting an OBJ into Unity. I have one mesh with two different materials applied to it. However, when I import the OBJ into Unity, it creates a third material which is assigned to the first face of the mesh. This happens even when material generation is turned to 'off' (it still makes three slots for materials). Opening the OBJ and MTL files in Notepad confirms that Blender exports everything properly, with only two materials. I'm using all other default settings in the importer.
I haven't even the slightest idea why this is happening beyond it being an importer bug. Has anyone seen/dealt with this before?
I really wish this would be solved. I'm having the exact same problem, but using another format is not really an option for me.
Its not really a problem. You can simply delete unwanted materials and or swap them for one you want to use.
In your $$anonymous$$esh Renderer (I use Skinned) click the $$anonymous$$aterials Entry and change Elements from 3 to 2.
Answer by DaveA · Jan 05, 2012 at 08:28 PM
I have seen this type of thing. I simply stopped using OBJ and just use the .blend files, it seems to digest them well.
Answer by peter.gandia · Oct 22, 2015 at 08:02 PM
Hello,
I would like to reopen this issue with a similar problem. I imported 2 separate OBJ files in blender that originated in Maya. I saved them both in the same .blend file, rigged, applied material and animations. Unity is still showing:
Materials
Size: 2
Element 0: Default-Material
Element 1: Default-Material
Attached are images of Blender's materials panel and Vertex Groups panel. It shows that I have only one (1) material and one (1) UVmap. I even went as far as to remodel the weapon (second OBJ file) from a single vertex of the body of the character and delete the old "join"ed weapon. It still shows 2 materials in Unity.
Is it possible that this was something that carried over from Maya and I can't get rid of?
thanks, Pete
Answer by I-am-Lawrence · Sep 23, 2016 at 05:53 AM
As a possible workaround but by no means a solution, go into the UV/Image editor, and shift+x (un-link) all textures.
For some reason, and with no consistency textures linked here are sometimes associated with one or multiple meshes, then when Unity re-imports it creates a new slot for that texture as a material. These textures don't need to be linked to a material in blender and need only exist and linked to the .blend file.
It can get annoying, which is why I'm here right now, trying to find a permanent solution!
Your answer
Follow this Question
Related Questions
Textures from Blender to Unity 0 Answers
How to keep texture resolution from blender? 1 Answer
Multiple UVs from Blender (Problem) 0 Answers