How to open or use mtl. files
johnbuckeridge
Posts: 284
in New Users
Hi everyone. A lot of the freebie models I come across on the web are in obj. + mtl. formats. I know how to use obj files, but the mtl. files that come with them - which are pretty essential - I don't seem able to make use of. A search on Google tells me lies! That Photoshop will open them, but it doesn't. What I'd like to do is convert them to either jpg or png files so I can use them. Any ideas? Or can you point me towards a tutorial? Many thanks. :)
Comments
MTL, as far as I understand it, is basically just a list of references to parts of geometry and image maps. MTL files are SUPPOSED to load with the OBJ, but DS doesn't seem to do it very reliably. Have you tried open an MTL in a text editor?
theyre fairly useless.
but if you insist,open them in a basic text editor
mtl files are not texture maps.
they (try to) direct the software how to assign different textures maps and shader values to surfaces of the obj. All of this can (and should) be done manually so .mtl is not necessary.
They are applied automatically when opening the .obj
only if they are in the same path as the .obj and only if you have 'read material library' checked on the import obj dialog box.
Thank you for your input, everyone, I've learned a few things here. Yes, Lilweep, I thought they were texture maps. Ascania, when you say they are applied when opening the obj - do you mean opening it/them in DAZ Studio?
Okay, so I've just checked that - 'read material library' seems to be checked by default on my set-up, but how would you if the mtl. files are/ are not in the same path?
Put them in the same folder.
Is it imperative you read the .mtl file? I said this before and I'll say it again, mtl file is not some fool proof way of applying shader settings in Daz Studio, and doing so will often mess up your shader settings or otherwise will not apply maps correctly or omit maps
You can just set up the surface settings manually, under Surfaces tab. Drag/drop the texture maps into the relevant the slots on the shader, takes 5 seconds for simple PBR shader set up
Or may other programs that can read .obj models.
I hope this isn't a doofus question but... what is the relationship (if any) between an .MTL file and a UV map, or UV mapping in general.
They're related only inasmuch as they both concern texturing. A UV map tells the program which polygons on your geometry should take which pixels of the texture map. An MTL file applies textures to corresponding surfaces on the OBJ, so as long as the OBJ is UV mapped (which it should be before export), there won't be any issue.
Thanks for entertaining my question. Okay, so if an object should be UV mapped at the source, or at the time of creation, why are there after-the-fact, "standalone" programs such as "UV Mapper"?
becuase the word you used 'should' doesnt mean it always is, and doesnt mean it is made perfectly and to the specifications of the user, so they may want to change it.
Because back in the day most modeling programs were crap at UV mapping, basic maps were about their limit, programs like UV Mapper and Lithium Unwrap allowed you to fine tune the UV coordinates of any mesh.