support for loading models in Cinder has always been rather limited. I know it’s not an excuse, but since there are so many 3D file formats and proper support always requires elaborate data structures, you’d almost need a full-fledged engine backend to do it properly. That is why most users rely on third-party libraries like Assimp or glTF to load models, materials, textures and animations.
ObjLoader does not extract texture information from the
.mtl file. If you look at the source code, you’ll notice it ignores “map_Kd” and similar statements. It would be relatively easy to add a
std::string to the
Material class which contains the filename. You could then at least use
loader.getGroups() to retrieve all groups, followed by iterating over
group.mFaces to retrieve all faces, followed by
face.mMaterial to get to the material. But as you can see, you’d have to dive pretty deep into the data structure to get your list of textures. The OBJ file format isn’t exactly optimised for easy access. But then again, that goes for most 3D file formats. You’d also have to write your own shaders to actually use the textures, because Cinder’s stock shaders have no support for e.g. normal mapping, light mapping, bump mapping, parallax occlusion mapping, etc.
I’d recommend looking at the Cinder-Assimp block to load your models instead. I haven’t used it myself (I rely on a concoction of my own that is not ready for a public release), but it looks like it’s still being maintained. As a bonus, you get full support for animations and there is even some documentation If you’re feeling more adventurous, there is also the glTF block for Cinder. More blocks can be found via this awesome link.