Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Blender, Unity and Textures.

Discussion in 'Asset Importing & Exporting' started by Riaan-Walters, Feb 6, 2016.

  1. Riaan-Walters

    Riaan-Walters

    Joined:
    Apr 11, 2014
    Posts:
    36
    First off, its 2am (been searching for an hour+) so if the message is a bit raw, apologies.

    I created a model in blender, assigned textures and after hours of tweaks it finally looks as I expect it to (in blender)

    After Importing it to unity, It seems to import all Models and Materials (but not the textures).

    Ive seen many video's of where the textures are manually assigned to the materials after import and the question is simple.

    - Is this normal?
    - Would someone be kind enough to explain why this happens or at least point me in the right direction?

    ( Yes I have seen : http://docs.unity3d.com/Manual/HOWTO-ImportObjectBlender.html - And I am well aware it does not specify that Unity imports textures, I am merely looking for confirmation)
     
  2. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    910
    From what I've seen, this is perfectly normal/expected. I understand that it is possible to export to OBJ(which can include texture names, but not textures themselves), and that Unity may be able to assign textures that way automatically if the textures are found. But this isn't a sure thing from what I know, and in any case if it does work it is only via OBJ files, and you are likely to need animation soon enough. So unless there is something I don't know about, you might as well get used to it.

    I have it understood that it is possible that you could script something up. Maybe it could automatically apply textures onto materials upon import. So you would have to script it, and it would depend on some kind of naming scheme. I think I saw in some post somewhere that this was being discussed, but I don't know much about it.
     
  3. Riaan-Walters

    Riaan-Walters

    Joined:
    Apr 11, 2014
    Posts:
    36
    Alright, So when I drag the ".blend" files into unity and it does not import the textures, this is normal.

    Ok thanks
     
  4. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,511
    I was about to type that this is not normal, but actually it is. I had forgotten that I had written Python scripts so I don't hate myself during the rest of production. Take a look at my blog post here, under Exporting Textures. It's what I used during Horde Rush development.
     
    theANMATOR2b likes this.
  5. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Did you uv unwrap the model and is the texture in Blender displayed using those uvs?
     
  6. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,511
    Actually, I forgot to ask... Are the textures in the Assets folder or subfolder of? If so, then it should work. If not, then yeah, you need to copy them manually, or with a script like I posted earlier.
     
  7. Dgrohl91

    Dgrohl91

    Joined:
    Sep 15, 2015
    Posts:
    4
    It should work if you use the option "pack all into blend" under the "file" menu, I guess, I didn't try it actually
     
  8. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Packed textures are not imported in Unity! Internally, Unity converts the blend file to fbx. In this step, the textures are lost.
     
  9. Riaan-Walters

    Riaan-Walters

    Joined:
    Apr 11, 2014
    Posts:
    36