Texture looks wrong

Hello, everyone!

I have this trouble with texture on the model: it looks wierd.

Here’s screenshot:

The model was created in blender, with correct UV-coordinates, then it was exported to Ogre-XML.

In blender it looks like this:

Here is the code of loading model and setting texture:


public void simpleInitApp() {

Spatial ground = assetManager.loadModel(“Scenes/ground/Cube.001.j3o”); // loading model

ground.setLocalTranslation(new Vector3f(12.680f,0.06511f,0.07265f)); //setting it to right position

Material mat =new Material (assetManager, “Common/MatDefs/Misc/Unshaded.j3md”); //creating material

mat.setTexture(“m_ColorMap”, assetManager.loadTexture(“Scenes/ground/ground.png”)); // setting texture

ground.setMaterial(mat); //setting material to model

ground.scale(0.185f,0.185f,0.185f); //scaling model


//I omit the code where I set directional lights


So, anyone knows what the problem is? I’ve already searched about same problems, but didn’t find anything helpful.

I’m a beginner, so don’t judge me strictly please :slight_smile:

P.S. Sorry for my english)

[java] mat.setTexture("ColorMap", assetManager.loadTexture(new TextureKey("Scenes/ground/ground.png", false))); // setting texture[/java]

Changing to the above I think that may help. 2 things to note:

  1. “ColorMap” not “m_ColorMap” … this won’t change anything here but “m_” is wrong;
  2. I find I need to not flip (or flip) textures by using TextureKey and false when using the ogre exporter. (Don’t forget to import TextureKey)
1 Like

Wow, thanks a lot! It really helped! I killed so much time on it, and it was so easy! Now it’s all right! Thanks! :smiley: