Page MenuHome

Compositor: Ensure keying node result is pre-multiplied
ClosedPublic

Authored by Sergey Sharybin (sergey) on Oct 14 2020, 4:04 PM.

Details

Summary

Historically the result of the keying node was violating alpha
pre-multiplication rules in Blender: it was simply overriding
the alpha channel of input.

This change makes it so keying node mixes alpha into the input,
which solves the following issues:

  • The result is properly pre-multiplied, no need in separate alpha-convert node anymore.
  • Allows to more easily stack keying nodes. This usecase was never really investigated, but since previously alpha is always overwritten it was never possible to easily stack nodes. Now it is at something to be tried.

Unfortunately, this breaks compatibility with existing files, where
alpha-convert node is to be manually removed.

From implementation side this is done as a dedicated operation since
there was no ready-to-use operation. Maybe in the future it might
be replaced with some sort of vector math node.

Diff Detail

Repository
rB Blender
Branch
keying_premul (branched from master)
Build Status
Buildable 10726
Build 10726: arc lint + arc unit