Custom TextureAtlas filtering problem


I have problems using a texture atlas.

I’m creating a custom “block” mesh with differently textured block faces. This is why I can’t think of how to use the jME built in TextureAtlas class.

With my own texture atlas I get problems at the edge of the single tiles. As I thought and later read in this forum this might be caused by the graphicscard doing interpolation between the adjacent texture tiles.

Can anyone explain a workaround to me or a way to tell the graphics card not to interpolate?

You could disable mipmaps or make the textures on the atlas have a border so others don’t mix in (I think blender has an option for that on export).

1 Like

Mhh… This did not work:

[java]atlas = new Texture2D(img);

TextureKey key = new TextureKey(“TerrainTexture”, false);



To clarify: With border you mean just repeating the outer pixels?

I’m generating the atlas at runtime to allow for easier customization from modders so I can’t use blender for that^^

With the borders it works :slight_smile:

Wrote a script that glues the seamless tiles together in a way that every texture is x pixel greater in each direction and adjusted the coordinates that only the “central” image is used. Thanks @normen for pointing out that this is a suitable solution.