| LookupFile |
Function
Use the LookupFile function to apply a lookup table to any image by reading a text file. The file should consist of an arbitrary number of rows, and each row can have three or four entries, corresponding to red, green, blue, and possibly alpha. Shake determines the range of the lookup to apply based on the number of rows in the file—with “black” always mapping to 0 and “white” mapping to (n-1), where n is the number of lines in the file. Therefore, if your file contains 256 rows, Shake assumes that your entries are all normalized to be in the range of 0 (black) to 255 (white). If you have 1024 lines in your file, then “white” is considered to be a value of 1023. Interpolation between entries is linear, so lookups with only a few entries may show undesirable artifacts.
For example, the following simple five-line lookup file produces the following lookup curve:
0 0 0 0 .3 .3 .3 .3 1 1 1 1 2 2 2 2 4 4 4 4

Because of this linear interpolation, you may want to use the standard Lookup node instead for lookups that do not have a large number of points.
|
Parameters
|
Type
|
Defaults
|
Function
|
| lookupFile |
string
|
This is the path to the lookup file | |
| channels |
string
|
"rgba" | These are the channels the lookup is applied to. |
Synopsis
image LookupFile( image, float expression lookupFile, float expression channels );
Script
image = LookupFile( image, "lookupFile", "channels" );
Command Line
shake -lookupfile lookupfile channels