Seams between tiled textured cubes

Hi! The world in my game is built up by textured cubes that are tiled together. I have a big problem though. If it put two cubes together seams get visible from certain angles. I think this is due to mipmapping. So far I have tried these things:

  • Start uv-coordinates at 256.5 instead of 256, and so on… (my faces are 256x256)
  • Turned of mipmapping.
  • Set wrap mode to clamp.
  • Set filter mode to point filter.
  • Edge padded the texture atlas with
    first 4px, then 8px, then 16px, then 32px. But still
    bleeding occurs at certain angles.
    Also updated the uv-coordinates
    accordingly.
  • Changed my atlas to be of Power of 2
    instead, i.e. 1024x1024 instead of
    1024x768.
  • Set “Non Power of 2” in Unity to None
    so Unity doesn’t rescale my texture
    to nearest Power of 2.
  • Set texture format to Automatic
    Truecolor instead of Compressed.

With 32px edge padding it actually gets a lot better, but it still isn’t perfect, I guess I could go on and try even more padding, but my textures will get bigger and bigger.

At far distances I don’t think the seams is a problem, but I can see this occuring just about 5-7 units away from the player, if the player is looking down.

This is how I have edge padded my texture (the cyan lines not visible on real texture), the problem does not only occur when the faces has such extremes distinct difference in colors as this one. It also occurs when the faces have patterns.

This is how it looks in-game if I look down on the cubes. Between the two visible seams in this image there are 2*3 cubes tiled. As you can see, seams does not occur at every intersection of cubes.
75283-2016-08-02-12h23-48.png

I’ve been having this problem for a very long time now. Forever grateful if you can help me to solve this!

==== UPDATE ====

If I remove the textures the problem still persist, so the problem isn’t with the texture.

I also tried to change the prefab for my cube to use Unity’s default Cube-model instead of my own exported fbx-model, same problem.

Tried changing the Quality in quality settings, no setting make the seams disappear completely, although they appear differently depending on which Anti Aliasing setting I choose (2x, 4x…).

If I undock the Game tab and resize it, the seams appear differently depending on the size of the game window.

This is basically another question about: How do I stop texture bleeding?

You can’t, at least you cannot in editor view no matter what. There will always bleeding in editor or game view regardless from my experience. I spent a lot of time fixing the bleeding on the editor view, but when I compile the game and run it, there’s no bleeding.

I have these following setting on texture:

Mip Mapping: off
Filter Mode: Point

It might be the way Unity render graphic inside editor for speed, which made sense. You wouldn’t want Unity to render 4k scene at High Quality during editing. Everything would be moving at glacier speed.

Also, when I load texture “manually”, there’s no bleeding regardless of whatever setting I set in the Asset Folders since it doesn’t use those settings. It doesn’t bleed even if the texture file dimension is not in power of 2. I only test this on 2D tile maps, but 3D concept should apply. Texture Atlas is the same for 2D and 3D.

Basically:

            Texture2D item = new Texture2D(0, 0, TextureFormat.RGBA32, false);
            item.LoadImage(resource.bytes);
            item.filterMode = FilterMode.Point;

@unresolvedexternal Not 100 percent sure of this because i solved it a while back, i’m pretty sure however:

If you send mesh objects with different positions to the graphics card, unity’s precision is not high enough and the actual vertex positions in the graphics cards, the seams, will not be the same. hence you will see seams inside the graphics card.

If you put all your cubes on 0,0,0 and instead change their vertex positions to the positions you want, and send them all to the graphics card, they will not contain seams.

AFAIK i solved the issue after some time and puzzling, perhaps waster 50 hours to solve it, becaues i was told that my problem was inside the game engine not the graphics card.

So… keep all cubes on zero zero zero, edit their vertex positions, rewrite all the vertices to the new positions you want the cubes to be in, there should be no vertex differences sent to the graphics, because correct vertices, same object position, please confirm, ive done it with terrain and the seams completely vanished. if you send different object positions, same vertices, unity makes seam errors. the seam positions in the graphics card differ microscopically.

Its a weird error inside Unity that no one else than me knows about because i am a lame coder who never managed to code a game but i know so much about everything.