Sphinx.
![]() |
Miscolored edges appears when subsampling/antialias is being applied. It seems like fully transparent subsamples contaminate the final sum that is used for the output sample.
It causes miscoloration near edges to transparent areas when the antialias kicks in (amongst other things) This bug is probably as old as FF. It is easily verified: set foreground to white and background to red, but fully transparent. Notice the red edges in the preview (also on the thumbnail) and notice there is no visible red color in the properties. |
|||||
Posted: November 29, 2015 2:22 pm | ||||||
Betis
![]() |
Is it a bug? I've noticed it too but I think it's just interpolating the colors at the same time as the alpha channel. It would be nice to not have this though too...
Roses are #FF0000
Violets are #0000FF All my base are belong to you. |
|||||
Posted: November 29, 2015 7:16 pm | ||||||
uberzev
![]() |
Does this issue remain after saving/exporting the image or only occur in the preview?
|
|||||
Posted: November 29, 2015 9:27 pm | ||||||
Sphinx.
![]() |
Bevel width is 0 (see settings on attached image), so there is no interpolation going on. The red fringe issue is only there when antialiasing is on, so I believe the problem is that the output of the sub sampling is a simple average of all the sub samples collected. This means that sub samples with alpha = 0 will pollute the output like seen here. The solution is very simple: just multiply the sub samples with their alpha before adding them up and divide the sum result by the sum of alpha and not sample count.
Yes, unfortunatly it does - see the explanation above. |
|||||
Posted: November 30, 2015 2:01 am | ||||||
Betis
![]() |
I meant interpolating for the AA. I guess the question is, would you want AA not to gather samples if it's perfectly sharp?
Here I made a lerp which essentially replicates what's happening (I imagine). It doesn't seem so much of a bug as just how things are done? Kinda thinking out loud here Roses are #FF0000
Violets are #0000FF All my base are belong to you. |
|||||
Posted: November 30, 2015 3:22 am | ||||||
Betis
![]() |
Sorry, understanding your posts more clearly now, I can see how this could be handled correctly. +1
Roses are #FF0000
Violets are #0000FF All my base are belong to you. |
|||||
Posted: November 30, 2015 3:37 am | ||||||
Skybase
![]() |
I thought this was just behavior and that if you need to get rid of those ugly lines, they can be premultiplied when imported to a different program.
This basically happens with some of the 3D programs I use as well so I usually handle with pre-multiply since that's just been my workflow. |
|||||
Posted: November 30, 2015 3:42 am | ||||||
Sphinx.
![]() |
Cool - yeah it is not really a question about interpolation - and actually in this case not alpha blending either (I wish I could rename the topic and rewrite the intro: in this case it is all about how the subsampling works).
Basically it sums up to this: the alpha channel is a property of a color as well as red, green and blue channels. The blue channel logically enough controls the amount of blue light, red and green likewise. But the alpha is different: it controls all of them - zero alpha means 100% transparent, i.e. NO red, green or blue light *at all*. That fact does not change just because you're doing subsampling or blurring or blending (and in some case even interpolation). |
|||||
Posted: November 30, 2015 3:57 am | ||||||
Sphinx.
![]() |
||||||
Posted: November 30, 2015 7:40 am | ||||||
Sphinx.
![]() |
No, you can't fix that simply by importing the image as if the alpha channel were premultiplied (it will just make the edges more jaggy in the alpha regions). The sum is already polluted with the transparent colors, and there is no way to get that out again. |
|||||
Posted: November 30, 2015 7:45 am | ||||||
Sphinx.
![]() |
Two reports more:
AA fringe? (color contamination from fully transparent areas) And... oops ![]() ![]() Anti-alias fringe issue |
|||||
Posted: November 30, 2015 7:58 am | ||||||
GMM
Moderator
Posts: 3491 |
What would you like to rename the topic to? I can modify the first post as you wish. UPD: Modified per Sphinx's request. |
|||||
Posted: December 1, 2015 7:36 am |
Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!
33,711 Registered Users
+18 new in 30 days!
153,533 Posts
+38 new in 30 days!
15,348 Topics
+73 new in year!
14 unregistered users.