Hypot blending mode

Yesterday there was a discussion on Discord about hypot blending mode. It works better than Screen and Add for comping lights and reflections.

I vibe-coded a matchbox for batch but I think we need it everywhere in Flame. Please upvote the feature request: FI-03614

hypot.zip (2.1 KB)

I’m at the vet with a sick dog right now, but I’ll grab this matchbox and throw up a rig I made based on tony lyon’s Nuke gizmo to match blacks (that works best with hypot)

Hypotenuse function.

Instead of simply adding (A+BA+BA+B) or screening, it adds the energy of the two signals (like a vector length). It works well with floating/over-range values (>1).

Great for lights/reflections/glows: it can feel “punchy” without washing out as aggressively as Add/Screen.

You want to do this in linear color space

I was looking into other blend modes and found these two little gems. The second one is rather old but, so am I…

Link to the feature request for those who are lazy like me: Autodesk Feedback Community

This is the BlackMatch rig I had mentioned. Here’s the setup using Sinan’s hypot matchbox. I also included the plates used in the demo

Here’s a little video that explains stuff: https://www.youtube.com/watch?v=5BEvgE3pT9A

BlacksMatchHypot_ForLogik.zip (88.8 KB)

DemoRenders.zip (627.7 KB)

I love this!!

There seems to be a misunderstanding here.
The signal, as in the value of a (channel of) pixel in linear colour-spaces is proportional to the optical energy collected by photographic detector; or inversely, the output power of a picture element of a screen.
Physically, the base quantity would be the electromagnetic field, which for optical purposes, we can model though solely the electric field E=E(r, t), where r is the (three-dimensional) space-vector, and t is time. For planar waves of E (and superpositions of which) parallel to the detector of surface A, and shutter from t0 to t1, we measure the radiant energy Q itself the time- [t0, t1], and space A -integral over ½ε0E2.
If now E=E1+E2, we get the total radiant energy Q=Q1+Q2 (as if calculated for the individual electric fields), plus the amount from the mixed terms E1 E2. The latter is effectively the (positive or negative) degree of correlation, and over the time-integral will vanish for uncorrelated E1 and E2 .
Hence, for such fields, or sources/images/…, the addition of pixel values (in scene-linear spaces) is the physically correct blending operation.

The square-root of sum of squares (hypot) would be correct if we instead dealt in terms of amplitudes of (uncorrelated) electric fields, which in itself would bring a lot of other caveats with it, in addition to the innate ones - like hypot as the nonlinear operation it is, being dependent on the colour-space itself (mixing under different primaries would yield different absolute colours).
But for artistic purposes, naturally, it’s fair game.