Page MenuHome

UV seams visible at distance with texpaint even with 8 px bleed & 0.1 filter size
Closed, ArchivedPublic


System Information
Win7 64bit GTX 560ti
Win8 64bit GTX 980

Blender Version
Broken: 2.74.5 05c4c24

Short description of error
Today 1 beginner blenderhead brought the problem to my attention.
This file is extreme case where every edge is marked with seam. (lazy UV-ing)
This bug is very old, noticed it in 2.67 even.

In texpaint, with bleed of 8 px, UV seams appear as white lines with distance (camera to seams).
Visible in viewport (perspective, ortho) and in BI (perspective, ortho).
note: UV islands have enough gaps.

image sampling > Filter size (0.1) didn't help with more distance.

Exact steps for others to reproduce the error

  1. See flickering white lines on viewport.
  2. Add more objects with array mod.
  3. Then render.
  4. You'll see seams with distance.

Only when you paint the whole texture in 1 color the seam will disappear.



Event Timeline

WK Bong (lightbwk) raised the priority of this task from to Needs Triage by Developer.
WK Bong (lightbwk) updated the task description. (Show Details)
WK Bong (lightbwk) added a project: BF Blender.
WK Bong (lightbwk) set Type to Bug.

This is a classic problem with UV atlases and filtering in renderers.

In Blender Internal you can avoid the white lines by disabling mip maps and setting the filter size low enough. You then get aliasing instead though, and can't get rid of it because Blender Internal will only sample the texture once per pixel.

In Cycles such aliasing is solved by using more AA samples which will sample the texture multiple times per pixel, but that's slower to render. As far as I know that's the only solution to both avoid the bleeding and aliasing problems, so Blender Internal would need to get some way to sample textures multiple times per pixel to solve this.

I found a temporary fix for this on BI.
Turn ON transparency on Material & Alpha influence on texture.
(something to investigate there)

But still, it looks pretty bad on viewport & BGE.
Since we are going to have better GLSL renderer, I think we should look into solving this properly.

Brecht Van Lommel (brecht) lowered the priority of this task from Needs Triage by Developer to Normal.May 17 2015, 2:38 PM

I don't think enabling alpha really solves the problem. In the attached .blend file the space between the UV islands has alpha 0, and enabling alpha makes it black, which in this test file happens to be the same color as the UV islands themselves. But if the islands have a different color the issue shows up again.

If you want to solve this fully for GLSL, I guess you should look into limiting the mipmap levels to a certain number (e.g. 3 for pixel bleed 8). Then you get some aliasing which you can solve with multisample if necessary. Although I would expect the solution typically used in games to be just bleeding more than 8 pixels.

More renders of the case.

all rendered in BI

Sergey Sharybin (sergey) closed this task as Archived.May 26 2015, 12:03 PM
Sergey Sharybin (sergey) claimed this task.

Disabled alpha is indeed just a co-incident because your texture is black.

In Cycles we only have mipmaps only when using OSL backend, so this issue is not such a trouble there. And surely we can improve BI to support maximum mipmap level or to do more AA samples, but this is more a TODO item.

So thanks for the report, but archiving it now. Possible workarounds @Brecht Van Lommel (brecht) already mentioned here.

@Sergey Sharybin (sergey)

"surely we can improve BI to support maximum mipmap level or to do more AA samples"

How that works? I'm curious.