1

To my immense surprise, it seems impossible to find any other people having this problem -- I can use Jmonkey to import a mesh (in my case a gear), but it doesn't properly map the texture (which is supposed to look like wood), only texturing a few select faces shown:enter image description here

It still looks fine in Blender: enter image description here

To summarize, how do I get the texture to map over the ENTIRE gear, not just some triangles?

My code is written like this (pardon if it's a little messy, I've been trying to solve this for a while now):

Spatial gear = assetManager.loadModel("Models/cog_3.j3o");
    //Geometry geargeo=(Geometry)gear;
    //Node gearnode = (Node)gear;
    //Mesh gearmesh = (Mesh) gearnode;
    //Mesh gearmesh = (Geometry)(gearnode.getChildren().get(0));
    TangentBinormalGenerator.generate(gear);
    Material wood = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    Texture woodtex = assetManager.loadTexture("Textures/wood-texture.jpg");
    woodtex.setWrap(Texture.WrapMode.Repeat);
    wood.getAdditionalRenderState().setFaceCullMode(RenderState.FaceCullMode.Off);
    wood.setTexture("ColorMap", woodtex);
    wood.getAdditionalRenderState().setBlendMode(RenderState.BlendMode.Alpha);
    gear.setMaterial(wood);

    rootNode.attachChild(gear);

My mesh looks like this (you can see the uv seams): enter image description here

Uv looks like this: enter image description here I'm using blender 2.78a, and (as far as I know), the latest version of JME. Any help is appreciated greatly.

Liverwurst
  • 55
  • 5

0 Answers0