Layer
Function
Some stuff
Parameters
|
Type
|
Defaults
|
Function
|
clipMode |
int
|
1 |
Toggles between Foreground (0) and Background
resolution (1) |
operation |
string |
"Over" |
The expresssion used for each individual channel.
Possible values are:
Atop - places fg Over bg only inside of bg's mask.
IAdd - adds fg to bg.
IDiv - divides fg by bg.
IMult - multiplies fg by by.
Inside - places fg inside of bg's mask.
ISub - fg minus bg.
ISubA - absolute value of fg minus bg.
Max - takes greater pixel value of fg or bg.
Min - takes lesser pixel value of fg or bg.
Mix - mixes fg and bg by bgPercent. 0 means all fg,
100 means all bg.
Outside - places fg outside of bg's mask.
Over - places fg over bg. Default mode.
Screen - inverts both fg and bg, multiplies them together,
and inverts back. This is good for reflections and glows.
Under - places fg under bg.
Xor - performs boolean to keep only non-common elements.
Foreground - returns raw fg.
Background - returns raw bg.
Modified Foreground - returns fg plus modifications
of preMultiply, fgOpacity
Modified Background - returns bg plus modifications
of bgPercent.
|
fgOpacity |
float |
100 |
A fade value applied to the foreground. |
bgPercent |
float |
100 |
A multiplier applied to the background. It operates differently
from fgOpacity:
This acts as a fade control on the following operations:
Atop, Inside, Min, Max, Outside,
Over, Screen, Under and Xor.
This acts as a gain control. Therefore, if you lower the bgPercent
to 0 when in IMult mode, it won't turn the entire image black.
This behavior is for the following modes:
IAdd, IDiv, IMult, ISub, ISubA,
Mix.
Mix: cross fade control.
|
channels |
string |
"rgba" |
Selects what channels are modified. |
preMultiply |
int |
0 |
Will pre-multiply the foreground RGB by
the mask. This may also be performed explictly with a Color
- MMult. This is used when you are doing an Over command
on un-premultiplied elements. |
addMattes |
int |
0 |
This will add the two mattes together,
and is generally used only with Over or Under. |
useMatte |
int |
0 |
This is only in effect when operation
is set to Xor to use the matte or not. |
ignoreZero |
int |
0 |
This is active only on IDiv or IMult.
When on, it will ignore any pixel in a channel with zero value. |
Synopsis
image Layer(
image Foreground,
image Background,
int clipMode,
string operation,
float fgOpacity,
float bgPercent,
string channels,
int preMultiply,
int addMattes,
int useMatte,
int ignoreZero
);
Script
image = Layer(
Foreground,
Background,
clipMode,
"operation",
fgOpacity,
bgPercent,
"channels",
preMultiply,
addMattes,
useMatte,
ignoreZero
);
Command Line
shake -layer image clipMode "operation"
See Also
Atop, IAdd,
IDiv, IMult,
Inside, ISub,
ISubA, Max,
Min, Mix,
Outside, Over,
Screen, Under,
Xor
|