Seam in Sphere

I am not sure why I have a seam in the sphere object used in the engine. Texture issue? Texture coordinates?

Sphere sphereMesh = new Sphere(100,100,1.0f);
sphereMesh.setTextureMode(Sphere.TextureMode.Projected);
earth = new Geometry(“Earth”, sphereMesh);

    //https://wiki.jmonkeyengine.org/docs/3.4/tutorials/concepts/rotate.html
    Quaternion roll90 = new Quaternion();
    roll90.fromAngleAxis(FastMath.PI*3/2, new Vector3f(1,0,0));
    earth.setLocalRotation(roll90);
    
    TangentBinormalGenerator.generate(earth);           // for lighting effect
    //Material matEarth = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    Material matEarth = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md");
    //Texture texEarth = assetManager.loadTexture("Textures/earth.png");
    matEarth.setTexture("DiffuseMap", assetManager.loadTexture("Textures/earth.png"));
    matEarth.setTexture("NormalMap", assetManager.loadTexture("Textures/earthNM.png"));
    matEarth.setBoolean("UseMaterialColors",true);
    matEarth.setColor("Diffuse",ColorRGBA.White);
    matEarth.setColor("Specular",ColorRGBA.White);
    matEarth.setFloat("Shininess", 16.0f);  // [0,128]
    //matEarth.setTexture("ColorMap", texEarth);
    earth.setMaterial(matEarth);

1 Like

If I drop the
jumpGateMaterial.setFloat(“Shininess”, 0.0f); // [0,128]
The seam disappears

Just from the image, my guess is that the normal map doesn’t wrap properly.

Either, the normal map image itself has a seam because of how it was generated or the texture needs to be loaded and have its wrap mode set… or a combination of the two.

1 Like

Thanks for the help. Tried a different texture map and normal map. Seam is gone. I see in the docs the wrap modes have been depreciated. I assume the built in normal mapping in JME is done without shaders? or OpenGL 2 support and not OpenGL 3

1 Like

Some of the wrap modes are deprecated. “Wrap modes” are not deprecated. The important ones are still there, ie: to wrap or not to wrap.

JME is just using the normal map provided. If that normal map has a seam then you will see a seam.

2 Likes