Missing .mtl files from 3D models

Hi all,

I am quite new to the Sketchfab community and it seems quite interesting. Recently I found out that it is possible to download quite a few 3D models from the Malopolska Virtual Museums scans which would be interesting for my work. However, once I download a model I notice that while the textures are provided usually there is not any .mtl files to connect to the textures. Thus, if I try to load it in Meshlab/Cloudcompare I get the 3D model textureless.

Therefore, I wanted to ask whether this is common and if yes then how are the textures connected to the mesh model.

Thanks.

Try downloading the gltf format, it should contain the mappings and Meshlab can import that format too iirc.

1 Like

This is not specific to meshlab, but may help since it illustrates that the model you downloaded just needs some finessing to get the texture to display in the software you are using. Am sorry I havnt used Meshlab in a few years so have forgotten how to do this there.

So the .mtl files are not really needed unless you want the diffuse(albedo), transparency and other shader data… which you wouldnt get from a 3d scan anyway. The texture coordinates / uv data will be stored in the .obj itself.

heres an example from Malopolska’s account

I downloaded this scan. Like you said it comes with just the obj and the textures.
image

and sure enough when you import it into a program like Blender, all you see is a default albedo grey…

What you need to do is tell your program to use the texture map for the diffuse/albedo slot.
In blender you do this by first adding a material…


then set the base material to an image texture

and now you have a slot you can load the texture into

just navigate to the folder with the image file and load it here


in this case Malopolska has provided both a low resolution as well as a high resolution(I think 4k) file, use whichever one you need.

once loaded… you wont see any change on the model in blender…


because we are not in the right viewport mode… so switch that to one of the last two modes

and voila!!

3 Likes

Thanks for the response. Unfortunately, this didn’t work either :frowning:.

@chaitanyak thanks for the elaboration. The point is though to avoid all this manual work. For example my plan is to download more of the Maloposka models and use them for my project. This sums up to a couple of hundred files and from what I’ve seen all of them come with a similar format.

Actually, I am using Meshlab because in my field is the easiest (and fastest) way to visualize something just to check whether there is something wrong or not. Later the idea would be to use some scripting based on Open3D, Trimesh, Vedo, etc… in order to process these files. Possibly I could use Blender python to do the pipeline that you are suggesting I guess but again it is an extra effort which shouldn’t be needed. It is a pity that there is no a direct way to map the corresponding texture to the 3D model and they do not provide the .mtl files.

1 Like

If I open the downloaded gltf all the texture assignments are there from the beginning (see in Blender):

I know that at least Trimesh can work with .gltf files, so maybe look into that? :crossed_fingers:

3 Likes

I see, indeed it works. It seems that it is a Meshlab issue since its .gltf importer is not fully supporting materials yet. Other libs though, e.g. Trimesh, Open3D, vedo seem to be able to load it without a problem.

Thanks.

1 Like