YOUR ACCOUNT

Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
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.

  Details E-Mail
Betis
The Blacksmith

Posts: 1207
Filters: 76
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.
  Details E-Mail
uberzev
not lyftzev

Posts: 1890
Filters: 36
Does this issue remain after saving/exporting the image or only occur in the preview?
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
Quote
Betis wrote:
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...


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.

Quote
uberzev wrote:
Does this issue remain after saving/exporting the image or only occur in the preview?


Yes, unfortunatly it does - see the explanation above.

  Details E-Mail
Betis
The Blacksmith

Posts: 1207
Filters: 76
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.
  Details E-Mail
Betis
The Blacksmith

Posts: 1207
Filters: 76
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.
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
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.
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
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).
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
I just recalled that this topic has been up before: Ronviers and Mike Blackney reported it too... and this guy is having trouble with something that seem like the same issue.
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
Quote
Skybase wrote:
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.


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.
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
Two reports more:

AA fringe? (color contamination from fully transparent areas)

And... oops smile:blush: one from me some years ago (sorry about that - I do think you forgot about it though smile:D)

Anti-alias fringe issue
  Details E-Mail
GMM
Moderator
Filter Forge, Inc
Posts: 3491
Quote
Sphinx. wrote:
I wish I could rename the topic and rewrite the intro


What would you like to rename the topic to? I can modify the first post as you wish.
UPD: Modified per Sphinx's request.
  Details E-Mail

Join Our Community!

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!

Create an Account

Online Users Last minute:

14 unregistered users.