What is the MTL file format?
.mtl is a material configuration file used by 3D modeling applications as a companion to the OBJ mesh format. Originally developed by Wavefront Technologies in the late 1980s, an .mtl file stores information about surface appearances - diffuse, ambient, and specular colors, shininess, opacity, and texture map references - for each named material in a scene.
Material definitions are grouped into blocks introduced by the newmtl <name> keyword, each followed by property statements such as Ka (ambient color), Kd (diffuse color), Ks (specular color), Ns (specular exponent), d or Tr (transparency/dissolve), and map_Kd (path to a diffuse texture image). .mtl files store data in plain text format, so any text editor can open them. While manually editing an .mtl file is possible, care must be taken to preserve the correct syntax, as errors may affect how material settings load in the host application.
An .obj mesh references its materials via the mtllib directive, pointing to one or more .mtl companions. Texture maps listed inside material blocks typically reference PNG or JPG images by relative path from the .mtl file's directory. Because of its plain-text, open structure, the format is widely supported across 3D tools including Blender and MeshLab.
Security & safety
RISK: LOWAn MTL file is plain text with no executable code, so it is safe to open and read. The only practical caveats: map_* lines point to external image files, so a misplaced or missing texture makes a model load grey (a data problem, not a security one); and a crafted texture path is, in theory, just a relative filename a 3D app will look for. No macro or script capability exists in the format. As always, get 3D models from reputable sources.
Format details
in a nutshellPrograms that open MTL files
Technical details
deep spec| Format type | Plain ASCII text; no binary structure or magic bytes |
| Companion format | Wavefront OBJ (.obj); an .obj file links its .mtl via the mtllib directive |
| Material block keyword | newmtl <name> - begins each named material definition within the file |
| Diffuse color | Kd r g b - RGB float values in the 0.0-1.0 range |
| Ambient color | Ka r g b - RGB float values in the 0.0-1.0 range |
| Specular color & exponent | Ks r g b for specular color; Ns 0-1000 for highlight size (shininess) |
| Transparency | d (dissolve): 1.0 = fully opaque, 0.0 = fully transparent; Tr = 1 − d (inverse convention) |
| Diffuse texture map | map_Kd <path> - references an external PNG, JPG, or BMP image file |
| Additional texture channels | map_Ks (specular map), map_Bump / bump (normal/bump map), map_d (opacity/dissolve map) |
| Illumination model | illum 0-10 - selects flat, Lambertian, Phong, reflective, ray-traced, or transparent shading |
| File identification | No binary magic bytes; identified by the newmtl keyword in plain text |
| MIME type | model/mtl |
| Texture path handling | Relative or absolute paths; relative paths resolve from the directory of the .mtl file |
| Multi-material support | A single .mtl file can define any number of named materials; one .obj may reference multiple .mtl files |
| Released | Late 1980s (alongside the Wavefront OBJ format) |
| Open standard | Yes · royalty-free |
| Specification | paulbourke.net |
MTL conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about MTL files.