Only white colors are contained in .obj from blender

I created a model in blender with colors. When I loaded it up in jme3, it came out with just white colors!

I really don’t know a lot about models and materials. If I do showNormals on the model, it’s just rainbow colored.

Is it contained in the mtl file, and if so, how do I put it in the game?

Does jme3 even support the simple colors on blender?

vertex colors? yes if you enable it in the material. sorry i’m on a ipod. my phone won’t charge so i’m stuck with this. can’t even paste links with this tiny thing.

1 Like

@jayfella wait no I used diffuse colors on blender

if memory serves, .setBoolean(“VertexColors”, true); on the material.

take a look at hello materials. google “jmonkey hello materials”. i’m sorry. this ipod is a nightmare.

@jayfella reading it as we speak, thanks

1 Like


when you can get on a more advanced device, try to help me on this code.

sceneModel = assetManager.loadModel(“Models/monkey.obj”);

Material mat = new Material(assetManager, // Create new material and…
mat.setBoolean(“VertexColors”, true);

I really don’t understand how to make my original diffuse colors on my model, help?

Maybe you want to upload your .obj and .mtl so that we can check it out for you :slight_smile:

Did you try to read the material’s tutorial?. maybe you want to try with Common/MatDefs/Misc/Unshaded.j3md instead


Hold on, I have a question. When you export a .obj with diffuse colors, are the colors in the model, or is it in the .mtl with it? Because the model is all white and in the output it states that the .mtl for my model was not loaded, which could be the problem. :confused:

UV unwrap your model and create a new image for it.
Since you already have your materials assigned, in the render tab/Bake panel set Bake Mode to textures.
Bake and then save the image generated in the UV Editor.
Create a new material, name it the same name as the mesh and assign it to the model.
Create new texture and load the saved image(default is diffuse if you look at the influence panel in the texture tab)
Pack the image.
This is now your only material needed.
Export the model with ogre.
If you get errors try saving a copy (something you should already be working in anyway) of the file and cleaning up the buffers.

Forgot to mention, if using 3.1 - 3.2 SDK you should be using the script listed here,

Not the one in the SDK.