Search Unity

applying textures to Blender models in Unity

Discussion in 'Editor & General Support' started by BlitheD, Sep 29, 2006.

  1. BlitheD

    BlitheD

    Joined:
    Aug 28, 2006
    Posts:
    36
    I am having trouble applying textures to Blender models in Unity. If I import a model with no texture on it and try to add the texture in Unity it doesn't come out right at all and only shows up as a simple color. The file below shows this with the ball on the left being a Unity sphere and that on the right being a Blender sphere. They are both using the same material and it seems to me they should both be displaying the same way... Any suggestions?
     

    Attached Files:

  2. NicholasFrancis

    NicholasFrancis

    Joined:
    Apr 8, 2005
    Posts:
    1,587
    How have you mapped the texture onto the ball in blender? You need to use UV mapping.
     
  3. freyr

    freyr

    Joined:
    Apr 7, 2005
    Posts:
    1,148
    It seems as if the Blender model is missing an UV map. Some 3D apps require that you attach a texture to the object for the UV map to be exported.
     
  4. BlitheD

    BlitheD

    Joined:
    Aug 28, 2006
    Posts:
    36
    Actually, one of the reasons that I was trying to apply textures to models right in Unity is that I wasn't able to get it to work bringing it in from Blender. Unity does fine applying textures to the Unity prefab shapes - is it capable of doing the same with imported models?
    I did change the Blender "Map Input" from "Orco" to "UV" and tried importing it with the texture again but it made no difference...
    Any ideas?
     
  5. pete

    pete

    Joined:
    Jul 21, 2005
    Posts:
    1,647
    make sure it has a uv map and an image applied in blender. in unity import the model and the image. assign a material and drag the image onto the texture slot.

    not sure about blender but importing from lightwave won't hold uvs unless there's an image assigned in lightwave.
     
  6. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    As everyone else has suggested, you need to set up the UV mapping in Blender. Although the material properties don't import from Blender to Unity, the UV mapping does.

    In Blender, select your sphere and go to "UV Face Select" in the pull up menu in the 3D view (picture #1).

    Then press the "U" key, which will give you the UV mapping options (picture #2) and select an option (sphere from view is probably a good place to start). Save your model and you're done.

    There's alot more to UV mapping, and you can find lots of info on this at blenderartists.org.
     

    Attached Files:

  7. forestjohnson

    forestjohnson

    Joined:
    Oct 1, 2005
    Posts:
    1,370
    You have to open the uv editor in blender and make modifications, then save it. If it were me I would make a single seam from the north to south pole of the sphere and unwrap it.
     
  8. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Yeah, the "Map Input" stuff is for Blender rendering only. Unfortunately you're going to have to get your hands dirty with real UV mapping. ;) It's actually kind of fun once you get used to it...but expect to spend some time being frustrated/confused at first.

    Blender just needs UVs; no image needed.

    --Eric
     
  9. pete

    pete

    Joined:
    Jul 21, 2005
    Posts:
    1,647
    >> It's actually kind of fun once you get used to it

    oh man, i've got a whole bunch of models i'll send ya! :D
     
  10. BlitheD

    BlitheD

    Joined:
    Aug 28, 2006
    Posts:
    36
    >In Blender, select your sphere and go to "UV Face Select" in the pull up menu in the 3D view (picture #1)...

    Wow! That did it. That would have taken a long time to figure out on my own. Thank you everyone for helping with that!