How to export .obj format file with texture in blender?

vishnuajan picture vishnuajan · Feb 27, 2018 · Viewed 12.3k times · Source

The picture is my blender object screen. First of all i am new in blender. i have attached texture from tree object. this project exporting (.obj) and (.mtl) files only.but it does not exporting texture images.I need textures image also. please any give the solution.

Answer

vishnuajan picture vishnuajan · Feb 27, 2018

about blender obj read this -

Blender imports obj files with textures just fine with Blender Internal renderer as the active renderer. But importing obj files with texture while Cycles is the active renderer is currently not supported. With Cycles you have to create a new material with your texture So first idea is to check what renderer you use while trying to import the mesh. Then there was the file format itself. The Obj file format is made of two files, not one. The *.obj file contains the mesh data. The *.mtl file contains one or more simple phong material(s) with the associated texture paths. And the good news is Obj is a super simple file format in text form. You can open the files in a text editor and edit them to your needs. When the *.mtl file is missig then there is nothing to import for Blender. No mtl file means no material and no texture available. When the *.mtl file exists, but the texture paths in the file are absolute, and the texture is at another location, then there is nothing to import for Blender since the textures are not found. So first thing to check: does the *.mtl file exist? And if that's the case and the textures doesn't import: are the texture paths in the *.mtl file relative or absolute? Open the *.mtl file in wordpad for example. Have a look at the line(s) with map_kd at the front. For example, an absolute path would be map_Kd C:\UserX\myfolder\mytextures\mytexture.png When you change it to map_Kd mytexture.png then this path becomes relative. And when you put your texture besides the obj file, then the texture gets usually loaded - when Blender Internal is the active renderer. As told, Cycles is not supported at this point.