Hey all! 🙂
I'm just learning how to make levels in Blender and exporting it to Godot. I looking for a solution here and on the google but didn't find the answer. I tried to make this level at least for 5 times in Blender and I have no clue what's wrong. Always something wrong with this..

For all exports I use .gltf format. But my textures UV are little mess on the borders.. There are purple lines from texture which is outside the UV. I made the UV accurate. So I don't really know what is the problem. I know how to fix this in blender.
But how to do it in the Godot?

This is problem:

EDIT: Problem is not visible on the small review on the page, so click on it with right mouse button and open it in new tab and zoom it.

This is how I fixed this problem in blender, I set texture interpolation to closest.

And this is how I set the UI for individual faces (Fit here, its pixel perfect but there is still that purple line):

What I tried:

  • Remade this level multiple times with different style of UV mapping and meshes.
  • Reimport texture image with all settings combinations but no one works. :/
  • Make the UV smaller -> that fixed it but the texture is not seamless anymore when I destroy it like this.

I think make all textures separately will also avoid the problem. But that's longer process and I want to make it simply as possible and also I want know what is wrong here and how to avoid this for future.

Can someone help me and tell what's wrong here?
Thanks for all good people and ansers!

  • Yes, that's normal. Because of texture interpolation and mipmapping, you cannot really have borders around a tiling texture, especially not with bright colors or white. What you need to do is make sure that if you is a texture atlas (multiple textures in one image) that there is space of at least like 4 pixels between each tile. The neighboring 2 pixels should be the same color as the texture (you can just copy and stretch a portion, or draw manually a similar color). This is because where there is mipmapping, the engine created multiple versions of the texture at different smaller sizes. When it does this, the texture is scaled (resampled) so any border lines will bleed into the next pixels, it's not a UV problem. Or you can just keep each texture as a different image and not combine them, that will fix it too.

Yes, that's normal. Because of texture interpolation and mipmapping, you cannot really have borders around a tiling texture, especially not with bright colors or white. What you need to do is make sure that if you is a texture atlas (multiple textures in one image) that there is space of at least like 4 pixels between each tile. The neighboring 2 pixels should be the same color as the texture (you can just copy and stretch a portion, or draw manually a similar color). This is because where there is mipmapping, the engine created multiple versions of the texture at different smaller sizes. When it does this, the texture is scaled (resampled) so any border lines will bleed into the next pixels, it's not a UV problem. Or you can just keep each texture as a different image and not combine them, that will fix it too.

    cybereality

    Thanks for the answer. I set it as you said and yeah it fixed it.
    O copied two pixels and paste it to the offset and change the purple color to color from texture to match it better.
    Thanks again.