Lookup

Function

This performs an arbitrary lookup on your image. It is extremely flexible, allowing you to mimic most other color correction nodes, and is generally much faster than the ColorX function.

The lookup is defined as a function f(x), where x represents the input color, ranging from 0 to 1. As you draw the graph of this function, x is on the X axis, and f(x) is on the Y axis. Here are the Lookup equivalents of other Shake color correction nodes:

Shake function
brightness
invert
math expression
f(x) = x * value
f(x) = 1-x
lookup expression
x*1.5
1-x
graph
(white is result, grey is input)

Shake function
compress
do nothing
math expression
f(x) = x * (hi-lo) + lo
f(x) = x
lookup expression
"(x*.4)+0.3"
(if lo = 0.3 and hi = 0.7)
"x"
graph
(white is result, grey is input)


These examples do custom lookups. The last two use Shake's curve formats, but using the Value mode (the V at the end of the curve name), and inputting x as the value. All "keyframes" are between 0 and 1, and can take any value. When using the GUI, this is the default behavior - simply click on the "load curve" icon in the Parameter View to load the curve into the Curve Editor.

function
clipping
dampening
lookup expression

x>.5?0:x

x*x
graph
(white is result, grey is input)

function Spline Lookup Linear Lookup
lookup expression CSplineV(x,0,
0@0,
1@.25,
0@.75,
1@1
)
LinearV(x,0,
0@0,
1@.25,
0@.75,
1@1
)
graph
(white is result, grey is input)

 

Parameters
Type
Defaults
Function
r,g,b,aExpr
expression
"x", "x", "x", "x"
This is the function you use to change the input value, always respresented by "x".


Synopsis

image Lookup( image, 
  float expression rExpr,
  float expression gExpr,
  float expression bExpr,
  float expression aExpr
);


Script

image = Lookup( 
  image, 
  rExpr, 
  gExpr,
  bExpr, 
  aExpr
);


Command Line

shake -lookup "rExpr" "gExpr" "bExpr" "aExpr"

See Also
LookupHSV , LookupHLS, ColorX