1
$\begingroup$

I'm exporting OBJ wavefront models from blender into my game development, thing is, it's black and white like this:

exported model without textures in external game engine

I presume it's because I don't have the texture.png file associated with this blender export.

Now I'm a noob, and I don't understand blender to it's slightest, but is there a way I can get the associated texture.png with the OBJ that I export at the same time?

$\endgroup$

1 Answer 1

3
$\begingroup$

The OBJ consists of two parts:

  1. .obj file with the geometry etc.
  2. .mtl the material library with the associated textures

when you export from blender, make sure you check the "write materials" checkbox. (then you get the .mtl file)

The other thing that is relatively annoying with blender is that it exports absolute paths to the textures. Some applications expect a relative path though. You can open your mtl file in a text editor (e.g. Sublime Text) and change the paths manually.

hope that helps.

edit: the obj format is relatively easy (so is the mtl) you can basically write/ manipulate your materials in the text editor (add/remove textures, change or add values)

$\endgroup$
2
  • 1
    $\begingroup$ The obj exporter supports relative paths. Check the export dialogue options at the bottom left side of the file browser screen. $\endgroup$
    – TLousky
    Apr 27, 2016 at 8:56
  • $\begingroup$ it supports relative paths but it will not write them as relative paths? anyway the question is what neil's game engine expects as a filepath. Because mostly you only want the filename and no path: eg: --> map_Kd capsule0.jpg and not map_Kd /path/to/folder/capsule0.jpg Actually I updated the obj exporter some time ago to be able to export all asociated textures to an output folder and write the coherent filepaths.. i might push/publish this change sometime $\endgroup$ Apr 29, 2016 at 12:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .