Loglin – Apple Shake 4 User Manual
Page 648
648
Chapter 23
Color Correction
Expressions can use the following variables:
•
The variables r, g, b, a, and z refer to the value of the original channels (red, green,
blue, alpha, and Z).
•
The variables x and y are the coordinates of the pixel.
•
The variables width and height are the width and height of the image.
•
The variable time is the current frame number (time).
Many operators can be represented by an arithmetic expression, such as reordering,
color correction, and gradient generation, or even circle drawing. Note that no spaces
are allowed in the expressions, unless you can use quotes for more explicit grouping.
LogLin
The LogLin node is typically used to handle logarithmic film plates, such as Cineon files
from a film scanner, or when writing files out for film recording. It converts the images
from the logarithmic color space to the linear color space for accurate compositing. You
can then use the node at the end of your node tree to convert the images back into
logarithmic space for film scanning. You can also use this around nodes that only work
in 8 or 16 bits, functions such as Primatte, Keylight, or other plug-ins from third parties.
Ultimatte is the exception, as it maintains float values. For a full description of this
process, see “
The LogLin color parameters are linked together by default, so gBlack and bBlack
reflect the rBlack value. You can of course adjust these to further color correct your
scanned plates.
Task
Example: Each value field can be filled independently in the
interface—these are all command-line examples.
Reordering
shake bg.iff -colorx b r a g
Red correction
shake bg.iff -colorx “r*1.2”
Red and blue correction
shake bg.iff -colorx “r*1.2” g “b*1.5”
Same expression for red, green,
and blue
shake bg.iff -colorx “(r+g+b)/3” -reorder rrr
X gradient in matte
shake -colorx r g b “x/width”
Y gradient in matte
shake -colorx r g b “y/height”
Blue spill removal
shake primatte/woman.iff -colorx r g “b>g?g:b”
Random noise
shake -colorx rnd(x*y) rnd(2*x*y) rnd(3*x*y)
Turbulent noise (1 channel)
shake -colorx turbulence2d(x,y,20,20)
Clip alpha if Z is less than 20
shake uboat.iff -colorx r g b “z<20”
Clip alpha if Z is more than 50
shake uboat.iff -colorx r g b “z>50”
A smooth alpha gradient from
Z units 1 to 70
shake uboat.iff -colorx r g b “(z-1)/70”