-
-
Save zachlewis/ee721c4af3251047af6e3fd9c14aebd4 to your computer and use it in GitHub Desktop.
aces-dev / Nuke SSTS transform
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set cut_paste_input [stack 0] | |
version 11.0 v2 | |
push $cut_paste_input | |
Group { | |
name SSTS_Red2 | |
knobChanged "\nnode = nuke.thisNode()\nknob = nuke.thisKnob()\nname = knob.name()\n\nswitches = \['calcMin', 'calcMax', 'calcPctLow', 'calcPctHigh']\nsstsparms = \['min', 'mid', 'max', 'pctLow', 'pctHigh']\nothers = \['presets', 'inv', 'channel']\n\n\n\n\nif name not in (switches + others):\n pass\n\nelse: \n value = knob.getValue()\n if name == 'channel':\n\n def setcolor(dark, light):\n inverse = node\['inv'].getValue()\n if inverse < 1.0:\n node\['tile_color'].setValue(dark)\n node\['note_font_color'].setValue(light)\n else:\n node\['tile_color'].setValue(light)\n node\['note_font_color'].setValue(dark)\n rgb_hex = lambda rgb: int('%02x%02x%02x%02x' %\n (255*rgb\[0], 255*rgb\[1], 255*rgb\[2],1), 16)\n c = node\['channel'].value()\n\n if c == 'Red':\n pink = rgb_hex((0.95, 0.75, 0.75))\n red = rgb_hex((0.5, 0., 0.))\n setcolor(red, pink)\n elif c == 'Green':\n mint = rgb_hex((0.75, 0.95, 0.75))\n green = rgb_hex((0., 0.3, 0.))\n setcolor(green, mint)\n else:\n sky = rgb_hex((0.75, 0.75, 0.95))\n blue = rgb_hex((0., 0., 3.))\n setcolor(blue, sky)\n\n elif name == 'inv':\n oldtile = int(node\['tile_color'].getValue())\n oldnote = int(node\['note_font_color'].getValue())\n node\['tile_color'].setValue(oldnote)\n node\['note_font_color'].setValue(oldtile)\n\n\n\n elif name in switches:\n\n defaults = \{\n 'min' : \"clamp(minLum, pow(10,lumLow.x), pow(10,lumLow.y))\",\n 'max' : \"clamp(maxLum, pow(10,lumHigh.x), pow(10,lumHigh.y))\"\n \}\n switchexp = lambda x: node\[x].setExpression(exprs\[x],0) if value == 1.0 else node\[x].clearAnimated()\n exprs = \{\n 'min' : \"\"\"\n pow(2, (\n (log(\n (pow(2, lerp(lumLow.x, stopsLow.x, lumLow.y, stopsLow.y, log10(min.y))) * 0.18))\n /log(2)) \n - expShift))\n \"\"\",\n 'max' : \"\"\"\n pow(2, (\n (log(\n (pow(2, lerp(lumHigh.x, stopsHigh.x, lumHigh.y, stopsHigh.y, log10(max.y)))* 0.18))\n /log(2))\n - expShift))\n \"\"\",\n 'pctLow' : \"\"\"\n lerp(\n stopsLow.x,\n pctsLow.x,\n stopsLow.y,\n pctsLow.y,\n (log(min.x/0.18)/log(2))\n )\n\n \"\"\",\n 'pctHigh' : \"\"\"\n lerp(\n stopsHigh.x,\n pctsHigh.x,\n stopsHigh.y,\n pctsHigh.y,\n (log(max.x/0.18)/log(2))\n )\n \"\"\"\}\n if name == 'calcMin':\n switchexp('min')\n elif name == 'calcMax':\n switchexp('max')\n elif name == 'calcPctLow':\n switchexp('pctLow')\n elif name == 'calcPctHigh':\n switchexp('pctHigh')\n\n elif name == 'presets':\n\n presets = \{\n 'OCES' : (0.0001, 4.8, 10000.),\n 'Sony BVM-X300' : (0.0001, 10., 1000.),\n 'Dolby PRM-4220' : (0.005, 10., 600.),\n 'Dolby Pulsar' : (0.005, 15., 4000.),\n 'Dolby Cinema' : (0.0001, 7.2, 108.),\n 'Standard Cinema' : (0.02, 4.8, 48.),\n \}\n\n p = node\['presets'].value()\n if p in presets.keys():\n node\['mid'].setValue(presets\[p]\[1], 1)\n node\['min'].setValue(presets\[p]\[0], 1)\n node\['max'].setValue(presets\[p]\[2], 1)\n for k in \['min', 'mid', 'max']:\n node\[k].setEnabled(False)\n else:\n for k in sstsparms:\n node\[k].setEnabled(True)\n\n\n\n" | |
tile_color 0x7f000001 | |
gl_color 0xffffffff | |
label "\[value min.y]\n\[value max.y]\n\[? \[numvalue presets]==0 \"\" \[value presets]]\n\[expr \[value inv]?\"inverse\":\"\"]" | |
note_font Verdana | |
note_font_color 0xf2bfbf01 | |
selected true | |
xpos 2548 | |
ypos 848 | |
addUserKnob {20 tParameters l Parameters} | |
addUserKnob {4 channel l Channel M {Red Green Blue ""}} | |
addUserKnob {4 presets l Presets M {Custom OCES "Sony BVM-X300" "Dolby PRM-4220" "Dolby Pulsar" "Dolby Cinema" "Standard Cinema"}} | |
presets "Standard Cinema" | |
addUserKnob {26 ""} | |
addUserKnob {12 min l Min +DISABLED} | |
min {{"pow(2, (\n (log(\n (pow(2, lerp(lumLow.x, stopsLow.x, lumLow.y, stopsLow.y, log10(min.y))) * 0.18))\n /log(2)) \n - expShift))\n "} 0.02} | |
addUserKnob {6 calcMin l "Calculate Min ACES Value" -STARTLINE} | |
calcMin true | |
addUserKnob {12 mid l Mid +DISABLED} | |
mid {{"pow(2, (( log(0.18)/log(2)) - expShift))"} 4.8} | |
addUserKnob {12 max l Max +DISABLED} | |
max {{"pow(2, (\n (log(\n (pow(2, lerp(lumHigh.x, stopsHigh.x, lumHigh.y, stopsHigh.y, log10(max.y)))* 0.18))\n /log(2))\n - expShift))\n "} 48} | |
addUserKnob {6 calcMax l "Calculate Max ACES Value" -STARTLINE} | |
calcMax true | |
addUserKnob {26 ""} | |
addUserKnob {6 calcPctLow l "Calculate Knee" +STARTLINE} | |
calcPctLow true | |
addUserKnob {6 calcPctHigh l "Calculate Shoulder" -STARTLINE} | |
calcPctHigh true | |
addUserKnob {7 pctLow l "Knee %" R 0.14 0.35} | |
pctLow {{"lerp(\n stopsLow.x,\n pctsLow.x,\n stopsLow.y,\n pctsLow.y,\n (log(min.x/0.18)/log(2))\n )\n\n "}} | |
addUserKnob {7 pctHigh l "Shoulder %" R 0.89 0.91} | |
pctHigh {{"lerp(\n stopsHigh.x,\n pctsHigh.x,\n stopsHigh.y,\n pctsHigh.y,\n (log(max.x/0.18)/log(2))\n )\n "}} | |
addUserKnob {26 ""} | |
addUserKnob {7 minSlope l "Min Slope" R 0 2} | |
minSlope 0.1 | |
addUserKnob {7 midSlope l "Mid Slope" R 0 2} | |
midSlope 1.5 | |
addUserKnob {7 maxSlope l "Max Slope" R 0 2} | |
maxSlope 0.1 | |
addUserKnob {26 ""} | |
addUserKnob {7 expShift l "Exposure Shift" R -3 3} | |
addUserKnob {26 ""} | |
addUserKnob {6 inv l Inverse +STARTLINE} | |
addUserKnob {20 tConstraints l Constraints} | |
addUserKnob {26 lowlimits l Low T "(min, max)"} | |
addUserKnob {12 lumLow l Luminance} | |
lumLow {{log10(0.0001)} {log10(0.02)}} | |
addUserKnob {12 stopsLow l Stops} | |
stopsLow {-16 -6.5} | |
addUserKnob {12 pctsLow l Percent} | |
pctsLow {0.14 0.35} | |
addUserKnob {26 div l " " T " "} | |
addUserKnob {26 highlimits l High T "(min, max)"} | |
addUserKnob {12 lumHigh l Luminance} | |
lumHigh {{log10(48)} {log10(10000)}} | |
addUserKnob {12 stopsHigh l Stops} | |
stopsHigh {6.5 {"(log(65504)/log(2)) - (log(0.18)/log(2))"}} | |
addUserKnob {12 pctsHigh l Percent} | |
pctsHigh {0.89 0.91} | |
addUserKnob {20 tCoefficients l Coefficients} | |
addUserKnob {7 coefsLow0 R -4 4} | |
coefsLow0 {{"(minSlope*( log10(min.x) \n- \n0.5*knotIncLow))+ ( log10(min.y) - minSlope * log10(min.x) )"}} | |
addUserKnob {7 coefsLow1 R -4 4} | |
coefsLow1 {{"(minSlope*( log10(min.x) \n+ \n0.5*knotIncLow))+ ( log10(min.y) - minSlope * log10(min.x) )"}} | |
addUserKnob {7 coefsLow2 R -4 4} | |
coefsLow2 {{log10(min.y)+pctLow*(log10(mid.y)-log10(min.y))}} | |
addUserKnob {7 coefsLow3 R -4 4} | |
coefsLow3 {{"(midSlope *(log10(mid.x)\n-\n0.5*knotIncLow))\n+ (log10(mid.y) - midSlope * log10(mid.x))"}} | |
addUserKnob {7 coefsLow4 R -4 4} | |
coefsLow4 {{"(midSlope *(log10(mid.x)\n+\n0.5*knotIncLow))\n+ (log10(mid.y) - midSlope * log10(mid.x))"}} | |
addUserKnob {26 div2 l " " T " "} | |
addUserKnob {7 coefsHigh0 R -4 4} | |
coefsHigh0 {{"(midSlope *(log10(mid.x)\n-\n0.5*knotIncHigh))\n+ (log10(mid.y) - midSlope * log10(mid.x))"}} | |
addUserKnob {7 coefsHigh1 R -4 4} | |
coefsHigh1 {{"(midSlope *(log10(mid.x)\n+\n0.5*knotIncHigh))\n+ (log10(mid.y) - midSlope * log10(mid.x))"}} | |
addUserKnob {7 coefsHigh2 R -4 4} | |
coefsHigh2 {{"log10(mid.y) + pctHigh*(log10(max.y)-log10(mid.y))"}} | |
addUserKnob {7 coefsHigh3 R -4 4} | |
coefsHigh3 {{"(maxSlope *(log10(max.x)\n-\n0.5*knotIncHigh))\n+ (log10(max.y) - maxSlope * log10(max.x))"}} | |
addUserKnob {7 coefsHigh4 R -4 4} | |
coefsHigh4 {{"(maxSlope *(log10(max.x)\n+\n0.5*knotIncHigh))\n+ (log10(max.y) - maxSlope * log10(max.x))"}} | |
addUserKnob {20 Knots} | |
addUserKnob {3 N_KNOTS +DISABLED} | |
N_KNOTS 4 | |
addUserKnob {7 knotIncLow +DISABLED} | |
knotIncLow {{"(log10(mid.x) - log10(min.x)) / (N_KNOTS-1)"}} | |
addUserKnob {7 knotIncHigh +DISABLED} | |
knotIncHigh {{"(log10(max.x) - log10(mid.x)) / (N_KNOTS -1)"}} | |
addUserKnob {26 ""} | |
addUserKnob {7 knotYLow0} | |
knotYLow0 {{"(coefsLow0 + coefsLow1) / 2"}} | |
addUserKnob {7 knotYLow1} | |
knotYLow1 {{"(coefsLow1 + coefsLow2)/2"}} | |
addUserKnob {7 knotYLow2} | |
knotYLow2 {{"(coefsLow2 + coefsLow3)/2"}} | |
addUserKnob {7 knotYLow3} | |
knotYLow3 {{"(coefsLow3 + coefsLow4)/2"}} | |
addUserKnob {26 div3 l " " T " "} | |
addUserKnob {7 knotYHigh0} | |
knotYHigh0 {{"(coefsHigh0 + coefsHigh1)/2"}} | |
addUserKnob {7 knotYHigh1} | |
knotYHigh1 {{"(coefsHigh1 + coefsHigh2)/2"}} | |
addUserKnob {7 knotYHigh2} | |
knotYHigh2 {{"(coefsHigh2 + coefsHigh3)/2"}} | |
addUserKnob {7 knotYHigh3} | |
knotYHigh3 {{"(coefsHigh3 + coefsHigh4)/2"}} | |
addUserKnob {26 ""} | |
addUserKnob {7 lookup_pctLow l "Knee %"} | |
lookup_pctLow {{"lerp(\n stopsLow.x,\n pctsLow.x,\n stopsLow.y,\n pctsLow.y,\n (log(ACESlow/0.18)/log(2))\n)\n"}} | |
addUserKnob {7 lookup_pctHigh l "Shoulder %"} | |
lookup_pctHigh {{"lerp(\n stopsHigh.x,\n pctsHigh.x,\n stopsHigh.y,\n pctsHigh.y,\n (log(ACEShigh/0.18)/log(2))\n)\n"}} | |
addUserKnob {26 ""} | |
addUserKnob {20 about l About} | |
addUserKnob {26 tAbout l "" +STARTLINE T "Single-Stage Tone Scale\nNuke Implementation v0.1.6 \n11.30.2017\n\nScott Dyer -- SSTS algorithms, actual work\nAlex Fry -- Original Nuke ACES RRT / ODT implementation, more actual work\nZach Lewis -- Wacom pen twirling\n\n\nFor more information:\nhttp://acescentral.com/t/odt-b-spline-in-python-and-interactive-plot"} | |
} | |
BackdropNode { | |
inputs 0 | |
name BackdropNode1 | |
tile_color 0x7c8e8eff | |
label Forward | |
note_font_size 42 | |
xpos -3363 | |
ypos -311 | |
bdwidth 1662 | |
bdheight 965 | |
} | |
BackdropNode { | |
inputs 0 | |
name BackdropNode2 | |
tile_color 0x8e898eff | |
label Inverse | |
note_font_size 42 | |
xpos -879 | |
ypos -379 | |
bdwidth 1844 | |
bdheight 1036 | |
} | |
Input { | |
inputs 0 | |
name Input1 | |
xpos -1301 | |
ypos -1324 | |
} | |
Dot { | |
name IN | |
xpos -1267 | |
ypos -1219 | |
} | |
set N48c2940 [stack 0] | |
Dot { | |
name Dot32 | |
xpos -3929 | |
ypos -1219 | |
} | |
Dot { | |
name Dot31 | |
xpos -3929 | |
ypos 1490 | |
} | |
push $N48c2940 | |
Dot { | |
name Dot29 | |
xpos -1267 | |
ypos -1102 | |
} | |
set N48c7210 [stack 0] | |
Shuffle { | |
red blue | |
green blue | |
name blue | |
tile_color 0x55bfffff | |
xpos -1207 | |
ypos -1042 | |
} | |
push $N48c7210 | |
Shuffle { | |
red green | |
blue green | |
alpha white | |
name green | |
tile_color 0xff3fff | |
xpos -1301 | |
ypos -1043 | |
} | |
push $N48c7210 | |
Shuffle { | |
green red | |
blue red | |
name red | |
tile_color 0xff5555ff | |
xpos -1401 | |
ypos -1043 | |
} | |
Switch { | |
inputs 3 | |
which {{parent.channel}} | |
name switch_rgb | |
xpos -1299 | |
ypos -995 | |
} | |
Dot { | |
name Dot28 | |
xpos -1265 | |
ypos -922 | |
} | |
set N5511860 [stack 0] | |
Dot { | |
name Dot27 | |
xpos -652 | |
ypos -301 | |
} | |
Dot { | |
name Dot8 | |
xpos -652 | |
ypos -261 | |
} | |
set N55191e0 [stack 0] | |
Expression { | |
temp_name0 logy | |
temp_expr0 "log10(max(r, 5.96046448e-08))" | |
expr0 "logy <= log10(min.y)" | |
expr1 "(logy > log10(min.y)) && (logy < log10(mid.y)) " | |
expr2 "( (logy >= log10(mid.y)) && (logy < log10(max.y)) )" | |
expr3 "logy >= log10(max.y)" | |
name inv_Partition_Range | |
xpos -686 | |
ypos -221 | |
addUserKnob {20 User} | |
addUserKnob {13 min l Min t "\[x, y, slope]"} | |
min {{parent.min} {parent.min} {parent.minSlope}} | |
addUserKnob {13 mid l Mid} | |
mid {{parent.mid} {parent.mid} {parent.midSlope}} | |
addUserKnob {13 max l Max} | |
max {{parent.max} {parent.max} {parent.maxSlope}} | |
addUserKnob {20 constants l Constants n 1} | |
addUserKnob {26 txtLow l "Low Limits"} | |
addUserKnob {12 lumLow l Luminance} | |
lumLow {{parent.lumLow} {parent.lumLow}} | |
addUserKnob {12 stopsLow l Stops} | |
stopsLow {{parent.stopsLow} {parent.stopsLow}} | |
addUserKnob {12 pctsLow l Percentages} | |
pctsLow {{parent.pctsLow} {parent.pctsLow}} | |
addUserKnob {26 txtHigh l "High Limits"} | |
addUserKnob {12 lumHigh l Luminance} | |
lumHigh {{parent.lumHigh} {parent.lumHigh}} | |
addUserKnob {12 stopsHigh l Stops} | |
stopsHigh {{parent.stopsHigh} {parent.stopsHigh}} | |
addUserKnob {12 pctsHigh l Percentages} | |
pctsHigh {{parent.pctsHigh} {parent.pctsHigh}} | |
addUserKnob {20 endGroup n -1} | |
addUserKnob {7 interp_pctLow l "Interpolated Min %"} | |
interp_pctLow {{parent.pctLow}} | |
addUserKnob {7 interp_pctHigh l "Interpolated Max %"} | |
interp_pctHigh {{parent.pctHigh}} | |
addUserKnob {20 Coefficients} | |
addUserKnob {7 coefsLow0} | |
coefsLow0 {{parent.coefsLow0}} | |
addUserKnob {7 coefsLow1} | |
coefsLow1 {{parent.coefsLow1}} | |
addUserKnob {7 coefsLow2} | |
coefsLow2 {{parent.coefsLow2}} | |
addUserKnob {7 coefsLow3} | |
coefsLow3 {{parent.coefsLow3}} | |
addUserKnob {7 coefsLow4} | |
coefsLow4 {{parent.coefsLow4}} | |
addUserKnob {7 coefsHigh0} | |
coefsHigh0 {{parent.coefsHigh0}} | |
addUserKnob {7 coefsHigh1} | |
coefsHigh1 {{parent.coefsHigh1}} | |
addUserKnob {7 coefsHigh2} | |
coefsHigh2 {{parent.coefsHigh2}} | |
addUserKnob {7 coefsHigh3} | |
coefsHigh3 {{parent.coefsHigh3}} | |
addUserKnob {7 coefsHigh4} | |
coefsHigh4 {{parent.coefsHigh4}} | |
addUserKnob {20 Knots} | |
addUserKnob {7 knotIncLow} | |
knotIncLow 4 | |
addUserKnob {7 knotIncHigh} | |
knotIncHigh 4 | |
} | |
Dot { | |
name Dot3 | |
xpos -652 | |
ypos -88 | |
} | |
set N46c48c0 [stack 0] | |
Dot { | |
name Dot6 | |
xpos -589 | |
ypos -88 | |
} | |
set N528e130 [stack 0] | |
Shuffle { | |
red blue | |
green blue | |
alpha blue | |
name inv_indexHighHalf | |
label highlights | |
xpos -623 | |
ypos -46 | |
} | |
push $N55191e0 | |
Dot { | |
name Dot9 | |
xpos -261 | |
ypos -261 | |
} | |
set N4fc2320 [stack 0] | |
Dot { | |
name Dot10 | |
xpos 26 | |
ypos -261 | |
} | |
set N4fc4920 [stack 0] | |
Dot { | |
name Dot11 | |
xpos 345 | |
ypos -261 | |
} | |
set N4fc7240 [stack 0] | |
Dot { | |
name Dot15 | |
xpos 345 | |
ypos -223 | |
} | |
set N4fc9cc0 [stack 0] | |
Expression { | |
temp_name0 logy | |
temp_expr0 "log10(max(r, 5.96046448e-08))" | |
temp_name1 low | |
temp_expr1 "((logy > knotYHigh0) && (logy <= knotYHigh1))" | |
temp_name2 mid | |
temp_expr2 "((logy > knotYHigh1) && (logy <= knotYHigh2))" | |
temp_name3 high | |
temp_expr3 "((logy > knotYHigh2) && (logy <= knotYHigh3))" | |
expr0 "low ? coefsHigh0 : mid ? coefsHigh1 : high ? coefsHigh2 :1" | |
expr1 "low ? coefsHigh1 : mid ? coefsHigh2 : coefsHigh3" | |
expr2 "low ? coefsHigh2 : mid ? coefsHigh3 : coefsHigh4" | |
expr3 "low ? 0 : mid ? 1 : high ? 2 : 0" | |
name inv_cfHigh | |
xpos 165 | |
ypos -199 | |
addUserKnob {20 User} | |
addUserKnob {7 N_KNOTS R 0 5} | |
N_KNOTS 4 | |
addUserKnob {26 ""} | |
addUserKnob {7 coefsHigh0} | |
coefsHigh0 {{parent.coefsHigh0}} | |
addUserKnob {7 coefsHigh1} | |
coefsHigh1 {{parent.coefsHigh1}} | |
addUserKnob {7 coefsHigh2} | |
coefsHigh2 {{parent.coefsHigh2}} | |
addUserKnob {7 coefsHigh3} | |
coefsHigh3 {{parent.coefsHigh3}} | |
addUserKnob {7 coefsHigh4} | |
coefsHigh4 {{parent.coefsHigh4}} | |
addUserKnob {26 ""} | |
addUserKnob {7 knotYHigh0} | |
knotYHigh0 {{parent.knotYHigh0}} | |
addUserKnob {7 knotYHigh1} | |
knotYHigh1 {{parent.knotYHigh1}} | |
addUserKnob {7 knotYHigh2} | |
knotYHigh2 {{parent.knotYHigh2}} | |
addUserKnob {7 knotYHigh3} | |
knotYHigh3 {{parent.knotYHigh3}} | |
} | |
ColorMatrix { | |
channels rgba | |
matrix { | |
{0.5 -1 0.5} | |
{-1 1 0} | |
{0.5 0.5 0} | |
} | |
name inv_basis_high | |
xpos 165 | |
ypos -175 | |
} | |
push $N4fc9cc0 | |
MergeExpression { | |
inputs 2 | |
temp_name0 logy | |
temp_expr0 "log10(max(Br, 5.96046448e-08))" | |
expr0 Ar | |
expr1 Ag | |
expr2 Ab-logy | |
expr3 Aa | |
name inv_mult_lum_high | |
xpos 311 | |
ypos -175 | |
} | |
Expression { | |
temp_name0 j | |
temp_expr0 a | |
temp_name1 d | |
temp_expr1 "sqrt(g*g - 4*r*b)" | |
temp_name2 t | |
temp_expr2 "(2*b)/(-sqrt(g*g - 4*r*b)-g)" | |
channel0 rgb | |
expr0 "log10(mid.x) + (t +j) * knotIncHigh" | |
channel1 {-rgba.red -rgba.green -rgba.blue none} | |
channel2 {-rgba.red -rgba.green -rgba.blue none} | |
expr3 1 | |
maskChannelInput -rgba.alpha | |
unpremult -rgba.alpha | |
name inv_knob_vals_high | |
xpos 311 | |
ypos -123 | |
addUserKnob {20 User} | |
addUserKnob {7 knotIncHigh} | |
knotIncHigh {{parent.knotIncHigh}} | |
addUserKnob {13 mid l Mid} | |
mid {{parent.mid.x} {parent.mid.y} {parent.midSlope}} | |
} | |
Merge2 { | |
inputs 2 | |
operation multiply | |
maskChannelInput -rgba.alpha | |
name Multiply2 | |
xpos 311 | |
ypos 210 | |
} | |
push $N46c48c0 | |
Dot { | |
name Dot7 | |
xpos -722 | |
ypos -88 | |
} | |
set N4615d10 [stack 0] | |
Shuffle { | |
red green | |
blue green | |
alpha green | |
name inv_indexLowHalf | |
label shadows | |
xpos -756 | |
ypos -47 | |
} | |
push $N4fc4920 | |
Dot { | |
name Dot13 | |
xpos 26 | |
ypos -243 | |
} | |
set N52b9b70 [stack 0] | |
Expression { | |
temp_name0 logy | |
temp_expr0 "log10(max(r, 5.96046448e-08))" | |
temp_name1 low | |
temp_expr1 "(logy > knotYLow0) && (logy <= knotYLow1)" | |
temp_name2 mid | |
temp_expr2 "(logy > knotYLow1) && (logy <= knotYLow2)" | |
temp_name3 high | |
temp_expr3 "(logy > knotYLow2) && (logy <= knotYLow3)" | |
expr0 "low ? coefsLow0 : mid ? coefsLow1 : coefsLow2" | |
expr1 "low ? coefsLow1 : mid ? coefsLow2 : coefsLow3" | |
expr2 "low ? coefsLow2 : mid ? coefsLow3 : coefsLow4" | |
expr3 "low ? 0 : mid ? 1 : high ? 2 : 0" | |
name inv_cfLow | |
xpos -116 | |
ypos -193 | |
addUserKnob {20 User} | |
addUserKnob {7 coefsLow0} | |
coefsLow0 {{parent.coefsLow0}} | |
addUserKnob {7 coefsLow1} | |
coefsLow1 {{parent.coefsLow1}} | |
addUserKnob {7 coefsLow2} | |
coefsLow2 {{parent.coefsLow2}} | |
addUserKnob {7 coefsLow3} | |
coefsLow3 {{parent.coefsLow3}} | |
addUserKnob {7 coefsLow4} | |
coefsLow4 {{parent.coefsLow4}} | |
addUserKnob {26 ""} | |
addUserKnob {7 knotYLow0} | |
knotYLow0 {{parent.knotYLow0}} | |
addUserKnob {7 knotYLow1} | |
knotYLow1 {{parent.knotYLow1}} | |
addUserKnob {7 knotYLow2} | |
knotYLow2 {{parent.knotYLow2}} | |
addUserKnob {7 knotYLow3} | |
knotYLow3 {{parent.knotYLow3}} | |
} | |
ColorMatrix { | |
channels {rgba.red rgba.green rgba.blue -rgba.alpha} | |
matrix { | |
{0.5 -1 0.5} | |
{-1 1 0} | |
{0.5 0.5 0} | |
} | |
name inv_basis_low | |
xpos -116 | |
ypos -169 | |
} | |
push $N52b9b70 | |
MergeExpression { | |
inputs 2 | |
temp_name0 logy | |
temp_expr0 "log10(max(Br, 5.96046448e-08))" | |
expr0 Ar | |
expr1 Ag | |
expr2 Ab-logy | |
expr3 Aa | |
name c_minus_logy | |
xpos -8 | |
ypos -169 | |
} | |
Expression { | |
temp_name0 j | |
temp_expr0 a | |
temp_name1 d | |
temp_expr1 "sqrt(g*g - 4*r*b)" | |
temp_name2 t | |
temp_expr2 "(2.*b)/(-sqrt(g*g - 4*r*b)-g)" | |
channel0 rgb | |
expr0 "log10(min.x) + (t +j) * knotIncLow" | |
channel1 {-rgba.red -rgba.green -rgba.blue none} | |
channel2 {-rgba.red -rgba.green -rgba.blue none} | |
expr3 1 | |
maskChannelInput -rgba.alpha | |
unpremult -rgba.alpha | |
name inv_knot_vals | |
xpos -8 | |
ypos -122 | |
addUserKnob {20 User} | |
addUserKnob {7 knotIncLow} | |
knotIncLow {{parent.knotIncLow}} | |
addUserKnob {13 min l Min} | |
min {{parent.min.x} {parent.min.y} {parent.minSlope}} | |
} | |
Merge2 { | |
inputs 2 | |
operation multiply | |
maskChannelInput -rgba.alpha | |
name Multiply1 | |
xpos -8 | |
ypos 156 | |
} | |
push 0 | |
push $N4615d10 | |
Dot { | |
name Dot4 | |
xpos -835 | |
ypos -88 | |
} | |
Shuffle { | |
green red | |
blue red | |
alpha red | |
name inv_indexLow | |
label "low extension" | |
xpos -869 | |
ypos -46 | |
} | |
push $N4fc2320 | |
Dot { | |
name Dot2 | |
xpos -261 | |
ypos -216 | |
} | |
Expression { | |
temp_name0 logy | |
temp_expr0 "log10(max(r, 5.96046448e-08))" | |
channel0 rgb | |
expr0 "min.z == 0 ? log10(min.x) : (logy - (log10(min.y) - min.z*log10(min.x))) / min.z" | |
channel1 {-rgba.red -rgba.green -rgba.blue none} | |
channel2 {-rgba.red -rgba.green -rgba.blue none} | |
expr3 1 | |
maskChannelInput -rgba.alpha | |
unpremult -rgba.alpha | |
name extLow | |
label "Slope: \[value min.z]" | |
xpos -295 | |
ypos -198 | |
addUserKnob {20 User} | |
addUserKnob {13 min l "Min x / y / slope"} | |
min {{parent.min} {parent.min} {parent.minSlope}} | |
} | |
Merge2 { | |
inputs 2 | |
operation multiply | |
maskChannelInput -rgba.alpha | |
name Multiply | |
xpos -295 | |
ypos 125 | |
} | |
push $N528e130 | |
Dot { | |
name Dot5 | |
xpos -479 | |
ypos -88 | |
} | |
Shuffle { | |
red alpha | |
green alpha | |
blue alpha | |
name inv_indexHigh | |
label "high extension" | |
xpos -513 | |
ypos -50 | |
} | |
push $N4fc7240 | |
Dot { | |
name Dot12 | |
xpos 727 | |
ypos -261 | |
} | |
Expression { | |
temp_name0 logy | |
temp_expr0 "log10( max(r, 5.96046448e-08 ))" | |
channel0 rgb | |
expr0 "max.z == 0 ? log10(max.x) : (logy - (log10(max.y) - max.z*log10(max.x))) / max.z" | |
channel1 {-rgba.red -rgba.green -rgba.blue none} | |
channel2 {-rgba.red -rgba.green -rgba.blue none} | |
expr3 1 | |
maskChannelInput -rgba.alpha | |
unpremult -rgba.alpha | |
name inv_extHigh | |
label "Slope: \[value max.z]" | |
xpos 693 | |
ypos -202 | |
addUserKnob {20 User} | |
addUserKnob {13 max l "Max x / y / slope"} | |
max {{parent.max} {parent.max} {parent.maxSlope}} | |
} | |
Merge2 { | |
inputs 2 | |
operation multiply | |
maskChannelInput -rgba.alpha | |
name Multiply3 | |
xpos 693 | |
ypos 278 | |
} | |
Merge2 { | |
inputs 4+1 | |
operation plus | |
maskChannelInput -rgba.alpha | |
name Merge1 | |
xpos 192 | |
ypos 427 | |
} | |
push $N5511860 | |
Dot { | |
name Dot1 | |
xpos -3138 | |
ypos -232 | |
} | |
set Na732ca0 [stack 0] | |
Expression { | |
temp_name0 logx | |
temp_expr0 "log10( max(r, 5.96046448e-08 ))" | |
expr0 "logx <= log10(min.x)" | |
expr1 "(logx > log10(min.x)) && (logx < log10(mid.x)) " | |
expr2 "( (logx >= log10(mid.x)) && (logx < log10(max.x)) )" | |
expr3 "logx >= log10(max.x)" | |
name Partition_Range | |
xpos -3172 | |
ypos -214 | |
addUserKnob {20 User} | |
addUserKnob {13 min l Min t "\[x, y, slope]"} | |
min {{parent.min} {parent.min} {parent.minSlope}} | |
addUserKnob {13 mid l Mid} | |
mid {{parent.mid} {parent.mid} {parent.midSlope}} | |
addUserKnob {13 max l Max} | |
max {{parent.max} {parent.max} {parent.maxSlope}} | |
addUserKnob {20 constants l Constants n 1} | |
addUserKnob {26 txtLow l "Low Limits"} | |
addUserKnob {12 lumLow l Luminance} | |
lumLow {{parent.lumLow} {parent.lumLow}} | |
addUserKnob {12 stopsLow l Stops} | |
stopsLow {{parent.stopsLow} {parent.stopsLow}} | |
addUserKnob {12 pctsLow l Percentages} | |
pctsLow {{parent.pctsLow} {parent.pctsLow}} | |
addUserKnob {26 txtHigh l "High Limits"} | |
addUserKnob {12 lumHigh l Luminance} | |
lumHigh {{parent.lumHigh} {parent.lumHigh}} | |
addUserKnob {12 stopsHigh l Stops} | |
stopsHigh {{parent.stopsHigh} {parent.stopsHigh}} | |
addUserKnob {12 pctsHigh l Percentages} | |
pctsHigh {{parent.pctsHigh} {parent.pctsHigh}} | |
addUserKnob {20 endGroup n -1} | |
addUserKnob {7 interp_pctLow l "Interpolated Min %"} | |
interp_pctLow {{parent.pctLow}} | |
addUserKnob {7 interp_pctHigh l "Interpolated Max %"} | |
interp_pctHigh {{parent.pctHigh}} | |
addUserKnob {20 Coefficients} | |
addUserKnob {7 coefsLow0} | |
coefsLow0 {{parent.coefsLow0}} | |
addUserKnob {7 coefsLow1} | |
coefsLow1 {{parent.coefsLow1}} | |
addUserKnob {7 coefsLow2} | |
coefsLow2 {{parent.coefsLow2}} | |
addUserKnob {7 coefsLow3} | |
coefsLow3 {{parent.coefsLow3}} | |
addUserKnob {7 coefsLow4} | |
coefsLow4 {{parent.coefsLow4}} | |
addUserKnob {7 coefsHigh0} | |
coefsHigh0 {{parent.coefsHigh0}} | |
addUserKnob {7 coefsHigh1} | |
coefsHigh1 {{parent.coefsHigh1}} | |
addUserKnob {7 coefsHigh2} | |
coefsHigh2 {{parent.coefsHigh2}} | |
addUserKnob {7 coefsHigh3} | |
coefsHigh3 {{parent.coefsHigh3}} | |
addUserKnob {7 coefsHigh4} | |
coefsHigh4 {{parent.coefsHigh4}} | |
} | |
Dot { | |
name Dot14 | |
xpos -3138 | |
ypos -59 | |
} | |
set N516cf40 [stack 0] | |
Dot { | |
name Dot16 | |
xpos -3075 | |
ypos -59 | |
} | |
set N516dce0 [stack 0] | |
Shuffle { | |
red blue | |
green blue | |
alpha blue | |
name indexHighHalf | |
label highlights | |
xpos -3109 | |
ypos -24 | |
} | |
push $Na732ca0 | |
Dot { | |
name Dot17 | |
xpos -2747 | |
ypos -232 | |
} | |
set N5176c80 [stack 0] | |
Dot { | |
name Dot18 | |
xpos -2460 | |
ypos -232 | |
} | |
set N517a2c0 [stack 0] | |
Dot { | |
name Dot19 | |
xpos -2141 | |
ypos -232 | |
} | |
set N517d6e0 [stack 0] | |
Dot { | |
name Dot20 | |
xpos -2141 | |
ypos -193 | |
} | |
set N5181190 [stack 0] | |
Expression { | |
temp_name0 logx | |
temp_expr0 "log10( max(r, 5.96046448e-08 ))" | |
temp_name1 knot_coord | |
temp_expr1 "(N_KNOTS-1) * (logx-log10(mid.x))/(log10(max.x)-log10(mid.x))" | |
temp_name2 j | |
temp_expr2 int(knot_coord) | |
temp_name3 t | |
temp_expr3 "knot_coord - j" | |
expr0 "j == 0 ? coefsHigh0 : j == 1 ? coefsHigh1 : j == 2 ? coefsHigh2 : j == 3 ? coefsHigh3 : coefsHigh4" | |
expr1 "j == 0 ? coefsHigh1 : j == 1 ? coefsHigh2 : j == 2? coefsHigh3 :coefsHigh4" | |
expr2 "j == 0 ? coefsHigh2 : j == 1 ? coefsHigh3 : coefsHigh4" | |
channel3 {none none none -rgba.alpha} | |
name cfHigh | |
xpos -2220 | |
ypos -133 | |
addUserKnob {20 User} | |
addUserKnob {7 N_KNOTS R 0 5} | |
N_KNOTS 4 | |
addUserKnob {13 mid l Mid} | |
mid {{parent.mid} {parent.mid} {parent.midSlope}} | |
addUserKnob {13 max l Max} | |
max {{parent.max} {parent.max} {parent.maxSlope}} | |
addUserKnob {26 ""} | |
addUserKnob {7 coefsHigh0} | |
coefsHigh0 {{parent.coefsHigh0}} | |
addUserKnob {7 coefsHigh1} | |
coefsHigh1 {{parent.coefsHigh1}} | |
addUserKnob {7 coefsHigh2} | |
coefsHigh2 {{parent.coefsHigh2}} | |
addUserKnob {7 coefsHigh3} | |
coefsHigh3 {{parent.coefsHigh3}} | |
addUserKnob {7 coefsHigh4} | |
coefsHigh4 {{parent.coefsHigh4}} | |
} | |
ColorMatrix { | |
matrix { | |
{0.5 -1 0.5} | |
{-1 1 0} | |
{0.5 0.5 0} | |
} | |
name basisLow1 | |
xpos -2220 | |
ypos -107 | |
} | |
push $N5181190 | |
Expression { | |
temp_name0 logx | |
temp_expr0 "log10( max(r, 5.96046448e-08 ))" | |
temp_name1 knot_coord | |
temp_expr1 "(N_KNOTS-1) * (logx-log10(mid.x))/(log10(max.x)-log10(mid.x))" | |
temp_name2 j | |
temp_expr2 int(knot_coord) | |
temp_name3 t | |
temp_expr3 "knot_coord - j" | |
expr0 t*t | |
expr1 t | |
expr2 1 | |
channel3 {none none none -rgba.alpha} | |
expr3 a | |
name monomialsHigh | |
xpos -2092 | |
ypos -140 | |
addUserKnob {20 User} | |
addUserKnob {7 N_KNOTS R 0 5} | |
N_KNOTS 4 | |
addUserKnob {13 mid l Mid} | |
mid {{parent.mid} {parent.mid} {parent.midSlope}} | |
addUserKnob {13 max l Max} | |
max {{parent.max} {parent.max} {parent.maxSlope}} | |
} | |
MergeExpression { | |
inputs 2 | |
channel0 {rgba.red rgba.green rgba.blue -rgba.alpha} | |
expr0 (Ar*Br)+(Ag*Bg)+(Ab*Bb) | |
expr3 1 | |
name MergeExpression2 | |
xpos -2092 | |
ypos -39 | |
} | |
Merge2 { | |
inputs 2 | |
operation multiply | |
maskChannelInput -rgba.alpha | |
name Multiply4 | |
xpos -2092 | |
ypos 270 | |
} | |
push $N516cf40 | |
Dot { | |
name Dot21 | |
xpos -3208 | |
ypos -59 | |
} | |
set N3e769d0 [stack 0] | |
Shuffle { | |
red green | |
blue green | |
alpha green | |
name indexLowHalf | |
label shadows | |
xpos -3242 | |
ypos -28 | |
} | |
push $N517a2c0 | |
Dot { | |
name Dot22 | |
xpos -2460 | |
ypos -207 | |
} | |
set N51159f0 [stack 0] | |
Expression { | |
temp_name0 logx | |
temp_expr0 "log10( max(r, 5.96046448e-08 ))" | |
temp_name1 knot_coord | |
temp_expr1 "(N_KNOTS-1) * (logx-log10(min.x))/(log10(mid.x)-log10(min.x))" | |
temp_name2 j | |
temp_expr2 int(knot_coord) | |
temp_name3 t | |
temp_expr3 "knot_coord - j" | |
expr0 "j == 0 ? coefsLow0 : j == 1 ? coefsLow1 : j == 2 ? coefsLow2 : j == 3 ? coefsLow3 : coefsLow4" | |
expr1 "j == 0 ? coefsLow1 : j == 1 ? coefsLow2 : j == 2? coefsLow3 :coefsLow4" | |
expr2 "j == 0 ? coefsLow2 : j == 1 ? coefsLow3 : coefsLow4" | |
name cfLow | |
xpos -2577 | |
ypos -157 | |
addUserKnob {20 User} | |
addUserKnob {7 N_KNOTS R 0 5} | |
N_KNOTS 4 | |
addUserKnob {13 min l Min t "\[x, y, slope]"} | |
min {{parent.min} {parent.min} {parent.minSlope}} | |
addUserKnob {13 mid l Mid} | |
mid {{parent.mid} {parent.mid} {parent.midSlope}} | |
addUserKnob {26 ""} | |
addUserKnob {7 coefsLow0} | |
coefsLow0 {{parent.coefsLow0}} | |
addUserKnob {7 coefsLow1} | |
coefsLow1 {{parent.coefsLow1}} | |
addUserKnob {7 coefsLow2} | |
coefsLow2 {{parent.coefsLow2}} | |
addUserKnob {7 coefsLow3} | |
coefsLow3 {{parent.coefsLow3}} | |
addUserKnob {7 coefsLow4} | |
coefsLow4 {{parent.coefsLow4}} | |
} | |
ColorMatrix { | |
matrix { | |
{0.5 -1 0.5} | |
{-1 1 0} | |
{0.5 0.5 0} | |
} | |
name basisLow | |
xpos -2577 | |
ypos -120 | |
} | |
push $N51159f0 | |
Expression { | |
temp_name0 logx | |
temp_expr0 "log10( max(r, 5.96046448e-08 ))" | |
temp_name1 knot_coord | |
temp_expr1 "(N_KNOTS-1) * (logx-log10(min.x))/(log10(mid.x)-log10(min.x))" | |
temp_name2 j | |
temp_expr2 int(knot_coord) | |
temp_name3 t | |
temp_expr3 "knot_coord - j" | |
expr0 t*t | |
expr1 t | |
expr2 1 | |
name monomialsLow | |
xpos -2437 | |
ypos -161 | |
addUserKnob {20 User} | |
addUserKnob {7 N_KNOTS R 0 5} | |
N_KNOTS 4 | |
addUserKnob {13 min l Min t "\[x, y, slope]"} | |
min {{parent.min} {parent.min} {parent.minSlope}} | |
addUserKnob {13 mid l Mid} | |
mid {{parent.mid} {parent.mid} {parent.midSlope}} | |
} | |
MergeExpression { | |
inputs 2 | |
channel0 {rgba.red rgba.green rgba.blue -rgba.alpha} | |
expr0 (Ar*Br)+(Ag*Bg)+(Ab*Bb) | |
expr3 1 | |
name MergeExpression1 | |
xpos -2437 | |
ypos -80 | |
} | |
Merge2 { | |
inputs 2 | |
operation multiply | |
maskChannelInput -rgba.alpha | |
name Multiply5 | |
xpos -2437 | |
ypos 214 | |
} | |
push 0 | |
push $N3e769d0 | |
Dot { | |
name Dot23 | |
xpos -3321 | |
ypos -59 | |
} | |
Shuffle { | |
green red | |
blue red | |
alpha red | |
name indexLow | |
label "low extension" | |
xpos -3355 | |
ypos -31 | |
} | |
push $N5176c80 | |
Dot { | |
name Dot24 | |
xpos -2747 | |
ypos -187 | |
} | |
Expression { | |
temp_name0 logx | |
temp_expr0 "log10( max(r, 5.96046448e-08 ))" | |
channel0 rgb | |
expr0 "logx * min.z + (log10(min.y) - min.z * log10(min.x))" | |
channel1 {-rgba.red -rgba.green -rgba.blue none} | |
channel2 {-rgba.red -rgba.green -rgba.blue none} | |
expr3 1 | |
maskChannelInput -rgba.alpha | |
unpremult -rgba.alpha | |
name extLow1 | |
label "Slope: \[value min.z]" | |
xpos -2781 | |
ypos -169 | |
addUserKnob {20 User} | |
addUserKnob {13 min l "Min x / y / slope"} | |
min {{parent.min} {parent.min} {parent.minSlope}} | |
} | |
Merge2 { | |
inputs 2 | |
operation multiply | |
maskChannelInput -rgba.alpha | |
name Multiply6 | |
xpos -2781 | |
ypos 150 | |
} | |
push $N516dce0 | |
Dot { | |
name Dot25 | |
xpos -2965 | |
ypos -59 | |
} | |
Shuffle { | |
red alpha | |
green alpha | |
blue alpha | |
name indexHigh | |
label "high extension" | |
xpos -2999 | |
ypos -23 | |
} | |
push $N517d6e0 | |
Dot { | |
name Dot26 | |
xpos -1759 | |
ypos -232 | |
} | |
Expression { | |
temp_name0 logx | |
temp_expr0 "log10( max(r, 5.96046448e-08 ))" | |
channel0 rgb | |
expr0 "logx * max.z + (log10(max.y) - max.z * log10(max.x))" | |
channel1 {-rgba.red -rgba.green -rgba.blue none} | |
channel2 {-rgba.red -rgba.green -rgba.blue none} | |
expr3 1 | |
maskChannelInput -rgba.alpha | |
unpremult -rgba.alpha | |
name extHigh | |
label "Slope: \[value max.z]" | |
xpos -1793 | |
ypos -161 | |
addUserKnob {20 User} | |
addUserKnob {13 max l "Max x / y / slope"} | |
max {{parent.max} {parent.max} {parent.maxSlope}} | |
} | |
Merge2 { | |
inputs 2 | |
operation multiply | |
maskChannelInput -rgba.alpha | |
name Multiply7 | |
xpos -1793 | |
ypos 309 | |
} | |
Merge2 { | |
inputs 4+1 | |
operation plus | |
maskChannelInput -rgba.alpha | |
name Merge2 | |
xpos -2294 | |
ypos 465 | |
} | |
Switch { | |
inputs 2 | |
which {{parent.inv}} | |
name switch_inverse | |
xpos -1278 | |
ypos 1182 | |
} | |
Expression { | |
channel0 rgba | |
expr0 pow(10,r) | |
name delog | |
xpos -1278 | |
ypos 1284 | |
} | |
Dot { | |
name Dot30 | |
xpos -1244 | |
ypos 1308 | |
} | |
set N5492070 [stack 0] | |
Shuffle { | |
red black | |
green black | |
alpha black | |
name blue1 | |
tile_color 0xffffff | |
xpos -1186 | |
ypos 1376 | |
} | |
push $N5492070 | |
Shuffle { | |
red black | |
blue black | |
alpha black | |
name green1 | |
tile_color 0xff3fff | |
xpos -1269 | |
ypos 1375 | |
} | |
push $N5492070 | |
Shuffle { | |
green black | |
blue black | |
alpha black | |
name red1 | |
tile_color 0xff5555ff | |
xpos -1350 | |
ypos 1374 | |
} | |
Switch { | |
inputs 3 | |
which {{parent.channel}} | |
name switch_rgb1 | |
xpos -1269 | |
ypos 1435 | |
} | |
Copy { | |
inputs 2 | |
from0 -rgba.alpha | |
to0 -rgba.alpha | |
channels alpha | |
name Copy2 | |
xpos -1269 | |
ypos 1478 | |
} | |
Output { | |
name Output | |
xpos -1269 | |
ypos 1554 | |
} | |
end_group |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment