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.
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.