ModelViewer code doesn't recognize materials

Anonymous 9 years ago 0
This discussion was imported from CodePlex

pggarland wrote at 2013-02-08 04:43:

ModelImporter.Load, invoked from the ModelViewer source, doesn't seem to recognize material definitions. All models are either green (no material definition) or Yellow (there is a material definition that references a .MTL file, but the material info is ignored). Am I missing something, or is ModelViewer not meant to recognize different colored material in OBJ files?

objo wrote at 2013-02-10 16:16:

The Obj reader should support materials (diffuse, ambient, specular, textures and opacity). You should try to debug the import of the .mtl file. Set a breakpoint in the LoadMaterialLib method. Let us know if there is a bug in the code, and we will correct it.

pggarland wrote at 2013-02-12 04:09:

My bad. Stepping into the code, I saw that there were tabs in the materials file. Still working on lighting, but this problem is solved. Thanks!