Gaps Showing Between 2D Planes

I’ve made a test scene in blender using 2D planes. I’ve been following the wiki guide to importing models from Blender.

The scene loads without issue however, when I run the application there are thin gaps between the planes (horizontally not vertically) and after re-checking the dimensions and positioning of the 2D planes, I can’t work out why these gaps are appearing.

When viewed in Blender and in JME3 Scene Viewer, there are not gaps - they only appear when I run the application.

Can anyone clarify what I am doing wrong here please.

Screenshots below.

Viewed when run

Viewed in Blender

Viewed In JME3 Scene Explorer

And code…

public class Main extends SimpleApplication {

public static void main(String[] args) {
    Main app = new Main();
    app.start();
}

@Override
public void simpleInitApp() {
    
    Spatial level = assetManager.loadModel("Models/textured planes.j3o");
    rootNode.attachChild(level);
    
    // sunset light
    DirectionalLight dl = new DirectionalLight();
    dl.setDirection(new Vector3f(-0.1f,-0.7f,1).normalizeLocal());
    dl.setColor(new ColorRGBA(0.44f, 0.30f, 0.20f, 1.0f));
    rootNode.addLight(dl);

    // skylight
    dl = new DirectionalLight();
    dl.setDirection(new Vector3f(-0.6f,-1,-0.6f).normalizeLocal());
    dl.setColor(new ColorRGBA(0.10f, 0.22f, 0.44f, 1.0f));
    rootNode.addLight(dl);

    // white ambient light
    dl = new DirectionalLight();
    dl.setDirection(new Vector3f(1, -0.5f,-0.1f).normalizeLocal());
    dl.setColor(new ColorRGBA(0.80f, 0.70f, 0.80f, 1.0f));
    rootNode.addLight(dl);

}

@Override
public void simpleUpdate(float tpf) {
    //TODO: add update code
}

@Override
public void simpleRender(RenderManager rm) {
    //TODO: add render code
}

}

A side issue is how best to organise the scene graph?

I’ve been using empty nodes in Blender to create a Level, Room, Floor and Ceiling Spatials in JME3 after the blend file is converted into a j3o file. This seems to work fine as shown in the Scene Explorer window but I haven’t tried accessing the spatials using code yet. Should I be using Groups in Blender to create the scene graph hierarchy or can I continue using empty nodes in Blender?

Do your textures have a black border by any chance?

Have you attempted to remove duplicate vertices in Blender [Ctrl + W] I do believe. if each of your tiles on the floor are unjoined quads that would explain the break, or if you are using a texture atlas you should reduce the UI mapping for each quad by about one pixel so they don’t pick up any colors from the other images on the atlas.

Without messing with your mesh or textures it is hard to tell :smile:.

No they don’t have a black border.

The tiles that make up the floor and the wall are unjoined quads. I’ve done this on purpose as I am re-creating Tomb Raider One and that game was made out of unjoined quads. I’m not using a texture atlas but I plan to in the future so I will use your 1 pixel tip.

Whilst exploring the different lights that Blender offers and how they are translated when converted to a j3o file, I discovered that lighting the ‘room’ with a Blender Point light results in the gap/line/break disappearing!