I am quite new to blender. I have retopologized a high poly model with texture and then bake the texture (all in cycles) to the new model in blender. When I export the obj file the mtl file comes without the map_kd texture reference. I exported with the following settings: Selection only, appply modifiers, Include edges, Write normals, Include UVs, Write materials and Objects as OBJ Objects (aso tried with "Material groups").

The texture is applyed with the following nodes: Image Texture - Diffusse BSDF - Material Output.

Any tip about what am I doing wrong?



The problem is that the .obj exporter requires a material setup using the Principled Shader in order to write an .mtl with the map_Kd attribute. Unfortunately the documentation is still work in progress for Blender 2.8, that's why this wasn't previously documented.

The fix for your problem is to replace the Diffuse BSDF nodes with the Principled BSDF. Then you can simply plug your texture into the base color socket of the Principled BSDF, set Specular to zero and it should export as expected.

  • 1
    $\begingroup$ In addition to this, please see Duarte's elaborate answer. It covers pretty much every export question regarding missing materials/textures. $\endgroup$ – metaphor_set Aug 25 '19 at 14:24
  • $\begingroup$ In case you're writing add-ons, you want to replace creating ShaderNodeBsdfDiffuse nodes with ShaderNodeBsdfPrincipled. $\endgroup$ – Ray Jan 23 '20 at 0:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.