W3C home > Mailing lists > Public > www-svg@w3.org > July 2012

Re: Compositing math in SVG

From: Rik Cabanier <cabanier@gmail.com>
Date: Sun, 15 Jul 2012 19:22:31 -0700
Message-ID: <CAGN7qDCR-bzYgUh_+Y9Me=p9337L2CMR67cUEOnQkxCa8Ujfkg@mail.gmail.com>
To: Kai-Uwe Behrmann <ku.b@gmx.de>
Cc: Calculemus <calculemus1988@gmail.com>, www-svg@w3.org
On Sat, Jul 14, 2012 at 1:14 AM, Kai-Uwe Behrmann <ku.b@gmx.de> wrote:

> Rik Cabanier <cabanier@gmail.com> schrieb:
>
> >On Fri, Jul 13, 2012 at 10:36 AM, Calculemus
> ><calculemus1988@gmail.com>wrote:
> >
> >> About HDR, the problem is they can take values bigger than 1.
> >> Let's say I have two HDR images with values in range 0-4.
> >> Do I first map the range 0-4 to 0-1, do the blend math, and go
> >> back to 0-4? Do I just do the math on the range 0-4 and
> >> then clamp?
> >>
>
> Clamping should always be the last step to preserve the HDR information
> as long as possible during processing. HDR highlights behave other than
> flat LDR white while compositing.
>

I will ask around at Adobe. I know that our static art application such as
Illustrator and Photoshop generally clip after blending but I have heard
that it might not be the case in the video editing world (ie After Effects
might not do this.)


>
> >When you blending 2 images, you need to make sure that they are in the
> >same
> >colorspace (aka the blending colorspace).
> >If they are, I think you can just apply the blending formula's to the
> >raw
> >values. (1 in the blending formulas represents the maximum value of the
> >your colorspace).
> >If they are not, or the colorspace has no maximum/minimum values, you
> >will
> >need to convert to a wide gamut colorspace, blend in that and then
> >convert
> >back.
>
> You can of course us a logarythmic function or a tone mapping op, which
> looks much better than per channel clipping. The later one easily causes
> not so nice colour casts.
>
>
If your colorspace is wide enough there should not be any clipping. Make
sure it is a wide gamut RGB if you want the same blending.
Blending in CMYK or Lab looks very different for the same blend mode.
Received on Monday, 16 July 2012 02:22:59 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:51 GMT