request: additive alpha rendering mode

Bug #1697105 reported by Pétery Tamás on 2017-06-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Undecided
Unassigned

Bug Description

For the anti-aliasing rendering gap and similar issues I'd like to request an additive alpha rendering mode.

Something that would work similarly to that filter:
https://openclipart.org/detail/250219/compositeadd
or
https://openclipart.org/detail/262016/compositing-test-with-filtering-2

with the exception that opaque objects above eachother should be rendered with their original fills.

original idea represented here:
http://www.inkscapeforum.com/viewtopic.php?f=5&t=32501#p99116

So what would it be all about?
Thinking about a rendered pixel's opacity, the used method now is to see through every transparent layer above eachother.
The additive alpha rendering mode would function sort of a box that the layers fill up from the top, and once you reach the fill size -full alpha- the rest is disregarded.
For example if there are 4 colours above each, blue, red, green, yellow in that order, blue on top,
with each having 40% opacity,
40% of blue, 40% of red and 20% of green would add up to a fully opaque pixel, without any of the yellow or the background showing through.

This kind of approach would also be beneficial with all the "I want to recreate the exact same looking image but without the background showing through" kind of requests.

Pétery Tamás (lazur) wrote :

Just today we had a conversation at the #irc and maybe this description of the problem is not getting through?

Ended up making screen captures of the "gap issue" problem:

introducing the problem:
https://www.youtube.com/watch?v=5WRHzL8OXx4&feature=youtu.be

showing an approximating model of what's going on:
https://www.youtube.com/watch?v=unqeQupHt8M&feature=youtu.be

making a simple additive alpha compositing filter:
https://www.youtube.com/watch?v=CbHww4QJ4RM&feature=youtu.be

Pétery Tamás (lazur) wrote :

Update:
submitted an issue at github's w3c project
titled >>new composite-mode for globalCompositeOperation<<

https://github.com/w3c/fxtf-drafts/issues/262

Hi Lazur.

I see it. Thanks for share!

I dont know how to affet this lot of offsets to the designer worklow,
result seems bad positioned, maybe Im wrong.

About the gap, attached are a tiny SVG with a sample tiny filter that
fix it for full opaque items. Semi transparent ones do not be fixed and
maybe need your workflow.

Regards, Jabier.

On Sat, 2018-03-03 at 00:54 +0000, Pétery Tamás wrote:
> Just today we had a conversation at the #irc and maybe this
> description
> of the problem is not getting through?
>
> Ended up making screen captures of the "gap issue" problem:
>
> introducing the problem:
> https://www.youtube.com/watch?v=5WRHzL8OXx4&feature=youtu.be
>
> showing an approximating model of what's going on:
> https://www.youtube.com/watch?v=unqeQupHt8M&feature=youtu.be
>
> making a simple additive alpha compositing filter:
> https://www.youtube.com/watch?v=CbHww4QJ4RM&feature=youtu.be
>

Pétery Tamás (lazur) wrote :

Hi Jabiertxof, Thank's for taking a look!

The attached filter may look promising at first glance but actually it's not how it should work.
Taking the alpha channel and making its slope steeper results in more aliased edges -the built-in pixellise filter does the same by a fecolormatrix primitive.
=switching off anti-aliasing entirely in the document would render just "as fine".

However the introduced compositing method does work with anti-aliasing.

The offsetting in the video is due to rushing the screen capturing in real time.
And that the image filter primitive doesn't work too well in inkcape. The origin is messed up big time, everything is pulled in from the top left corner of the page and not from the objects bounding box corners.

Jabiertxof (jabiertxof) wrote :

I do a fix for image to allow X and Y to it, not sure is on 0.92.2 but in master yes

Jabiertxof (jabiertxof) wrote :

This is not perfect but better than previous mine.

Pétery Tamás (lazur) wrote :

That filter also just forces the anti-aliasing for a steeper, more "filled up" edge.
If applied on a single object only, the aliased edge sticks out more.

Pétery Tamás (lazur) wrote :

Also, this is the component transfer maxed out (how the pixellize filter should work instead of using fecolormatrix).

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.