How to open or use mtl. files

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

  • GordigGordig Posts: 9,914

    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?

  • lilweeplilweep Posts: 2,417

    johnbuckeridge said:

    but the mtl. files that come with them - which are pretty essential - I don't seem able to make use of.  

    theyre fairly useless.

    but if you insist,open them in a basic text editor 

  • lilweeplilweep Posts: 2,417
    edited April 2023

    johnbuckeridge said:

    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.  :)

    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.

    Post edited by lilweep on
  • AscaniaAscania Posts: 1,849

    johnbuckeridge said:

    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.  :)

    They are applied automatically when opening the .obj

  • lilweeplilweep Posts: 2,417

    Ascania said:

    johnbuckeridge said:

    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.  :)

    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. 

  • Ascania said:

    johnbuckeridge said:

    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.  :)

    They are applied automatically when opening the .obj

    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?  

  • lilweep said:

    Ascania said:

    johnbuckeridge said:

    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.  :)

    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. 

    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?

  • lilweeplilweep Posts: 2,417
    edited April 2023

    johnbuckeridge said:

     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

    Post edited by lilweep on
  • AscaniaAscania Posts: 1,849

    johnbuckeridge said:

    Ascania said:

    johnbuckeridge said:

    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.  :)

    They are applied automatically when opening the .obj

    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?  

    Or may other programs that can read .obj models.

  • Roman_K2Roman_K2 Posts: 1,232

    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.

  • GordigGordig Posts: 9,914

    Roman_K2 said:

    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.

  • Roman_K2Roman_K2 Posts: 1,232

    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"?

  • lilweeplilweep Posts: 2,417

    Roman_K2 said:

    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.

  • BejaymacBejaymac Posts: 1,886

    Roman_K2 said:

    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"?

    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. 

Sign In or Register to comment.