[SOLVED] Can I use the .mtl file from Blender when I export the .obj file?

When I export a model from Blender, I always use .obj file. But when I export the .obj file, I get also .mtl file too. I assume it’s the material and other things like mass, texture, material definition etc?

I there a way to import that to the assets?

Inside Blender


Inside JME with Ambient Light


But the .obj file was converted to .j3o file automatically. But still, the color is not the same. In SceneComposter, the model is white, in Blender, the model is blue.

Just out of curiosity, why don’t you use the blend file directly? Except you had bad experience with that approach…

Maybe the light is to strong and washing it out?

Whats the ambient set at?

Is not possible to use .blend file directly.

The ambient light was set on white, so I used point light, and now I can see the color blue.Markering_034

Try ambient with a directional light

and adjust ambient like so,

AmbientLight ambient = new AmbientLight(ColorRGBA.White.mult(.8f));


This is when I add in point light.

And now I add in ambient light.

I don’t use so much code. I focus to use java code when it’s needed.
I might have misunderstand the ambient light. I thought ambient light was a light who light up the whole scene, but it seams that ambient light only light a specific color?

Ambient works in conjunction with other light sources to adjust the overall brightness of the scene.


Lowering the intensity of the ambient with a directional in the scene would solve your washout problem I would venture to guess.

Thank you. Now I have much more understanding about when to use ambient light.

I see you are using the editor and just looked and ambient doesn’t seem to have the brightness parameter to adjust.

May be expected that it is added in code since it affects the scene globally. That’s the only reason I can see for the parameter not to be there.

I try to use the editor as much as possible and write less code. In my experience, graphic user interface is much better explained for others, than pure code.

Sure, I will use Java when it’s needed. But for scenes, I just import it, not create the scene with code.

You may want to investigate https://hub.jmonkeyengine.org/c/troubleshooting/JMB then.