Message Boards Message Boards

Import OBJ files along with MTL and JPG?



I have an application that exports 3D models in OBJ format. The app emits .OBJ, .MTL and .JPG together for a given 3D model. I understand that the corresponding .MTL and .JPG files contain texture/color information of the model, and hence all the 3 files are to be loaded/imported together in another application that needs to reconstruct that model.

Mathematica allows me to import the OBJ file, but when I do that, I do not see the color information of the original model. It implies that MM loads only the OBJ file and not the other two files (MTL and JPG) even though they are located in the same directory. So the question is how do I load/import the complete information available in the three file set - OBJ, MTL and JPG?

Should I zip them together and load that ZIP file into MM, or import each of these files separately into MM and combine them using some function?

Regards, Rangarajan

1 year ago

Yes, zip them together and load that ZIP file into MM.The problem is with the material file which specifies material properties. If you open it in a text editor like notepad and change the line (or completely delete line), save the file and then re-import the obj, the texture will be visible. I had a similar problem. I couldn't import jpg file:

4 months ago

Group Abstract Group Abstract