Hi,
I have a model in .obj format, with a corresponding mtl file which specifies the textures/materials.
The problem is: when I load it though MG’s pipeline, the model is rendered full black as if the mtl was ignored.
And when I run through all meshes in my modelprocessor, it says it cannot find any textures.
Is there a tip to load textures on these sort of models ? (and without converting it to fbx, as i have a lot of models ~50)
I don’t know what support AssImp has, if any, for the .mtl files. You may need to look at extending the ModelImporter.
I just tested it with the default Sponza model (Crytek Sponza, it’s an .obj) and it loads the textures -> the models look correctly textured when simply using model.draw(). They are stored in the model -> mesh -> meshEffect -> DiffuseTexture for me.
I think the models being black comes from something else. Wasn’t there a problem with the basic monogame shader if some lighting option was activated? I think i remember seeing something like this.
But if you are sure the materials aren’t loaded that is probably not it.
Using Monogame 3.6.187
Thanks. Im using the latest develop.
I started to get my obj importer from xna into MG, but monogame does not seem to have meshbuilder implemented from what I saw in the open issues.
So, i came back to my current engine’s state. After some investigation I have realized the problem happens only between my pipeline loading the model and the creation of the xnb file, only with specific chars in the name of the file.
So it probably doesn’t come from assimp nor monogame.