[SOLVED] Applying a texture to a model created in Blender

Hey guys,

I just began working with JME and Blender a few weaks ago, but i spent a lot of time on it especially on Blender.
So i wanted to import a minion which I designed into JME. The textures didn’t show up, simple reason, I had more than one texture and UV map.
I decided to begin with an easier task, with a cube generated in JME and the monkey had from Blender.
I created an unshaded material and set the texture with the assets loader using a simple picture.
On the cube it showed the picture on each side which is fine.
But on my monkey had it doesn’t show up, although I UV unwrapped the model.
I read the tutorials but can’t find my mistake. I hope someone can help me.
MyModel.blend

Here is my Code:

Material mat_default = new Material(assetManager,
            "Common/MatDefs/Misc/Unshaded.j3md");
    Texture tex = assetManager.loadTexture("Textures/Wanderung_ueber_den_aktuellen_Sternenhimmel.jpg");
    mat_default.setTexture("ColorMap", tex);
    
    Spatial brett = assetManager.loadModel("Models/TestMoneky.j3o"
            + "");       
    brett.setMaterial(mat_default);
    
    Geometry cube1Geo = new Geometry("My Textured Box", new Box(1f, 1f, 1f));
    cube1Geo.setLocalTranslation(new Vector3f(-3f, 1.1f, 0f));
    cube1Geo.setMaterial(mat_default);
               
    
    DirectionalLight sun = new DirectionalLight();
    sun.setDirection(new Vector3f(-0.1f, -0.7f, -1.0f).normalizeLocal());
    rootNode.addLight(sun);
    rootNode.attachChild(brett);
    rootNode.attachChild(cube1Geo);

On the cube it showed the picture on each side which is fine.
But on my monkey had it doesn’t show up, although I UV unwrapped the model.

I dont get it, did your cube shows or not ???
First line you said it shows ok, second you said it dont shows ?
Did you import the default blender cube ?
Are you using an compatible blender version ?

Nothing seems to be wrong with the monkey. A hopeful one, but have you tried
brett.scale(4); or 2, or 10, give a few goes

Then fly around with the flycam? I often have my models too small to see.

Thank you for your answers :grinning:

I created the cube using the jme with the simple geometry box.

I am using blender 2.75. Can you tell me where I can find wether this version is compatible or not?

This picture should clear all confusion I caused:

Interesting is that, the texture is showing on the eyes of the monkey or at least it looks like that.

PS: What I forgot to say: I am using the cycles renderer in blender and I imported the .blend model and converted it into and .j3o file.

Jmonkey doesnt support blender cycle material so…

This is true. But I would have thought importing the .blend would still import the UV map properly, and he created his own material, so I am not sure what is going on there.

Regardless that is the issue, since I exported the monkey head with blender to an .obj file, and using your code it works as expected in JME

Thank you guys for your help, now i can spent my time on learning more about jme/blender and I have no longer to think about this problem. I will stay away from cycles when I am designing a game model now.
Here is my final monkey head with eyes from my minion :wink:

How to mark this topic as solved?

Just put [SOLVED] in the title.