W3C home > Mailing lists > Public > public-fx@w3.org > January to March 2011

Re: Filter Templates

From: Rik Cabanier <cabanier@gmail.com>
Date: Thu, 24 Feb 2011 16:21:04 -0800
Message-ID: <AANLkTim4WD1W30vhASfOk5y77DWphQqXHXcYjTSrJvCW@mail.gmail.com>
To: Alex Danilo <alex@abbra.com>
Cc: Anthony Grasso <Anthony.Grasso@cisra.canon.com.au>, Dean Jackson <dino@apple.com>, Alistair MacDonald <al@bocoup.com>, Rik Cabanier <cabanier@adobe.com>, Cameron McCormack <cam@mcc.id.au>, Brad Kemper <brad.kemper@gmail.com>, www-style list <www-style@w3.org>, "public-fx@w3.org" <public-fx@w3.org>
Hi Alex,

The 'blend: layer' makes it so that only the graphic of group A are used
when the multiply blend on B is calculated.

Rik

On Thu, Feb 24, 2011 at 4:13 PM, Alex Danilo <alex@abbra.com> wrote:

> Hi Rick,
>
>        Yes, that's correct. In SVG as specified, it could be
> <g comp-op="multiply">...</g> or use inline style as you wrote
> or applied to individual objects, etc. Although, there's no real
> need for 'blend:layer' in your example, but the overall idea is
> right.
>
> Alex
>
> --Original Message--:
> >
> >
> >Hi Alex,
> >
> >
> >
> >
> >to make sure I'm not confused.
> >
> >
> >This is a filter:
> >
> ><svg version="1.1" xmlns="http://www.w3.org/2000/svg">
> > <defs>
> >   <filter id="srcLoadedOverlay">
> >     <feImage xlink:href="url(#canvas0)" result="img1" />
> >     <feImage xlink:href="url(#canvas1)" result="img2" />
> >     <feImage xlink:href="url(#canvas2)" result="img3" />
> >     <feBlend in="img1" in2="img2" result="blend1" mode="multiply" />
> >     <feBlend in="blend1" in2="img3" mode="lighten" />
> >   </filter>
> > </defs>
> ></svg>
> >
> >and this would be a property:
> >
> ><html>
> >
> >...
> >
> ><body>
> >
> >.... <- backdrop
> >
> ><div style="blend: layer;"> <- group A
> >
> >  ... <- text, images, etc
> >
> >  <div style="blend: multiply;"> <- group B
> >
> >    .. <- text, images, etc
> >
> >  </div>
> >
> ></div>
> >
> >Rik
> >
> >On Thu, Feb 24, 2011 at 3:53 PM, Alex Danilo <alex@abbra.com> wrote:
> >
> >Hi Anthony and all,
> >
> >--Original Message--:
> >>Just adding to what Alex said (see below)...
> >>
> >>
> >>>-----Original Message-----
> >
> >>><snip/>
> >>>
> >>>Perhaps that should serve as something to look at. This was researched
> >>>extensively at the time, and a property works far better than the SVG
> >>>filter mechanism when combining a lot of objects for blending.
> >>>
> >>
> >>This is because the background is included twice when using filters to
> perform compositing. This leads to incorrect results - the output tends to
> be darker than expected.
> >
> >Ignoring side-effects, one of the main advantages of a property
> >over a filter is no need for any sort of intermediate bitmap.
> >
> >The object being blended can be rasterized and alpha blended
> >with the correct blend mode directly to the canvas. So the
> >performance is significantly higher, especially if you are
> >trying to composite lots of graphics on top of live HD video
> >where memory bandwidth actually matters.
> >
> >Alex
> >
> >
> >
> >
> >
>
>
Received on Monday, 28 February 2011 15:17:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 28 February 2011 15:22:20 GMT