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

Re: Compositing math in SVG

From: Kai-Uwe Behrmann <ku.b@gmx.de>
Date: Sat, 14 Jul 2012 10:14:33 +0200
To: Rik Cabanier <cabanier@gmail.com>,Calculemus <calculemus1988@gmail.com>
CC: www-svg@w3.org
Message-ID: <979a5bd9-7b3c-4ccf-bcc8-9d6f7b5f1737@email.android.com>
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.

>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.

kind regards
Kai-Uwe
-- 
www.behrmann.name
Received on Saturday, 14 July 2012 08:11:28 GMT

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