Constraint – Apple Shake 4 User Manual

Page 459

Advertising
background image

Chapter 16

Compositing With Layer Nodes

459

Constraint

Constraint is a multifunctional node that restricts the effect of nodes to limited areas,
channels, tolerances, or fields. Toggle the type buttons to select the constraint type.
When you do so, certain parameters then become active; others no longer have any
effect. This is similar to the KeyMix node in that you mix two images according to a
third constraint. KeyMix expects an image to be the constraint. Constraint allows you to
set other types of constraints.

The Constraint node also speeds calculation times considerably in many cases. The
speed increase always occurs when using the ROI (Region of Interest) or field mode, and
for many functions when using channel mode. Channel mode decreases calculation
time when the output is a result of examining channels, such as layer operations.
Calculation time is not decreased, however, when it must examine pixels, such as warps
and many filters. The tolerance mode may in fact increase calculation times, as it must
resolve both input images to calculate the difference between the images.

Parameters

This node displays the following controls in the Parameters tab:

clipMode
Toggles between the foreground (0) or the background (1) image to set the output
resolution.

type
Selects the type of constraint you use.

AOI - Area of Interest (1): Draws a mixing box.

Threshold (2): Only changes within a tolerance are passed on.

Channel (4): Only specific channels are modified.

Field (8): Only a selected field is modified.

Because of the labeling, you can do multiple types of constraining in the script by
adding the numbers together. For example, 7 = AOI (1) + Threshold (2) + Channel (4); in
other words, AOI, Threshold, and Channel are all active.

AOI Controls
These controls are active only if the type parameter is set to AOI. Opening the AOI
controls subtree reveals left, right, bottom, and top subparameters, which create a
cropping box for the effect.

rTol
Controls the red color channel tolerance if the type parameter is set to Threshold (2). If
pixels between the two images are less than the tolerance value, they are considered
common.

Advertising