[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

Markering_032

Inside JME with Ambient Light
Markering_033

https://wiki.jmonkeyengine.org/jme3/intermediate/multi-media_asset_pipeline.html#must-i-convert-to-j3o-yes

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
https://wiki.jmonkeyengine.org/jme3/advanced/light_and_shadow.html#directionallight

and adjust ambient like so,

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

Hi.

This is when I add in point light.
Markering_035

And now I add in ambient light.
Markering_036

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.

https://wiki.jmonkeyengine.org/jme3/advanced/light_and_shadow.html#ambientlight

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.