Fade colors

Hi, I’m loading .obj model that I have exported from Sketchup. Color seem to always appear very different in JME. Here is an exemple of what it should like:





and what is rendered:





The yellow part is not a texture. It is a color. I don’t know if it can change the result but everything in my virtual environnement do not have the right color. This is why I think that my problem come from the lighting. I haven’t really change anything here is the code of the only light in my virtual environnement:



       light = new DirectionalLight();
       light.setDiffuse(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));
       light.setAmbient(new ColorRGBA(0.5f, 0.5f, 0.5f, 1.0f));
       light.setDirection(new Vector3f(1,-1,-50));
       light.setEnabled(true);
      

       lightState = this.getRenderer().createLightState();
       lightState.setEnabled(true);
       lightState.attach(light);
       rootNode.setRenderState(lightState);



Maybe my question will seem somehow stupid but forget me for I am only a JME beginner. Also, please do not blame me for my english as I'm french (but you can't tell me my mistake as I want to improve myself).

if the yellow thing are geometry colors, they wont show up if you use lighting by default.



The MaterialState has a ColorMaterial enum, which is used to decide what to do which Geometry Colors. (None is default)

Try:


materialState.setColorMaterial(ColorMaterial .AmbientAndDiffuse);