fwiw,
Some of the issues with merging HDR pixels have been hashed out in Nuke for a 
while, so a peek at its Merge node may be helpful:

For example 'screen' in Nuke is implemented to avoid the 1-A negative problem:
    if (A >0 && A<1 && B>0 && B<1) C = A+B - A*B
    else if (A > B) C = A
    else C = B

It also has the operation named 'hypot'(hypotenuse) or 'diagonal' which works 
pretty well for HDR pixels:
    C = sqrt(A*A + B*B)

And lastly 'geometric':
    if (A>0 && B>0) C = 2*A*B / (A+B)
    else C = 0

-jonathan

On Jul 13, 2012, at 9:37 AM, Jeremy Selan wrote:

> Yup.
> 
> screen =  A+B-AB, where AB term represents the if intersection of the
> subpixel geometry.
> 
> But in the case where you have two mattes where you know the
> correlation == -1, (which denotes no overlap in the subpixel
> geometry), adding mattes reduces to a simple A+B.  An example of no
> overlap in the subpixel geometry would be the alpha rasterization of
> two adjacent triangles in a mesh.
> 
> So to summarize, if the subpixel geometry has a correlation of 0, the
> math for combining alphas is A+B-AB.  If the correlation is -1, the
> math is A+B.  And for perfectly correlated subpixel geometry?  Sounds
> like a good white-board project for this weekend... Surely there's
> some paper from 1985 that has worked this all out? :)
> 
> -- Jeremy
> 
> On Thu, Jul 12, 2012 at 9:05 PM, Troy Sobotka <[email protected]> wrote:
>> And the inevitable question: What is the canonical compositing formula
>> for correlated then? Simple add?
>> 
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to