Results 1 to 10 of 10

Thread: how to use MTL files?

  1. #1
    Registered User
    Join Date
    Aug 2011
    Location
    malaysia
    Posts
    34

    how to use MTL files?

    hi,
    i got a free obj mesh from the net and it came with a mtl file. when i load the obj in modeler i can't see any textures on the model.

    how do i get the mtl file applied to the model? sorry if this is a silly question.

    tnx.

  2. #2
    Just make sure the textures, .obj and .mtl are in the same folder and it will find everything. Then once loaded into modeler save as .lwo.


    -M
    I was thinking of the immortal words of Socrates - "I Drank What??"

  3. #3
    Registered User
    Join Date
    Aug 2011
    Location
    malaysia
    Posts
    34
    hi MSherak,
    yes, everything is in one folder on my desktop. i opened it and saved as lwo but still the textures does not show. am i doing something wrong?

  4. #4
    Super Member
    Join Date
    Aug 2006
    Location
    S
    Posts
    3,511
    ... textures in the same folder too. With the .lwo you'll have to load them manually.
    Last edited by meshpig; 04-29-2015 at 01:26 AM.

  5. #5
    Registered User
    Join Date
    Aug 2011
    Location
    malaysia
    Posts
    34
    meshpig,
    yes, everything in same folder...jpeg, mtl and obj files.

    if i load the textures manually, what does the mtl file do?

  6. #6
    Super Member
    Join Date
    Aug 2006
    Location
    S
    Posts
    3,511
    it's just the property file, so to speak for the materials. Hence "mtl"... like the "fbm" folder for FBX.

  7. #7
    Registered User
    Join Date
    Aug 2011
    Location
    malaysia
    Posts
    34
    meshpig,
    ok. tnx much.

  8. #8
    Quote Originally Posted by leoitch View Post
    meshpig,
    yes, everything in same folder...jpeg, mtl and obj files.

    if i load the textures manually, what does the mtl file do?
    The mtl file makes sure that the surface names come over and assigned to the polygons. You will still have to load the textures and assign manually them under the T button since OBJ importing does not do that for you automatically. So just load the textures, go under the T button and assign the UV and the texture to the surface.

    -M
    I was thinking of the immortal words of Socrates - "I Drank What??"

  9. #9
    Super Member JohnMarchant's Avatar
    Join Date
    Mar 2003
    Location
    Murcia, Spain
    Posts
    2,879
    If your having problems still. Mike Green had a good script to import .MTL files as well
    Dell XPS 15
    15.6-inch (3840 x 2160) 4K 282ppi IPS LCD
    Intel i7 7700HQ 2.8GHz
    Windows 10 64Bit
    NVidia GeForce GTX 1050 Ti
    1TB SDD
    32Gb Ram

    LightWave 2018.4

    Very nice Laptop

  10. #10
    you can simply open the MTL file in a code or text editor and if the object is not too complex, check if the texture paths and names are correct and actually correspond to what you have on disk. if the names are different, you can fix them in the text editor and resave the file. also make sure that the MTL file has exactly the same file name (but of course with MTL extension) as the OBJ file - usually programs save it as such. if the MTL file has a different name than specified in the OBJ it will be simply ignored by LW when loading the OBJ.

    also you can open the OBJ with a text editor and make sure that you find in one of the first lines the name of the MTL file which need to be loaded. search for the line beginning with

    Code:
     mtllib name_of_the_mtl_file.mtl
    where 'name_of_the_mtl_file' is obviously the name of this file.

    hope this helps, let us know ;-)

    cheers

    markus
    Last edited by 3dworks; 04-30-2015 at 04:54 PM.
    3dworks visual computing
    demo reel on vimeo
    instagram

    OSX 10.12.x, macpro 5.1, nvidia gtx 980 ti, LW2015.x / 2018.x, octane 3.x

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •