[SOLVED] Jme3 Beginner: No color in object imported

So I import a .obj from blender (which I just learned how to use) and I get the object displayed in Jme3 however it has a pink color (or white if I use “Common/MatDefs/Misc/Unshaded.j3md”);). How can I get the right colors that I displayed in Blender? Anything I should do from Blender side?

Question 2, (and this is Blender related) when I import an object, I noticed that I need to place it in (0,0,0) position in Blender to get it right in Jme3. Is there any other efficiency related modifications I need to do other than export only the selection?

Sorry in advance , I know this is really basic but I couldn’t find the answer on Google and this forum.

Code used:

[java]some_spatial = assetManager.loadModel("/Models/spatial_ver2.obj");

Material mat_default = new Material(

assetManager, “Common/MatDefs/Misc/ShowNormals.j3md”);

some_spatial.setMaterial(mat_default);

some_spatial.setLocalTranslation(0,0,0);

rootNode.attachChild(some_spatial);[/java]

in Blender:

1 create a meterial to the object you want to export.

2 export with with “Normals” check-box.



About Material:

Do not assign a new material to you object, blenderloader can load material from the blend file .

Or try assetManager.loadAsset if blender material is not loaded.

Or use Lighting.j3md.

I have 2 materials created in Blender, I am checking the Normals check-box and still the material is not loaded because if I don’t assign materials or use Lighting.j3md I cannot see the object.

have you added a directional light when you assigned the Lighting.j3md?

I just did and now I see it in black although the light is directly pointing at it (pointing at 0,0,0) if I set it to (-2,-2,-2) I see it WHITE again (color of the sun is white)… still I can’t see the original colors

Ok answer is from another post / different problem I had… my model was not actually as simple as I thought… it had 2 meshes and 2 materials meaning that it should have been read as a Node and not a Geometry… Fixed now.