Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Basic Blender to Unity Meshes not Taking Textures

Discussion in 'Asset Importing & Exporting' started by karlhale, May 1, 2012.

  1. karlhale

    karlhale

    Joined:
    May 1, 2012
    Posts:
    4
    I'm very new to blender and relatively new to Unity and am struggling getting any materials to render on my blender models once imported into Unity. That is, I can get a material to render color and what appears to be some coloring from some textures when using a Diffuse shader on a material, but I can't get a clear rendering of the texture image on my models. For example I have a very simple material with a Diffuse shader, no color, and the image I want for my texture that is largely browns and greens and I get rendered on the model I attach the material to a general brownish color but absolutely no distinguishing features of the original graphic

    I've gone as simple as opening a default blender file (the basic cube) and simply exporting that (in fbx as well as collada and others) and get the same thing. It's showing the color materials just fine, so I don't believe I have any problem with my normals.

    I've tried applying the texture in blender and then exporting (it creates a basic diffuse material in unity with no texture attached) and I've tried applying the texture in unity after importing.

    Any ideas or any place someone could point me?

    Thanks in advance for the nube question. I've looked through the forum and google and can't find an answer.

    KJH
     
  2. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    You need to unwrap your object. The stuff you do in the materials panel in blender (namely using generated UV coordinates) doesn't transfer. You need to unwrap the object and assign the texture in the UV panel. When doing stuff in Blender for Unity, ignore the materials panel and do all texture related stuff in the UV editor panel.
     
  3. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    Niosop is correct. Each application has its own way of handling materials. What transfers are the UV maps. So, you need to assign your UV maps and these will be brought into Unity. One way you can make this pipeline easier is to use the actual texture in your project as the texture you assign in Blender. In the UV Panel pick "open image (iirc)" and browse to your project's assets directory and select the texture you want and assign it to your UVs in Blender. This way, when you import the model, Unity will search your project for a texture of the same name (and if there are two textures of the same name, you get arbitrarily "the first one") and create a material with a diffuse shader and assign it to the object.
     
  4. karlhale

    karlhale

    Joined:
    May 1, 2012
    Posts:
    4
    That was exactly what I needed. I'm seeing lovely textures on my blender meshes in Unity.

    Thanks for the quick and clear responses!

    KJH
     
  5. RiosukePro

    RiosukePro

    Joined:
    Aug 7, 2013
    Posts:
    1
    i unwraped it it its still not working, im not to sure what im doing wrong?
     
    MagicStyle likes this.
  6. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    RiosukePro: What is the issue exactly? I'm not sure what "still not working" is...

    Please describe the steps you have taken. You can post images or screen caps if it will help...
     
  7. Metoyoubear

    Metoyoubear

    Joined:
    Mar 29, 2014
    Posts:
    1
    Excuse me, i have a problem with texture / material of my eyeball 3D object from .FBX blender to Unity.
    In Unity, the eyeballs aren't being applied with the texture / material that I set. (In Blender everything is fine)
    But if I see the eyeballs from side view, not the front view, the eyeballs have the texture / material.
    Does anyone know why this happen? I'm a newbie here.
    Really appreciate for your help ....
     
  8. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Don't necro that kind of old threads, instead start your own one.
    You have to setup the material in Unity again. Materials in Unity and Blender are not the same. The required materials are automatically created at import, but usually you have to set them up correctly by hand.
    Keep in mind, if you haven't uv unwrapped your model in Blender, you won't get a usable result in Unity.
     
  9. Fab4

    Fab4

    Joined:
    Sep 30, 2012
    Posts:
    114
    What Dantus says is right and important.
    Not only the unwrapping is important. The FBX export generates materials based on the textures that are set for the UV.So if you are using 3 textures on your model Unity will generate three materials as well, which are named after the textures you are using in Blender. These Materials are at the beginning applied to the model, but the materials are empty. You can set up those materials, but you have to import the textures as well. You are free in setting them up (shaders and textures)
    (There might be another solution but that is how I am doing it)
     
  10. christinanorwood

    christinanorwood

    Joined:
    Aug 9, 2013
    Posts:
    402
    I generally export a Blender model to fbx and then copy that into the Unity assets folder. If you copy any textures into the assets folder before the fbx, there is a good chance Unity will assign them correctly.
     
  11. HannyT

    HannyT

    Joined:
    Feb 18, 2014
    Posts:
    1
    Last edited: Apr 21, 2014
  12. MTKA6VI

    MTKA6VI

    Joined:
    Jul 20, 2017
    Posts:
    4
    Just move your textures picture in Unity folder, themselves will automatically convert into part of your project. Back to Unity 3D, click on your model then drag any texture to your model. Hope thats help. Or I can upload the image that can help, I dont mind.
     
    DigiGhost likes this.
  13. luckyluke714

    luckyluke714

    Joined:
    Feb 4, 2020
    Posts:
    2
    I have a simular problem, I UV unwrapped my my texture already. I did that to make the texture in the first place. I tried to import it to unity, and the texture shows up black and white. Does anyone have a solution?
     
  14. MidniteOil

    MidniteOil

    Joined:
    Sep 25, 2019
    Posts:
    345
    I'm not sure if the issue I'm experiencing is the same what's being discussed here or not but it sounds similar.
    I am taking the EDx Intro To Game Development course from Harvard. In assignment 8 we're finally getting into Unity. The assignment is simple, add gems the user can pick up and fix a small bug.
    The problem is, the unity project code that's provided as our starting point seems to have its meshes messed up. Specifically the helicopter, airplane and skyscraper prefabs are all missing their meshes and when I click Select Mesh the models for those assets are not appearing in the list.
    I see the .blender files for those asset models under Assets\Resources\Models but I don't know how I can get them assigned to so they render.
    I've posted to the forum for the course as well as a their discord channel but so far no luck.
    I did find a related thread where another student encountered this problem and even provided a repo where he supposedly fixed the meshes but I'm seeing the exact same issue with his repo.
    Here's a link the zip with unity project code for this assignment:
    http://cdn.cs50.net/games/2018/spring/lectures/8/src8.zip

    Thanks in advance for any help,

    Greg Bradburn.
     
  15. MidniteOil

    MidniteOil

    Joined:
    Sep 25, 2019
    Posts:
    345
    With help from folks on Discord I finally resolved this issue I had to install an older version of blender before importing the project.
     
  16. irombeach

    irombeach

    Joined:
    Aug 31, 2018
    Posts:
    1
    8 years later !!!! thanks for the answer :)
     
  17. Vahalla

    Vahalla

    Joined:
    May 14, 2021
    Posts:
    1
    I also have a problem , everything is there except for the back of my wing the front is there any suggestions for solution?
     
  18. Darmaalinc

    Darmaalinc

    Joined:
    Jan 12, 2021
    Posts:
    10