Problems with .obj (wavefront) without .mtl (textures)

launoklaunok Posts: 793

I have downloaded some .stl files from GrabCAD and converted them to .obj which works.  The only problem now is that there are no .mtl files with the conversion.  My software can't read/import .stl formats.  I believe the .mtl is for textures.

When importing the .obj into my software programs it search for .mtl which obviously I don't have.  How can I add .mtl files?  Or is it not possible?  Or how can I add textures to the model?  In Bryce 7 the model is solid grey and can't be ungrouped at all!

Any advice is appreciated.

Laura

Comments

  • cjmarshcjmarsh Posts: 62

    A .mtl file is basically just a simple text file with the file path to your texture and the assignment to each material group. If you haven't assigned any material groups it's just one for the whole model. These are often generated along with obj files on export from modeling packages so you could get Blender, assign your textures, then export to obj to have one generated.

  • prixatprixat Posts: 1,590

    I didn't think STL files had any textures. Can you start from another format and convert that?

  • launoklaunok Posts: 793

    Thanks to both of you for your prompt replies.  I will try and see what happens to other formats other than .stl

  • SixDsSixDs Posts: 2,384

    "I didn't think STL files had any textures"

    Prixat is correct. .stl format files contain only geometry since they are intended to be used for producing actual, physical 3D models such as those produced by 3D printers. As such, textures are immaterial. And, yes, I did just say that. blush

  • mjc1016mjc1016 Posts: 15,001

    Blender has an stl importer, so it can be imported, cleaned up (for some reason Booleans seem to be popular with stl items...), UV unwrapped and materials made all in Blender...then exported as an obj. 

    For 3D printing or other manufacturing processes, stl is perfect, but for other 3D usage, it's only 'half way' finished.

  • Roman_K2Roman_K2 Posts: 1,253
    cjmarsh said:

    A .mtl file is basically just a simple text file with the file path to your texture and the assignment to each material group...

    I just made an .MTL file when I saved something in .OBJ format in Hexagon. The text of the file says "newmtl def_surf_mat Kd 0.820000 0.830000 0.870000 Ks 0.150000 0.150000 0.150000 Ns 100.000000 d 1.000000 illum 2". Greek to me, but I've recently noticed the "def_surf_mat" in the Surfaces Pane in DS 4.8, so I suppose it's a start.

Sign In or Register to comment.