Blender models dont have materials in Unity?

So, everytime I make a model, I uv map it, and then export it to unity. I normally just pray that it will work, because the results are so unpredictable it is almost funny the type of weird things I get lol.

This is what I do.

  1. Make 3d object in blender.
  2. Turn texturing on, and flip the faces that are going the wrong way.
  3. Go to the uv panel, then add however many uv maps I need x2. (if I want 3 materials I do 6 uv maps). I don’t really know why I need to do this, cause the second ones are always empty, but someone said I needed to once, so idk…
  4. select the faces I want for the material in edit mode, then I u - unwrap and open a texture in the uv map.
  5. if I am texturing an object with many faces, I unwrap a few faces at a time so they are very detailed. Otherwise it is just a blurry mess because of how many tiny little faces my objects sometimes have.
  6. I repeat this until all my faces are uv mapped/textured. each uv map has all the faces with one type of texture.

Now, when I export to unity, these things happen.

  1. The object is just super blury, for instance instead of looking like bricks, it will just be a pink blurry color that textures the entire object.
  2. Part of the object will be well detailed, and the other part will be blurry like before.
  3. my uv maps are all weird, so I had 6 uv maps, 3 of them were textured. 1 for sand, 2 for wood, 3 for metal. The metal part was blurry, and the sand part colored both the wood and the sand, and part of the sand was blurry.

Like wtf?! It always looks great in blender, and when I import to unity, it gets all *&^% up. It is an extremely frustrating problem, and I have tried every texturing tutorial on the internet and none of it works. am I doing something wrong, or does blender just downright suck?

You can do it two ways:

  1. If you want it to be all one mesh, select and unwrap the faces you want to have a material, select the faces, go to materials tab and add a new material, hit assign to assign the material to those faces. Repeat for other materials, export as FBX, import into Unity. You’ll end up with a multi-material mesh and can assign multiple materials to it that will get assigned to the correct faces.

  2. Separate all the parts that should be a separate material into separate objects in blender. Export and in Unity you’ll end up w/ a parent GameObject w/ the meshes as children, each will have a single material.

Just a quick test in 4.6 indicates that the multi-material option probably gives fewer draw calls and lower poly count. If you still can’t get it make sure to post what version of blender you are using and I can make a quick video.

Oh, don’t make a bunch of UV channels. Most you should create is 2, if you need a different unwrap for lightmapping or a custom shader.

2 Likes

omg i love you. You described in 2 paragraphs what 10 pages of tutorials couldn’t. You are my hero lol.

1 Like

Gasp!! :hushed:
I didn’t know you could do it that way!
Thank you for that info niosop2! :smile:

I think it’s a newer feature, you used to have to assign the UVs to a texture in the UV Layout view instead, which was fine. Not sure if it’s a change in blender itself, or just a change w/ the new binary FBX exporter. So if you need to use the old ASCII exporter (since new one doesn’t export shape keys yet), you might still have to do it the old way. I may get around to testing it to know for sure one of these days.

Actually that isn’t working tho D:

I just tried it. I added 3 materials and assigned them to the faces, then I added textures to each material.

But when I export to unity, I get three empty materials. Each material colors the faces I assigned, so that is good at least, but when I put a texture on each material, the object is blurry. Like the rusty metal top of my object is just a solid brown color. The middle sandstone brick is a solid tan color. The wood door is also a solid brown color. ???. How can I make it so I can actually have textures in unity?

Did you unwrap it properly? Sounds like you didn’t so it’s just picking one pixel and using that color for the whole thing. Post your .blend if you want and I’ll take a look.

OOOOOOOOHHHHHHH… Nevermind I figured it out. I was making a testbox to post and while I was doing it something clicked in my head lol. What I was doing was on the mapping tab of the texture, I was setting the image to uv, and unwrapping the faces to a uv map. That messed it all up somehow. When I don’t have any uv maps, and I just unwrap it and texture it, the model comes out fully detailed in unity. Thanks man!