Function
This function isolates each channel and will cut pixels away or add them to
the edge of that channel. For example, if you wanted to eat into your mask,
you would set your channels to "a", and then set x-
and yPixels values of -1. By default, you are working on whole pixels,
but you can switch to sub-pixel chewing by toggling on soften. Note that
the soften parameter *really* slows the function down. We recommend low
values for x- and yPixels if you are turning on the soften feature.
You often select "a" as your channel and then apply a Color - MMult afterwards to multiply the RGB by the modified alpha.
Parameters
|
Type
|
Defaults
|
Function
|
channels |
string
|
"rgba" | The effected channels. Any or all of rgba. |
x/yPixels |
float
|
0, xPixels | The amount of pixels added or taken on an edge. Positive values add to the edge, negative values eat away at the edge. |
borders |
int
|
0 |
This tells Shake to consider or ignore the border pixels. |
soften |
int
|
0 | This toggle turns on softening, or effecting the sub-pixel. If this is turned on, it will considerably slow down the software at high x/yPixel values. |
sharpness |
float
|
0 | The sharpness factor for the softening. A value of 0 gives a smooth gradation, whereas 2 will give you a sharp cutoff. |
Synopsis
image DilateErode( image, const char * channels, float xPixels, float yPixels, int borders, int soften float sharpness );
Script
image = DilateErode(image, "channels", xPixels, yPixels, borders, soften, sharpness );
Command Line
shake -dilateerode channels xPixels yPixels etc...