Is it just me or is there something wrong with materials in ofxAssimpLoader.
I’m just trying to display some simple meshes with some colored materials. I’ve tried different file formats but no success. It 's just display dull gray. I’m doing nothing fancy:
setup:
model.loadModel(“test.dae”,true);
draw:
model.drawFaces();
But whatever I try I can’t get them to show their color.
material = model.getMaterialForMesh(0);
ofLogVerbose(ofToString(material.getDiffuseColor()));
ofLogVerbose(ofToString(material.getEmissiveColor()));
ofLogVerbose(ofToString(material.getAmbientColor()));
ofLogVerbose(ofToString(material.getSpecularColor()));
Nope although we might have. It’s just we’re working around multiple problems that I’m not keeping track currently.
Since we are using textures the problem sort of goes away. However with textures we’ve found trouble as well. We’re now just doing the draws by hand.
I could load the model with correct colors but some parts of the model were transparent (see through) :-/
I think we really should look into ofxAssimpLoader and try to find a permanent fix for this. I am sure the model loads correctly with the assimp library (outside OF).
Sorry I was wrong. That workaround fixed the most issues. I got the transparent-faces issue as I was drawing the 3D model on an FBO. That is again a totally different issue.