- Home /
Exporting files from blender to unity
A couple of months ago I decided to create a pretty simple open world game. I started to create the world with a single plain that I stretched and moved to create a world with a few mountains and stuff. I also created a material with a texture to colour the island.
Not long ago I was ready to export this file into Unity, and start with the actual game, but when I dragged the plane from the asset folder into the scene, I saw that the single plane I exported was now 20-ish different planes combined into one big plane, where each of these planes were different faces of the mesh. I thought it was okay at first, but when I tried to drag the texture on the plane, it simply coloured each "sub plane" individually, which ruined everything.
How do I combine all these planes and restore them into one again? Did I do something wrong in blender? Also, if this is what happens with exported files as a default, is it possible to create meshes to use in Unity as well?
Did you select in Blender to export only selected objects? Often you will have hidden objects or models on invisible layers: these will be exported if you are exported everything.
There are no other objects in the scene other than a sun. The real problem here is that the single plain will be seperated to different groups of faces, which have the plain itself as a parent of the smaller objects.
I guess your plane has more than 65k vertices and unity splits it into different parts. This is the normal behaviour and shouldn't be a problem. There must be something wrong with your material/texture settings. For example: Have you tried to set the wrap mode of the texture from 'Repeat' to 'Clamp'?
I tried to put it to clamp, but only one of the parts of the plane was covered, just as before. It doesn't have anything to do with the textures or materials I think, its just that the plane turnd into a parent of many small meshes.
Hi, There is option in blender to combine your mesh in one by hitting Ctrl + J then you will get single mesh which is combined of all mesh. After that you need to unwrap this mesh for uv mapping and texturing. This mesh will be works fine in unity as per my knowledge. :-)
I know that, but in blender its a single plane. It just splits in Unity.
I don't think this is the answer to the question, because he said he already exported a single mesh ("the single plane I exported ..."). If you get more than 65k vertices by combining meshes in blender, unity will still split them in different meshes ("... was now 20-ish different planes").
Answer by Wilson28300 · Jan 26, 2016 at 11:50 AM
If ur mesh has more than 65k+ vertices, Unity splits the mesh into different parts. Instead of exporting, directly use the .blend file in your game and it will not split the mesh.
Hope this helps!
So, I tried to load the game again, and I suddenly noticed a notification I've never noticed before, and it seems like you are right. There's too many faces, so it splits them. I tried saving the .blend file diectly into the asset folder, but that didn't help much, so I think I'm going to try to split my mesh into several pieces in blender, and then add them to my game individually. It will be easier to add a material that way too. Thanks man!
Some of this problem occurs because shared vertices in Blender will be split to two (or more) individual vertices in Unity to aid with GPU processing. So in effect this can very well happen with Blender reporting well less than 65k verts.
Answer by MrMeows · Jan 22, 2016 at 11:34 PM
I have never used Blender, but I think you need to do UV mapping, which is the process of assigning areas on a mesh to areas on any given texture. It is this process that is responsible for seemingly random textures resulting in perfect skins.
On its own not the solution, however you are on to something.
If Unity splits your mesh for you you may find severe problems with your UV map.
Split your mesh manually in Blender and UV map the parts so as to retain your UV data for all parts.
Your answer
Follow this Question
Related Questions
Blender to Unity missing textures 1 Answer
Problems with importing Blender object 1 Answer
Edges of models wrongly take texture from neighbouring tiles on texture sheet 0 Answers
FBX Importing incorrectly from blender to unity 1 Answer
Getting a detailed procedural texture in Blender to look the same in Unity 2 Answers