Wrong uv mapping

I imported the ogre xml model of a shotgun into jme und applied 3 differend textures to it, but the uv mapping is completely wrong. I exported it from 3ds max. heres the code for the materials:

public void assignMaterials()


Material mat0 = new Material(assetManager, “Common/MatDefs/Light/Lighting.j3md”);

mat0.setTexture(“m_DiffuseMap”, assetManager.loadTexture(“Textures/gun01/metal_01_512_diff.jpg”));

mat0.setFloat(“m_Shininess”, 10);

Material mat1 = new Material(assetManager, “Common/MatDefs/Light/Lighting.j3md”);

mat1.setTexture(“m_DiffuseMap”, assetManager.loadTexture(“Textures/gun01/wood_01_512_diff.jpg”));

mat1.setFloat(“m_Shininess”, 10);

Material mat2 = new Material(assetManager, “Common/MatDefs/Light/Lighting.j3md”);

mat2.setTexture(“m_DiffuseMap”, assetManager.loadTexture(“Textures/gun01/metal_02_512_diff.jpg”));

mat2.setFloat(“m_Shininess”, 10);




((Geometry) model.getChild(0)).setMaterial(mat0);

((Geometry) model.getChild(1)).setMaterial(mat1);

((Geometry) model.getChild(2)).setMaterial(mat2);


also some parts of the model disappear depending on the camera position. I tried different think but nothing worked.

Flip the texture.

I already read about flipping some texture but what is that supposed to mean? how can I do that?

I made a material and assigned a diffuse map and checked “flip” is still looks the same:


gawd I forgot to fucking set the wrapmode on repeat, now its correct.

still one part of the model disappears at a certain cam rotation.