I have written a parser for an .obj/.mtl files.

I was wondering: Is it possible to define a model without an mtl file?

If this is possible, what are the default material values?

I have spend a decent amount of time reading up on the formats of .obj and .mtl files. I have yet to see anything that talks about how to handle the case when an .obj does not reference an .mtl file.


You mean with Blender?

The Blender obj exporter let you "write materials" or not, i.e. create the .mtl file or not (by default yes, uncheck it before confirm exporting).

And you can import in Blender a .obj file even without a .mtl

But I don't know if I answered you.

| improve this answer | |
  • $\begingroup$ The answer I am looking for is not Blender specific. What I need to know is if it's possible to define a model in an .obj file (with Blender or manually or however) without the requirement of an mtl file. In reference to your answer, what happens in Blender if you export an .obj file and specify to not create the .mtl file? Is it possible to use that exported .obj file without an .mtl file? Does that .obj just not contain an "usemtl" tag? Thank you in advance $\endgroup$ – miss.serena Nov 14 '15 at 20:27
  • 1
    $\begingroup$ I can't speak for other programs, but I can export an .obj from a blender model without any .mtl, and then import that .obj in a new blender file, just fine. But I can also import in Blender an .obj file alone (no .mtl), created with other programs, without problems. Like this groups.csail.mit.edu/graphics/classes/6.837/F03/models/… or groups.csail.mit.edu/graphics/classes/6.837/F03/models/… $\endgroup$ – m.ardito Nov 14 '15 at 20:59
  • $\begingroup$ That is actually awesome information. That means that you don't have to reference a .mtl file. So there MUST be some sort of default texture or materials that describe the vertices appearance. Follow up question: What do these models look like in Blender when you display them? $\endgroup$ – miss.serena Nov 14 '15 at 21:14
  • $\begingroup$ In a "default" new blend they have the "default" grey Material applied. Quite basic. But it could depend on the file where you import them. $\endgroup$ – m.ardito Nov 14 '15 at 21:21
  • $\begingroup$ And that default could be Blender specific. Okay. I can look into this a bit more now knowing that it is a possibility. Thank you so much for your help. $\endgroup$ – miss.serena Nov 14 '15 at 21:25

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.