'How to read a .mtl model file into MATLAB and visualise it?

Does anyone know how to read a .mtl 3D model file into MATLAB and visualise it? The .mtl file looks like following

newmtl body
Ns 51.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000 
illum 2
Ka 1.0000 1.0000 1.0000
Kd 1.0000 1.0000 1.0000
Ks 0.5400 0.5400 0.5400
Ke 0.0000 0.0000 0.0000
map_Ka body_diff.jpg
map_Kd body_diff.jpg

I tried using MTL_parser.m from https://uk.mathworks.com/matlabcentral/fileexchange/39073-landsat-mss-tm-etm-metadata-mtl-parser?s_tid=srchtitle

Thanks

Image for .mtl 3D model file



Solution 1:[1]

Maybe you want to refer to this function here: https://au.mathworks.com/matlabcentral/fileexchange/27982-wavefront-obj-toolbox

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Naif Alsalem