Importing obj file with textures

I had downloaded a spaceship object from the web. The zip file includes:
obj file, some Gif textures and MTL file.
how can I import the object with the textures in place to unity3d?
(sorry for my bad english… =])

5 Answers

5

Just put in in your Ressource folder.

Drag the files into your Unity project, then create a material, assign the texture to it and then drag the material onto the OBJ file.

You can also do all this by scripting. But thats a more complex story.

Why bother? The object should have UV data on its mesh, and so just dragging a texture on in Unity should work.

I've not heard about MTL file support, but perhaps someone have made a script if thats really neccessary? As @syclamoth states, why bother :-)

did my answer help you? or are you still stuck @tomer2911 ?

@BerggreenDK it seems to be an old topic but can you help me, I'm actually tring to get the same result as the drag an drop but with script. The point is to do it on the fly while the game is running. Thanks

Can I import the MTL file? Because in my understand he includes the information about how to create the object and match the textures currectly.

(I guess this was a faulty posting, please delete it to clean up this thread) :o)

  1. If you have experience with Blender you can load the model into Blender and export it to fbx.
  2. There is an FBX Converter from Autodesk available for free and it doesn't need AutoDesk to be installed. It should work with OBJ but I didn't manage to get animations out of 3ds files. Go to the AutoDesk download site and look for FBX Converter

I know this is a long shot but I really hope you reply. So If I use FBX Converter will the textures "combine" with the model and not make them seperate when I import it to Unity?

Is there any way to bypass Blender and Maya and just add an OBJ into Unity with vertex color data?

I have the same question.