Hi I’m having an issue where I create a mesh in Blender, by combining multiple separate objects into a single object(control-J).
In Blender this is properly represented as a single object-- but whenever I open it in Unity it will show a single mesh with multiple materials(although all materials are the same–I only have 1 texture). This seems to be some leftover of having combined multiple objects.
Annoyingly this is resulting in multiple draw calls:(
This is with both the FXB export and the direct Unity import of the .blend file. Only when I export to collada does it seem to notice that it actually only has one mesh and one material(probably because collada fails to transfer the materials correctly).
Is anyone else having this issue, and know of a way to fix it(while still using direct .blend or .fxb)?
Make sure you only have the number of materials you want in your scene while in Blender and also that you have Unity set so that when it imports it creates a material for each material in the Blender file (not for each texture). I’m not an expert on this, but what I normally do is create a new material anyways (I don’t like how Unity names them) and then manually assign it to the meshs. There’s probably a nicer way to do it, but I’m usually in a hurry and just do it manually to get it done.
Sounds like you have to assign the whole mesh to your material again and/or delete all your other materials (if you don’t need them anymore). You probably have an object with several materials assigned to different parts of the mesh.
Blender 2.49:
Select the object, go into edit mode, select all and then find the button where you can delete and assign materials.
(visible in this pic).
Make sure your mesh only has 1 material and all the vertices are assigned to it.
Hi Bigkahuna, I’ve tried setting Unity to create materials based on the materials in the Blender file, but this actually made it worse for me at least(or at least no better). Unity seems to successfully import the textures and materials now with the 3.2 update, it just somehow has the wrong number of them:(
I’m looking at a house object I made, when I import it into Unity it shows up with 5 materials(although it is the same material repeated 5 times), and causes 5 draw calls.
In Blender I see that is somehow has these images referenced(when I look at UV editor)…
Make sure your model has only one material in the slot at the top of this picture
Then in edit mode, select all and assign the one material you want to keep to all vertices. The assign button will show up right below the material slots.