AddMix

Function
This is similar to Over, except you have control over curves to help blend the edges together.

Example:

In this tree, we pull a key on the foreground with KeyLight. We then attach the foreground (bs - that, uh, stands for Blue Screen...) with the background tree. Looking at the Closeup illustrations, the first one shows the default result, a result identical to an Over node. We can see ringing problems both along the hair (a bright ring) and along the shoulder (a dark ring). Through adjustment of the curves, we dramatically reduce the ringing, giving a much cleaner composite.

Tree Over1
bs AddMix1
Closeup, default curves Closeup, modified curves
default curves
modified curves

Given that the curves can dramatically alter opacity of the foreground, you may be obliged (I picked that one up in France...) to make sure the interior of the matte really is 100% opaque through the use of additional masking, garbage mattes, etc.

 

Parameters
Type
Defaults
Function
clipMode
int
1
Toggles between the foreground (0) or the background resolution (1)
preMultiplied int 1 Tells Shake if the fg is premultiplied. This is the opposite of the standard Over. If it is on, the foreground curve does nothing.
fgExpr float HermiteV(x,0,
[1,-50,-50]@0,
[0,-50,-50]@1)
The controlling curve of the foreground. To use it, load it into the Curve Editor by hitting the small Load Curve button.
bgExpr float HermiteV(x,0,
[0,50,50]@0,
[1,50,50]@1)
The controlling curve of the foreground. To use it, load it into the Curve Editor by hitting the small Load Curve button.


Synopsis

image AddMix( 
  image Foreground,
  image Background,
  int clipMode,
  int preMultiplied,
  float fgExpr,
  float bgExpr
);


Script

image AddMix( 
   Foreground,
   Background,
   clipMode,
   preMultiplied,
   fgExpr,
   bgExpr
);

See Also
Over