LookupFile
Function
This allows you 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 3 or 4 entries, corresponding to red, green, blue and possibly alpha. Shake will determine the range of the lookup to be applied 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 will assume 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' will be 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 simple 5-line lookup file shown below...
0 0 0 0 .3 .3 .3 .3 1 1 1 1 2 2 2 2 4 4 4 4
...will produce a lookup that looks like this:
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