The layer nodes, Addmix, The layer – Apple Shake 4 User Manual

Page 453: Nodes

Advertising
background image

Chapter 16

Compositing With Layer Nodes

453

The Layer Nodes

This section provides a detailed description of each of the layer nodes.

AddMix

The AddMix node is similar to the Over node, except that you have control over curves
to help blend the edges together. For more information on the Over node, see “

Over

on page 466.

ISub

A-B

r-r2

ISubA

Find the difference
between elements.

absolute(A-B)

fabs(r-r2)

KeyMix

Mix two images
through a third mask.

A*(1-M*C)+ (B*M*C)

M represents the

percentage mix.

Max

Combine masks.

If (A > B) then A,
else B

r>r2?r:r2 or
max(r,r2)

Min

If (A < B) then A,
else B

r<r2?r:r2 or
min(r,r2)

Mix

Cross-fade.

A*(1-Mix)+(B*Mix)

r*(1-mix)+r2*mix

Outside

Mask elements.

A*(1-Ba)

r*(1-a2)

Over

Primary compositor

A + (B*(1-Aa))

r+(1-a)*r2

Screen

Add reflections and
light elements without
losing highlight detail.

1-(1-A)*(1-B)

1-(1-r)*(1-r2)

Under

A reverse of Over

B + (A*(1-Ba))

r2+r*(1-a2)

Xor

Find areas that are
mutually exclusive.

A*(1-Ba) + B*(1-Aa)

r*(1-a2) + r2*(1-a)

ZCompose

Create Z-depth
composite.

If(Aa == 1) then
If (Az == Bz) then
((A + (B*(1-Aa))) +
B + (A*(1-Ba)) ) / 2
else
If(Az < Bz) then A
else B
else A + (B*(1-Aa))

If foreground alpha
does not equal 1, an
Over is performed.
Otherwise, if the Z
values are not equal,
the lower Z is taken. If
the Z values are the
same, the result is a 50
percent mix of an Over
and an Under.

Layer Node

Common Uses

Math

LayerX Syntax

Advertising