Search Unity

Need help with mesh textures

Discussion in 'Editor & General Support' started by Rob64, Aug 15, 2010.

  1. Rob64

    Rob64

    Joined:
    Aug 15, 2010
    Posts:
    18
    Hi all,
    I'm new to unity and have used it for 4 days now, thank you for great programme. I'm exporting .OBJ meshes into unity from a programme called Deled3d. The meshes have been textured before being exported and I've put the mesh and the texture in the assets file but the mesh shows up in unity untextured. The texture does show up in unity and I can use it to texture meshes and objects in general but how do you get the mesh to have the textured look it had when it was created in the exporting programme. Thanks for any help.
     
  2. fallingbrickwork

    fallingbrickwork

    Joined:
    Mar 16, 2009
    Posts:
    1,072
    If you have created materials correctly with UVs within your modeller and exported, everything should be fine. Select your model in the scene and you should see your material in the inspector window. Change the shader to what you need, ie bumped, specular and drag you textures onto the slots in the material.

    Let me know how you get on.

    Regards,
    Matt.
     
  3. Rob64

    Rob64

    Joined:
    Aug 15, 2010
    Posts:
    18
    Thanks for replying Matt,
    I exported a single cube out of Deled3D with a uv map consisting of 4 different textures (didn't do a uv map before), exported the textures also, this time the cube did have one texture on it covering every face, and only this texture shows in the inspector window. The other textures show in the project window. I can't see any slots to drag textures into, what did you mean by that.
    regards
    Rob
     
  4. fallingbrickwork

    fallingbrickwork

    Joined:
    Mar 16, 2009
    Posts:
    1,072
    I think you may be getting textures and materials mixed up. If you are using 4 different textures within your modeller, you should be creating 4 materials. If everything is exporting ok you should see these 4 materials in the inspector.

    The slots are the empty boxes you see under the shaders in the inspector. Every material should have a shader which will be diffuse by default and only have 1 slot. If you have 4 materials drag your textures into these 4 diffuse shader slots.

    Are you exporting as fbx, give it a go if not. Just check you have as many materials in unity as in your modeller as a starting point.

    Regards,
    Matt.
     
  5. Naison

    Naison

    Joined:
    Feb 21, 2010
    Posts:
    386
    Many programs can't export as FBX, but as far as obj goes that format isn't too good for game design because from what I understand obj can do UV export, and mesh geometry exporting, but cant do bones or anything animation wise. Good way to counter this is use blender, or buy another 3d program. But besides all that if you have you textures saved inside of you unity assets, and then you texture those onto your model by pulling them right from the asset folder, then when you bring your model into unity it should see the image has the same name and recognize what you did. And that has always worked for me. Not sure if that helps, but I tried.
     
  6. Rob64

    Rob64

    Joined:
    Aug 15, 2010
    Posts:
    18
    I've made 4 materials and these show in the project window. I've given each material a different texture which also shows in the project window. If I click my mesh object default icon in the project window to bring up its information in the inspector it only shows one texture (main color), this is in the mesh renderer section. I can drag different textures from the project window to the mesh o.k. but can't get more than one texture on the mesh at the same time.
     
  7. Rob64

    Rob64

    Joined:
    Aug 15, 2010
    Posts:
    18
    Before I found Unity I built models in DeleD3d and exported them to Blitz3d (game engine). I could build a model out of many primitives, texturing different faces with different textures without having to do a uv map. This would show up in Blitz3d correctly, showing all the different textures placed as they should be. Is this possible with unity.
     
  8. Rob64

    Rob64

    Joined:
    Aug 15, 2010
    Posts:
    18
    I've fixed the problem, the OBJ. files were no good for unity, they were wavefront OBJ. files. If I export from DeleD3D using collada files everything seems o.k. now.