Message Boards Message Boards

Import OBJ files along with MTL and JPG?

Hi,

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

Posted 7 years 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:

https://www.cleverfiles.com/howto/what-is-jpg.html

POSTED BY: Teru Alt
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract