W3C home > Mailing lists > Public > public-fx@w3.org > July to September 2016

Re: [css-transforms] CSS3D breaks with opacity flattening

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sun, 18 Sep 2016 23:27:36 -0700
Message-ID: <CAAWBYDAx2LH2ZH25EaFotXeVtx6qYyUNB-nMf58am9Hhkd2XUw@mail.gmail.com>
To: Matt Woodrow <mwoodrow@mozilla.com>
Cc: Rik Cabanier <cabanier@gmail.com>, "/#!/JoePea" <trusktr@gmail.com>, Chris Harrelson <chrishtr@google.com>, Simon Fraser <simon.fraser@apple.com>, "public-fx@w3.org" <public-fx@w3.org>
On Sun, Sep 18, 2016 at 3:38 PM, Matt Woodrow <mwoodrow@mozilla.com> wrote:
> Can we instead solve this by applying the opacity to the group in the final
> coordinate space (at the root of the 3d context) rather than at the local
> coordinate space where the opacity is set?

No, as I explained in more detail in the GitHub thread I linked
<https://github.com/w3c/svgwg/issues/264#issuecomment-246750601>, this
is a logical consequence of 'opacity' and other filter-type effects
being "group effects".  If you want the effect to only apply to the
leaves, you can do that yourself by specifying it on the leaves, but
it has a visibly different effect than doing it "as a group".

> Obviously this would prevent depth sorting occurring between elements inside
> and outside of 'b', and we need to figure out how to depth sort 'b' itself
> (given that it is an atomic entry for sorting, but isn't a 2d plane), but
> those seem solvable.

That's actually the core problem preventing this from working; it's
not a detail we can just paper over later.

> I think the logical concept of wanting to apply group opacity to a set of
> elements (an 'object') before positioning that object into the higher level
> 3d scene is a reasonable one, and we should try support it if possible.

It is, unfortunately, logically impossible to do so.  The best that
can be achieved is an extreme level of hack, where you apply opacity
to the individual children, and then apply clip masks to the "further
back" elements that *simulates* the effect of being occluded by the
elements in the front.

Received on Monday, 19 September 2016 06:28:30 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:49:57 UTC