Created
February 7, 2018 22:34
-
-
Save zachlewis/786c0be941868644c993fde1c3515c2c to your computer and use it in GitHub Desktop.
are you down with OTT?
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.1 v1 | |
push $cut_paste_input | |
Group { | |
name ACES_OT | |
tile_color 0xd4282ff | |
label "\[? \[numvalue presets]==0 \"\" \[value presets]]" | |
note_font "Bitstream Vera Sans Bold Bold Bold Bold Bold Bold Bold" | |
note_font_color 0xffffffff | |
selected true | |
xpos 1098 | |
ypos -200 | |
addUserKnob {20 Output} | |
addUserKnob {41 presets l Presets t "\nSelecting an output transforms preset will load the specific settings (e.g. Display Primaries, Display White Point, etc.) associated with that preset. When the settings choosen to do not align with a particular preset the output transforms preset will indicate the setup is \"Custom\". \n\nCustom settings may be saved to an external file using the \"Export Settings ...\" button. Custom settings may be loaded from a file using the \"Load Setting ...\" button.\n" T SSTS_Red.presets} | |
addUserKnob {26 ""} | |
addUserKnob {4 primaries l "Primaries / Whitepoint" t "The red, green and blue primaries, or expected encoding, of the display. \"Custom\" allows the user to specify the primaries using the CIE x, y chromaticity coordinates. In the case of a display such as a SMPTE reference digital cinema projector or a Rec.2020 broadcast display the measured display primaries may not actually match those specified in the standards. Regardless, the display expects image data encoded relative to the specified primaries. In this case the encoding primaries (e.g. XYZ or Rec.2020) should be selected." M {DCI-P3 XYZ "ITU-R BT.2020" "ITU-R BT.709" Custom}} | |
addUserKnob {4 white l " " t "The chromaticity of the white point of the display when driven by equal red, green, and blue code values. \"Custom\" allow the user to specify the primaries using the CIE x, y chromaticity coordinates. In the case that the display primaries are set to XYZ this option will be disabled." -STARTLINE M {D60 D65 DCI E Custom "" "" "" "" ""}} | |
addUserKnob {4 eotf l "Transfer Function" t "\nOutput Transform Help\n\nSelecting an output transforms preset will load the specific settings (e.g. Display Primaries, Display White Point, etc.) associated with that preset. When the settings choosen to do not align with a particular preset the output transforms preset will indicate the setup is \"Custom\". Custom settings may be saved to an external file using the \"Export Settings ...\" button. Custom settings may be loaded from a file using the \"Load Setting ...\" button.\nOutput Transform Presets\nElectro-Optical Transfer Function (EOTF) of the display. This is sometimes referred to as \"Display Gamma\". \"Custom\" allows the user to specify the EOTF using either the BT.1886 model or the MonCurve model. The MonCurve model uses a linear segment below the offset point similar to the Rec.709 and sRGB transfer function standards. Either model can be to produce a \"pure\" gamma function by either setting Lb=0 in the BT.1886 model or the offset=0 in the MonCurve model.\n" M {"Gamma 2.6 (g=2.6, scale=48)" "ITU-R BT.1886 (g=2.4, Lw=1, Lb=0)" "DCDM (g=2.6, scale=52.37)" "sRGB (g=2.4, offset=0.055)" "ST 2084" "Hybrid Log-Gamma" Custom "" ""}} | |
addUserKnob {4 tonescale l "Tone Scale" t "The reproduction tone scale to be used within the output transform. \"Custom\" allows the user to specify the display's maximum luminance, display minimum luminance, and a display luminance as which they would like an ACES value of \[0.18 0.18 0.18] to be reproduced. The values specified will be used to calculate a custom reproduction tone scale." M {"Standard Cinema" "HDR 1000 nit" "HDR 2000 nit" "HDR 4000 nit" Custom ""}} | |
addUserKnob {26 ""} | |
addUserKnob {4 restriction l "Gamut Restriction" t "When specified the results will be limited to the primaries specified. This can be useful when using wide gamut encodings such as XYZ or Rec.2020. In those cases the user may wish to limit the range of colors contained within those encodings to a smaller gamut. Limiting the range increases the potential for consistent display across devices with different color reproduction capabilities when using these encodings." M {None DCI-P3 "ITU-R BT.709" "" ""}} | |
restriction "ITU-R BT.709" | |
addUserKnob {4 surround l Surround t "Specifies the surround in which the device associated with the output transfom will be viewed." M {Dim Dark ""}} | |
addUserKnob {26 div l " " t " " T " "} | |
addUserKnob {6 range l "Legal Range" t "The encoding range of the output transform signal. This is usually dictated by the encoding range of the input signal expected by the display device. See SMPTE RP 2077 for detailed definitions of \"Full\" and \"Legal\" (aka Narrow)." +STARTLINE} | |
addUserKnob {6 sim l "D60 Simulation" t "When \"On\", reproduces equal ACES code values (e.g. ACES=\[0.18 0.18 0.18] as D60 regardless of the display's actual white point. For instance, when \"off\" and the display white point is \"D65\" equal ACES code values will be reproduced on a display with a chromaticity of \"D65\". When \"on\" and the display white point is \"D65\" equal ACES code values will be reproduced on a display with a chromaticity of \"D60\". This may be useful when trying to mimic the image appearance of one device on another with a different display white point. Note that using D60 simulation will reduce the maximum luminances of neutrals very slightly to ensure they are reproduced at a chromaticity of D60. Further, the waveform or vectorscope in line with the display signal may indicate neutral objects to have non-equal display code values." -STARTLINE} | |
addUserKnob {6 inverse l Inverse t "Converts output colorimetry to ACES" -STARTLINE} | |
addUserKnob {20 About} | |
addUserKnob {26 notes l "" +STARTLINE T "ACES Output Transform\n\n\n\nyou know... for kids!"} | |
} | |
BackdropNode { | |
inputs 0 | |
name BackdropNode5 | |
tile_color 0x338285ff | |
label "Reference Rendering Transform (RRT) a1.0.3" | |
note_font_size 90 | |
xpos -1226 | |
ypos -1561 | |
bdwidth 1856 | |
bdheight 3631 | |
z_order -1 | |
} | |
BackdropNode { | |
inputs 0 | |
name BackdropNode1 | |
tile_color 0x7f808eff | |
label "ACES Tonescale" | |
note_font_size 100 | |
xpos -741 | |
ypos 333 | |
bdwidth 814 | |
bdheight 659 | |
} | |
BackdropNode { | |
inputs 0 | |
name BackdropNode12 | |
tile_color 0xc9db97ff | |
label "Target Rendering Transform (TRT)" | |
note_font_size 42 | |
xpos -704 | |
ypos 1086 | |
bdwidth 735 | |
bdheight 262 | |
} | |
BackdropNode { | |
inputs 0 | |
name BackdropNode13 | |
tile_color 0xa8a8c6ff | |
label "Display Encoding Transform (DET)" | |
note_font_size 42 | |
xpos -708 | |
ypos 1465 | |
bdwidth 744 | |
bdheight 268 | |
} | |
BackdropNode { | |
inputs 0 | |
name BackdropNode2 | |
tile_color 0x2c2c2cff | |
label "\n// <ACEStransformID>RRT.a1.0.3</ACEStransformID>\n// <ACESuserName>ACES 1.0 - RRT</ACESuserName>\n\n// \n// Reference Rendering Transform (RRT)\n//\n// Input is ACES\n// Output is OCES\n//\n\n\n\nimport \"ACESlib.Utilities\";\nimport \"ACESlib.Transform_Common\";\nimport \"ACESlib.RRT_Common\";\nimport \"ACESlib.Tonescales\";\n\n\n\nvoid main \n( \n input varying float rIn,\n input varying float gIn,\n input varying float bIn,\n input varying float aIn,\n output varying float rOut,\n output varying float gOut,\n output varying float bOut,\n output varying float aOut\n)\n\{\n // --- Initialize a 3-element vector with input variables (ACES) --- //\n float aces\[3] = \{rIn, gIn, bIn\};\n\n // --- Glow module --- //\n float saturation = rgb_2_saturation( aces);\n float ycIn = rgb_2_yc( aces);\n float s = sigmoid_shaper( (saturation - 0.4) / 0.2);\n float addedGlow = 1. + glow_fwd( ycIn, RRT_GLOW_GAIN * s, RRT_GLOW_MID);\n\n aces = mult_f_f3( addedGlow, aces);\n\n // --- Red modifier --- //\n float hue = rgb_2_hue( aces);\n float centeredHue = center_hue( hue, RRT_RED_HUE);\n float hueWeight = cubic_basis_shaper( centeredHue, RRT_RED_WIDTH);\n\n aces\[0] = aces\[0] + hueWeight * saturation * (RRT_RED_PIVOT - aces\[0]) * (1. - RRT_RED_SCALE);\n\n // --- ACES to RGB rendering space --- //\n aces = clamp_f3( aces, 0., HALF_POS_INF); // avoids saturated negative colors from becoming positive in the matrix\n\n float rgbPre\[3] = mult_f3_f44( aces, AP0_2_AP1_MAT);\n\n rgbPre = clamp_f3( rgbPre, 0., HALF_MAX);\n\n // --- Global desaturation --- //\n rgbPre = mult_f3_f33( rgbPre, RRT_SAT_MAT);\n\n // --- Apply the tonescale independently in rendering-space RGB --- //\n float rgbPost\[3];\n rgbPost\[0] = segmented_spline_c5_fwd( rgbPre\[0]);\n rgbPost\[1] = segmented_spline_c5_fwd( rgbPre\[1]);\n rgbPost\[2] = segmented_spline_c5_fwd( rgbPre\[2]);\n\n // --- RGB rendering space to OCES --- //\n float rgbOces\[3] = mult_f3_f44( rgbPost, AP1_2_AP0_MAT);\n\n // Assign OCES RGB to output variables (OCES)\n rOut = rgbOces\[0];\n gOut = rgbOces\[1];\n bOut = rgbOces\[2];\n aOut = aIn;\n\}" | |
note_font_size 30 | |
note_font_color 0xffffffff | |
xpos 658 | |
ypos -1569 | |
bdwidth 2727 | |
bdheight 3971 | |
} | |
BackdropNode { | |
inputs 0 | |
name BackdropNode3 | |
tile_color 0x71c67100 | |
label "Glow Module" | |
note_font_size 42 | |
xpos -939 | |
ypos -1420 | |
bdwidth 315 | |
bdheight 454 | |
} | |
BackdropNode { | |
inputs 0 | |
name BackdropNode4 | |
tile_color 0xaaaaaa00 | |
label "Red Modifier" | |
note_font_size 42 | |
xpos -426 | |
ypos -1180 | |
bdwidth 543 | |
bdheight 1005 | |
} | |
BackdropNode { | |
inputs 0 | |
name BackdropNode6 | |
tile_color 0x93ad6bff | |
label "ACES to RGB Rendering Space" | |
note_font_size 35 | |
xpos -423 | |
ypos -163 | |
bdwidth 544 | |
bdheight 254 | |
} | |
BackdropNode { | |
inputs 0 | |
name BackdropNode7 | |
tile_color 0xcedcffff | |
label "Global Desaturation Matrix" | |
note_font_size 42 | |
xpos -425 | |
ypos 139 | |
bdwidth 558 | |
bdheight 155 | |
} | |
StickyNote { | |
inputs 0 | |
name StickyNote1 | |
label "<l>r + hueWeight * saturation * (0.03 - r) * (1.0 - 0.82)" | |
xpos -198 | |
ypos -348 | |
} | |
StickyNote { | |
inputs 0 | |
name StickyNote3 | |
label "<l>clamps saturation to 16-bit int maximum" | |
xpos -319 | |
ypos 25 | |
} | |
StickyNote { | |
inputs 0 | |
name StickyNote4 | |
label "<l> Apply the tonescale independently in rendering-space RGB\n" | |
xpos -726 | |
ypos 447 | |
} | |
Input { | |
inputs 0 | |
name ACES | |
xpos -419 | |
ypos -1815 | |
} | |
Dot { | |
name Dot42 | |
label ACES | |
note_font_size 160 | |
note_font_color 0xff06c8ff | |
xpos -385 | |
ypos -1690 | |
} | |
Dot { | |
name Dot2 | |
xpos -385 | |
ypos -1438 | |
} | |
set N854a2a0 [stack 0] | |
Dot { | |
name Dot1 | |
xpos -736 | |
ypos -1340 | |
} | |
set N854e970 [stack 0] | |
Expression { | |
temp_name0 TINY | |
temp_expr0 " .0000000001" | |
temp_name1 min_f3 | |
temp_expr1 min(r,min(g,b)) | |
temp_name2 max_f3 | |
temp_expr2 max(r,max(g,b)) | |
channel0 rgba | |
expr0 "(max( max_f3, TINY) - max( min_f3, TINY)) / max( max_f3, 0.01)" | |
name rgb_2_saturation | |
label "line 37" | |
xpos -838 | |
ypos -1296 | |
} | |
set N8553220 [stack 0] | |
Expression { | |
channel0 rgba | |
expr0 "(r - 0.4) / 0.2" | |
name Expression2 | |
xpos -930 | |
ypos -1205 | |
} | |
Expression { | |
temp_name0 t | |
temp_expr0 "max( 1.0 - fabs( r / 2.0), 0.0)" | |
temp_name1 sign | |
temp_expr1 r>0?1:r<0?-1:0 | |
temp_name2 valy | |
temp_expr2 "1.0 + sign * (1.0 - t * t)" | |
channel0 rgba | |
expr0 "valy / 2" | |
name sigmoid_shaper | |
label "line 39" | |
xpos -930 | |
ypos -1181 | |
} | |
Shuffle { | |
red black | |
green black | |
alpha black | |
name Shuffle1 | |
xpos -930 | |
ypos -1145 | |
} | |
push 0 | |
push $N8553220 | |
Shuffle { | |
green black | |
blue black | |
alpha black | |
name Shuffle2 | |
xpos -838 | |
ypos -1147 | |
} | |
push $N854e970 | |
Expression { | |
temp_name0 chroma | |
temp_expr0 sqrt(b*(b-g)+g*(g-r)+r*(r-b)) | |
temp_name1 ycRadiusWeight | |
temp_expr1 1.75 | |
channel0 rgba | |
expr0 "( b + g + r + ycRadiusWeight * chroma) / 3.0" | |
name rgb_2_yc | |
label "line 38" | |
xpos -715 | |
ypos -1293 | |
} | |
Shuffle { | |
red black | |
blue black | |
alpha black | |
name Shuffle3 | |
xpos -715 | |
ypos -1148 | |
} | |
Merge2 { | |
inputs 3+1 | |
operation plus | |
also_merge all | |
name Plus1 | |
xpos -756 | |
ypos -1107 | |
} | |
set N1a0fbd10 [stack 0] | |
Dot { | |
name Dot5 | |
xpos 64 | |
ypos -1104 | |
} | |
Shuffle { | |
green red | |
blue red | |
alpha red | |
name saturation | |
xpos 30 | |
ypos -535 | |
} | |
push $N1a0fbd10 | |
Expression { | |
temp_name0 ycIn | |
temp_expr0 g | |
temp_name1 glowGainIn | |
temp_expr1 "0.05 * b" | |
temp_name2 glowMid | |
temp_expr2 0.08 | |
channel0 alpha | |
expr0 "1 + ( ycIn <= 2./3. * glowMid ? glowGainIn : ycIn >= 2. * glowMid ? 0 : glowGainIn * (glowMid / ycIn - 1./2.) )" | |
name addedGlow | |
label "line 40" | |
xpos -756 | |
ypos -1052 | |
} | |
Shuffle { | |
red alpha | |
green alpha | |
blue alpha | |
name Shuffle4 | |
xpos -756 | |
ypos -994 | |
} | |
push $N854a2a0 | |
Merge2 { | |
inputs 2 | |
operation multiply | |
also_merge all | |
name Multiply | |
label "line 42" | |
xpos -419 | |
ypos -906 | |
} | |
Dot { | |
name Dot6 | |
xpos -385 | |
ypos -870 | |
} | |
set N51d3c10 [stack 0] | |
Dot { | |
name Dot7 | |
xpos -256 | |
ypos -870 | |
} | |
set N51d8650 [stack 0] | |
Dot { | |
name Dot8 | |
xpos -112 | |
ypos -870 | |
} | |
Expression { | |
temp_name0 test | |
temp_expr0 "min((r == g ?1:0),(g == b ?1:0))" | |
temp_name1 hue | |
temp_expr1 "test?nan:(180/pi) * atan2( sqrt(3)*(g-b), 2*r-g-b)" | |
channel0 {rgba.red -rgba.green -rgba.blue -rgba.alpha} | |
expr0 "hue < 0 ? hue + 360 : hue" | |
name rgb_2_hue | |
label "line 45" | |
xpos -146 | |
ypos -812 | |
} | |
Expression { | |
temp_name0 hue | |
temp_expr0 r | |
temp_name1 centerH | |
temp_expr1 0 | |
temp_name2 hueCentered | |
temp_expr2 hue-centerH | |
channel0 {-rgba.red rgba.green -rgba.blue -rgba.alpha} | |
expr0 "hueCentered < -180.0 ? hueCentered + 360.0 : (hueCentered > 180.0) ? hueCentered - 360.0 : hueCentered" | |
name center_hue | |
label "line 46" | |
xpos -146 | |
ypos -753 | |
} | |
Expression { | |
temp_name0 centeredHue | |
temp_expr0 g | |
temp_name1 knot_coord | |
temp_expr1 "(centeredHue - knots0) * 4.0/\[value w]" | |
temp_name2 j | |
temp_expr2 int(knot_coord) | |
temp_name3 t | |
temp_expr3 "knot_coord - j" | |
channel0 {-rgba.red -rgba.green rgba.blue -rgba.alpha} | |
expr0 "(min((centeredHue > knots0?1:0) , (centeredHue < knots4?1:0)) ? j == 3 ? t*t*t * -1./6 + t*t * 3./6 + t * -3./6 + 1 * 1./6 : j == 2 ? t*t*t * 3./6 + t*t * -6./6 + t * 0./6 + 1. *4./6 : j == 1 ? t*t*t * -3./6 + t*t * 3./6 + t * 3./6 + 1. * 1./6 : j == 0 ? t*t*t * 1./6 + t*t * 0./6 + t * 0./6 + 1. * 0./6 : 0 : 0) * 3/2" | |
channel1 none | |
expr1 "min((centeredHue > knots0?1:0) , (centeredHue < knots4?1:0))" | |
channel2 none | |
expr2 int(knot_coord) | |
name cubic_basis_shaper | |
label "line 47" | |
xpos -146 | |
ypos -703 | |
addUserKnob {20 User} | |
addUserKnob {7 w} | |
w 135 | |
addUserKnob {7 knots0} | |
knots0 {{-w/2}} | |
addUserKnob {7 knots1} | |
knots1 {{-w/4}} | |
addUserKnob {7 knots2} | |
addUserKnob {7 knots3} | |
knots3 {{w/4}} | |
addUserKnob {7 knots4} | |
knots4 {{w/2}} | |
} | |
push $N51d8650 | |
Shuffle { | |
green red | |
blue red | |
alpha red | |
name ACESred1 | |
xpos -290 | |
ypos -707 | |
} | |
Copy { | |
inputs 2 | |
from0 rgba.blue | |
to0 rgba.green | |
name Copy2 | |
xpos -290 | |
ypos -626 | |
} | |
Copy { | |
inputs 2 | |
from0 rgba.red | |
to0 rgba.blue | |
name Copy3 | |
xpos -290 | |
ypos -442 | |
} | |
Expression { | |
temp_name0 RRT_RED_PIVOT | |
temp_expr0 0.03 | |
temp_name1 RRT_RED_SCALE | |
temp_expr1 0.82 | |
channel0 rgba | |
expr0 "r + g * b * (RRT_RED_PIVOT - r) * (1. - RRT_RED_SCALE)" | |
name Expression4 | |
label "line 49" | |
xpos -290 | |
ypos -352 | |
} | |
push $N51d3c10 | |
Copy { | |
inputs 2 | |
from0 rgba.red | |
to0 rgba.red | |
name Copy1 | |
xpos -408 | |
ypos -216 | |
} | |
Clamp { | |
maximum 65535 | |
name clamp_f3 | |
label "line 52" | |
xpos -408 | |
ypos -82 | |
} | |
ColorMatrix { | |
matrix { | |
{0.695452 0.140679 0.163869} | |
{0.0447946 0.859671 0.0955343} | |
{-0.00552588 0.00402521 1.0015} | |
} | |
invert true | |
name AP0_to_AP1 | |
label "line 54" | |
xpos -408 | |
ypos -28 | |
} | |
Clamp { | |
maximum 65535 | |
name clamp_f1 | |
label "line 56" | |
xpos -408 | |
ypos 16 | |
} | |
ColorMatrix { | |
matrix { | |
{0.970889 0.0269633 0.00214758} | |
{0.0108892 0.986963 0.00214758} | |
{0.0108892 0.0269633 0.962148} | |
} | |
name ColorMatrix2 | |
label " // --- Global desaturation --- //\n rgbPre = mult_f3_f33( rgbPre, RRT_SAT_MAT)\nline 59" | |
xpos -408 | |
ypos 227 | |
} | |
Dot { | |
name Dot40 | |
xpos -374 | |
ypos 448 | |
} | |
set N3926b680 [stack 0] | |
Group { | |
name SSTS_Green | |
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 0xbff2bf01 | |
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 0x4c0001 | |
xpos -408 | |
ypos 656 | |
addUserKnob {20 tParameters l Parameters} | |
addUserKnob {4 channel l Channel M {Red Green Blue ""}} | |
channel Green | |
addUserKnob {4 presets l Presets M {Custom OCES "Sony BVM-X300" "Dolby PRM-4220" "Dolby Pulsar" "Dolby Cinema" "Standard Cinema"}} | |
addUserKnob {26 ""} | |
addUserKnob {12 min l Min} | |
min {{parent.SSTS_Red.min} {parent.SSTS_Red.min}} | |
addUserKnob {6 calcMin l "Calculate Min ACES Value" -STARTLINE} | |
addUserKnob {12 mid l Mid} | |
mid {{parent.SSTS_Red.mid} {parent.SSTS_Red.mid}} | |
addUserKnob {12 max l Max} | |
max {{parent.SSTS_Red.max} {parent.SSTS_Red.max}} | |
addUserKnob {6 calcMax l "Calculate Max ACES Value" -STARTLINE} | |
addUserKnob {26 ""} | |
addUserKnob {6 calcPctLow l "Calculate Knee" +STARTLINE} | |
addUserKnob {6 calcPctHigh l "Calculate Shoulder" -STARTLINE} | |
addUserKnob {7 pctLow l "Knee %" R 0.14 0.35} | |
pctLow {{parent.SSTS_Red.pctLow}} | |
addUserKnob {7 pctHigh l "Shoulder %" R 0.89 0.91} | |
pctHigh {{parent.SSTS_Red.pctHigh}} | |
addUserKnob {26 ""} | |
addUserKnob {7 minSlope l "Min Slope" R 0 2} | |
minSlope {{parent.SSTS_Red.minSlope}} | |
addUserKnob {7 midSlope l "Mid Slope" R 0 2} | |
midSlope {{parent.SSTS_Red.midSlope}} | |
addUserKnob {7 maxSlope l "Max Slope" R 0 2} | |
maxSlope {{parent.SSTS_Red.maxSlope}} | |
addUserKnob {26 ""} | |
addUserKnob {7 expShift l "Exposure Shift" R -3 3} | |
expShift {{parent.SSTS_Red.expShift}} | |
addUserKnob {26 ""} | |
addUserKnob {6 inv l Inverse +STARTLINE} | |
inv {{parent.SSTS_Red.inv}} | |
addUserKnob {20 tConstraints l Constraints} | |
addUserKnob {26 lowlimits l Low T "(min, max)"} | |
addUserKnob {12 lumLow l Luminance} | |
lumLow {{parent.SSTS_Red.lumLow} {parent.SSTS_Red.lumLow}} | |
addUserKnob {12 stopsLow l Stops} | |
stopsLow {{parent.SSTS_Red.stopsLow} {parent.SSTS_Red.stopsLow}} | |
addUserKnob {12 pctsLow l Percent} | |
pctsLow {{parent.SSTS_Red.pctsLow} {parent.SSTS_Red.pctsLow}} | |
addUserKnob {26 div l " " T " "} | |
addUserKnob {26 highlimits l High T "(min, max)"} | |
addUserKnob {12 lumHigh l Luminance} | |
lumHigh {{parent.SSTS_Red.lumHigh} {parent.SSTS_Red.lumHigh}} | |
addUserKnob {12 stopsHigh l Stops} | |
stopsHigh {{parent.SSTS_Red.stopsHigh} {parent.SSTS_Red.stopsHigh}} | |
addUserKnob {12 pctsHigh l Percent} | |
pctsHigh {{parent.SSTS_Red.pctsHigh} {parent.SSTS_Red.pctsHigh}} | |
addUserKnob {20 tCoefficients l Coefficients} | |
addUserKnob {7 coefsLow0 R -4 4} | |
coefsLow0 {{parent.SSTS_Red.coefsLow0}} | |
addUserKnob {7 coefsLow1 R -4 4} | |
coefsLow1 {{parent.SSTS_Red.coefsLow1}} | |
addUserKnob {7 coefsLow2 R -4 4} | |
coefsLow2 {{parent.SSTS_Red.coefsLow2}} | |
addUserKnob {7 coefsLow3 R -4 4} | |
coefsLow3 {{parent.SSTS_Red.coefsLow3}} | |
addUserKnob {7 coefsLow4 R -4 4} | |
coefsLow4 {{parent.SSTS_Red.coefsLow4}} | |
addUserKnob {26 div2 l " " T " "} | |
addUserKnob {7 coefsHigh0 R -4 4} | |
coefsHigh0 {{parent.SSTS_Red.coefsHigh0}} | |
addUserKnob {7 coefsHigh1 R -4 4} | |
coefsHigh1 {{parent.SSTS_Red.coefsHigh1}} | |
addUserKnob {7 coefsHigh2 R -4 4} | |
coefsHigh2 {{parent.SSTS_Red.coefsHigh2}} | |
addUserKnob {7 coefsHigh3 R -4 4} | |
coefsHigh3 {{parent.SSTS_Red.coefsHigh3}} | |
addUserKnob {7 coefsHigh4 R -4 4} | |
coefsHigh4 {{parent.SSTS_Red.coefsHigh4}} | |
addUserKnob {20 Knots} | |
addUserKnob {3 N_KNOTS +DISABLED} | |
N_KNOTS 4 | |
addUserKnob {7 knotIncLow +DISABLED} | |
knotIncLow 0.6522316573 | |
addUserKnob {7 knotIncHigh +DISABLED} | |
knotIncHigh 1.853665105 | |
addUserKnob {26 ""} | |
addUserKnob {7 knotYLow0} | |
knotYLow0 {{parent.SSTS_Red.knotYLow0}} | |
addUserKnob {7 knotYLow1} | |
knotYLow1 {{parent.SSTS_Red.knotYLow1}} | |
addUserKnob {7 knotYLow2} | |
knotYLow2 {{parent.SSTS_Red.knotYLow2}} | |
addUserKnob {7 knotYLow3} | |
knotYLow3 {{parent.SSTS_Red.knotYLow3}} | |
addUserKnob {26 div3 l " " T " "} | |
addUserKnob {7 knotYHigh0} | |
knotYHigh0 {{parent.SSTS_Red.knotYHigh0}} | |
addUserKnob {7 knotYHigh1} | |
knotYHigh1 {{parent.SSTS_Red.knotYHigh1}} | |
addUserKnob {7 knotYHigh2} | |
knotYHigh2 {{parent.SSTS_Red.knotYHigh2}} | |
addUserKnob {7 knotYHigh3} | |
knotYHigh3 {{parent.SSTS_Red.knotYHigh3}} | |
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 Ne4d3b600 [stack 0] | |
Dot { | |
name Dot32 | |
xpos -3929 | |
ypos -1219 | |
} | |
Dot { | |
name Dot31 | |
xpos -3929 | |
ypos 1490 | |
} | |
push $Ne4d3b600 | |
Dot { | |
name Dot29 | |
xpos -1267 | |
ypos -1102 | |
} | |
set Ne4d49000 [stack 0] | |
Shuffle { | |
red blue | |
green blue | |
name blue | |
tile_color 0x55bfffff | |
xpos -1207 | |
ypos -1042 | |
} | |
push $Ne4d49000 | |
Shuffle { | |
red green | |
blue green | |
alpha white | |
name green | |
tile_color 0xff3fff | |
xpos -1301 | |
ypos -1043 | |
} | |
push $Ne4d49000 | |
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 N1a5558b0 [stack 0] | |
Dot { | |
name Dot27 | |
xpos -652 | |
ypos -301 | |
} | |
Dot { | |
name Dot8 | |
xpos -652 | |
ypos -261 | |
} | |
set N1a55ea90 [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 N876eca30 [stack 0] | |
Dot { | |
name Dot6 | |
xpos -589 | |
ypos -88 | |
} | |
set N876f15a0 [stack 0] | |
Shuffle { | |
red blue | |
green blue | |
alpha blue | |
name inv_indexHighHalf | |
label highlights | |
xpos -623 | |
ypos -46 | |
} | |
push $N1a55ea90 | |
Dot { | |
name Dot9 | |
xpos -261 | |
ypos -261 | |
} | |
set N87706220 [stack 0] | |
Dot { | |
name Dot10 | |
xpos 26 | |
ypos -261 | |
} | |
set N8770aa40 [stack 0] | |
Dot { | |
name Dot11 | |
xpos 345 | |
ypos -261 | |
} | |
set N3cbb0f80 [stack 0] | |
Dot { | |
name Dot15 | |
xpos 345 | |
ypos -223 | |
} | |
set N3cbb5970 [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 $N3cbb5970 | |
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 $N876eca30 | |
Dot { | |
name Dot7 | |
xpos -722 | |
ypos -88 | |
} | |
set N982350 [stack 0] | |
Shuffle { | |
red green | |
blue green | |
alpha green | |
name inv_indexLowHalf | |
label shadows | |
xpos -756 | |
ypos -47 | |
} | |
push $N8770aa40 | |
Dot { | |
name Dot13 | |
xpos 26 | |
ypos -243 | |
} | |
set N996d10 [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 $N996d10 | |
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 $N982350 | |
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 $N87706220 | |
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 $N876f15a0 | |
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 $N3cbb0f80 | |
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 $N1a5558b0 | |
Dot { | |
name Dot1 | |
xpos -3138 | |
ypos -232 | |
} | |
set N1a983870 [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 N1a9a06b0 [stack 0] | |
Dot { | |
name Dot16 | |
xpos -3075 | |
ypos -59 | |
} | |
set N1a9a4d30 [stack 0] | |
Shuffle { | |
red blue | |
green blue | |
alpha blue | |
name indexHighHalf | |
label highlights | |
xpos -3109 | |
ypos -24 | |
} | |
push $N1a983870 | |
Dot { | |
name Dot17 | |
xpos -2747 | |
ypos -232 | |
} | |
set N398630b0 [stack 0] | |
Dot { | |
name Dot18 | |
xpos -2460 | |
ypos -232 | |
} | |
set N398677e0 [stack 0] | |
Dot { | |
name Dot19 | |
xpos -2141 | |
ypos -232 | |
} | |
set N3986bd20 [stack 0] | |
Dot { | |
name Dot20 | |
xpos -2141 | |
ypos -193 | |
} | |
set N39870980 [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 $N39870980 | |
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 $N1a9a06b0 | |
Dot { | |
name Dot21 | |
xpos -3208 | |
ypos -59 | |
} | |
set N1c797a60 [stack 0] | |
Shuffle { | |
red green | |
blue green | |
alpha green | |
name indexLowHalf | |
label shadows | |
xpos -3242 | |
ypos -28 | |
} | |
push $N398677e0 | |
Dot { | |
name Dot22 | |
xpos -2460 | |
ypos -207 | |
} | |
set N1c7ac6d0 [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 $N1c7ac6d0 | |
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 $N1c797a60 | |
Dot { | |
name Dot23 | |
xpos -3321 | |
ypos -59 | |
} | |
Shuffle { | |
green red | |
blue red | |
alpha red | |
name indexLow | |
label "low extension" | |
xpos -3355 | |
ypos -31 | |
} | |
push $N398630b0 | |
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 $N1a9a4d30 | |
Dot { | |
name Dot25 | |
xpos -2965 | |
ypos -59 | |
} | |
Shuffle { | |
red alpha | |
green alpha | |
blue alpha | |
name indexHigh | |
label "high extension" | |
xpos -2999 | |
ypos -23 | |
} | |
push $N3986bd20 | |
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 Nbcfc9030 [stack 0] | |
Shuffle { | |
red black | |
green black | |
alpha black | |
name blue1 | |
tile_color 0xffffff | |
xpos -1186 | |
ypos 1376 | |
} | |
push $Nbcfc9030 | |
Shuffle { | |
red black | |
blue black | |
alpha black | |
name green1 | |
tile_color 0xff3fff | |
xpos -1269 | |
ypos 1375 | |
} | |
push $Nbcfc9030 | |
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 | |
push 0 | |
push $N3926b680 | |
Group { | |
name SSTS_Red | |
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 | |
xpos -546 | |
ypos 647 | |
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.38 | |
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 {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 Nd4d7fc40 [stack 0] | |
Dot { | |
name Dot32 | |
xpos -3929 | |
ypos -1219 | |
} | |
Dot { | |
name Dot31 | |
xpos -3929 | |
ypos 1490 | |
} | |
push $Nd4d7fc40 | |
Dot { | |
name Dot29 | |
xpos -1267 | |
ypos -1102 | |
} | |
set Nd4d8d640 [stack 0] | |
Shuffle { | |
red blue | |
green blue | |
name blue | |
tile_color 0x55bfffff | |
xpos -1207 | |
ypos -1042 | |
} | |
push $Nd4d8d640 | |
Shuffle { | |
red green | |
blue green | |
alpha white | |
name green | |
tile_color 0xff3fff | |
xpos -1301 | |
ypos -1043 | |
} | |
push $Nd4d8d640 | |
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 N3da100 [stack 0] | |
Dot { | |
name Dot27 | |
xpos -652 | |
ypos -301 | |
} | |
Dot { | |
name Dot8 | |
xpos -652 | |
ypos -261 | |
} | |
set N3e32e0 [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 Nb38ce0 [stack 0] | |
Dot { | |
name Dot6 | |
xpos -589 | |
ypos -88 | |
} | |
set Nb3cd70 [stack 0] | |
Shuffle { | |
red blue | |
green blue | |
alpha blue | |
name inv_indexHighHalf | |
label highlights | |
xpos -623 | |
ypos -46 | |
} | |
push $N3e32e0 | |
Dot { | |
name Dot9 | |
xpos -261 | |
ypos -261 | |
} | |
set Nb51a50 [stack 0] | |
Dot { | |
name Dot10 | |
xpos 26 | |
ypos -261 | |
} | |
set Nb56270 [stack 0] | |
Dot { | |
name Dot11 | |
xpos 345 | |
ypos -261 | |
} | |
set Nb5ab80 [stack 0] | |
Dot { | |
name Dot15 | |
xpos 345 | |
ypos -223 | |
} | |
set Nb5f5d0 [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 $Nb5f5d0 | |
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 $Nb38ce0 | |
Dot { | |
name Dot7 | |
xpos -722 | |
ypos -88 | |
} | |
set N84da630 [stack 0] | |
Shuffle { | |
red green | |
blue green | |
alpha green | |
name inv_indexLowHalf | |
label shadows | |
xpos -756 | |
ypos -47 | |
} | |
push $Nb56270 | |
Dot { | |
name Dot13 | |
xpos 26 | |
ypos -243 | |
} | |
set N84eeff0 [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 $N84eeff0 | |
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 $N84da630 | |
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 $Nb51a50 | |
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 $Nb3cd70 | |
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 $Nb5ab80 | |
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 $N3da100 | |
Dot { | |
name Dot1 | |
xpos -3138 | |
ypos -232 | |
} | |
set N19763d80 [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 N19780bc0 [stack 0] | |
Dot { | |
name Dot16 | |
xpos -3075 | |
ypos -59 | |
} | |
set N19785240 [stack 0] | |
Shuffle { | |
red blue | |
green blue | |
alpha blue | |
name indexHighHalf | |
label highlights | |
xpos -3109 | |
ypos -24 | |
} | |
push $N19763d80 | |
Dot { | |
name Dot17 | |
xpos -2747 | |
ypos -232 | |
} | |
set N19799e50 [stack 0] | |
Dot { | |
name Dot18 | |
xpos -2460 | |
ypos -232 | |
} | |
set N1979e730 [stack 0] | |
Dot { | |
name Dot19 | |
xpos -2141 | |
ypos -232 | |
} | |
set N197a2c60 [stack 0] | |
Dot { | |
name Dot20 | |
xpos -2141 | |
ypos -193 | |
} | |
set N197a78c0 [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 $N197a78c0 | |
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 $N19780bc0 | |
Dot { | |
name Dot21 | |
xpos -3208 | |
ypos -59 | |
} | |
set N18b96430 [stack 0] | |
Shuffle { | |
red green | |
blue green | |
alpha green | |
name indexLowHalf | |
label shadows | |
xpos -3242 | |
ypos -28 | |
} | |
push $N1979e730 | |
Dot { | |
name Dot22 | |
xpos -2460 | |
ypos -207 | |
} | |
set N18bab0a0 [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 $N18bab0a0 | |
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 $N18b96430 | |
Dot { | |
name Dot23 | |
xpos -3321 | |
ypos -59 | |
} | |
Shuffle { | |
green red | |
blue red | |
alpha red | |
name indexLow | |
label "low extension" | |
xpos -3355 | |
ypos -31 | |
} | |
push $N19799e50 | |
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 $N19785240 | |
Dot { | |
name Dot25 | |
xpos -2965 | |
ypos -59 | |
} | |
Shuffle { | |
red alpha | |
green alpha | |
blue alpha | |
name indexHigh | |
label "high extension" | |
xpos -2999 | |
ypos -23 | |
} | |
push $N197a2c60 | |
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 N145a7170 [stack 0] | |
Shuffle { | |
red black | |
green black | |
alpha black | |
name blue1 | |
tile_color 0xffffff | |
xpos -1186 | |
ypos 1376 | |
} | |
push $N145a7170 | |
Shuffle { | |
red black | |
blue black | |
alpha black | |
name green1 | |
tile_color 0xff3fff | |
xpos -1269 | |
ypos 1375 | |
} | |
push $N145a7170 | |
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 | |
push $N3926b680 | |
Group { | |
name SSTS_Blue | |
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 0xbfbff201 | |
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 0x2fd01 | |
xpos -271 | |
ypos 654 | |
addUserKnob {20 tParameters l Parameters} | |
addUserKnob {4 channel l Channel M {Red Green Blue ""}} | |
channel Blue | |
addUserKnob {4 presets l Presets M {Custom OCES "Sony BVM-X300" "Dolby PRM-4220" "Dolby Pulsar" "Dolby Cinema" "Standard Cinema"}} | |
addUserKnob {26 ""} | |
addUserKnob {12 min l Min} | |
min {{parent.SSTS_Red.min} {parent.SSTS_Red.min}} | |
addUserKnob {6 calcMin l "Calculate Min ACES Value" -STARTLINE} | |
addUserKnob {12 mid l Mid} | |
mid {{parent.SSTS_Red.mid} {parent.SSTS_Red.mid}} | |
addUserKnob {12 max l Max} | |
max {{parent.SSTS_Red.max} {parent.SSTS_Red.max}} | |
addUserKnob {6 calcMax l "Calculate Max ACES Value" -STARTLINE} | |
addUserKnob {26 ""} | |
addUserKnob {6 calcPctLow l "Calculate Knee" +STARTLINE} | |
addUserKnob {6 calcPctHigh l "Calculate Shoulder" -STARTLINE} | |
addUserKnob {7 pctLow l "Knee %" R 0.14 0.35} | |
pctLow {{parent.SSTS_Red.pctLow}} | |
addUserKnob {7 pctHigh l "Shoulder %" R 0.89 0.91} | |
pctHigh {{parent.SSTS_Red.pctHigh}} | |
addUserKnob {26 ""} | |
addUserKnob {7 minSlope l "Min Slope" R 0 2} | |
minSlope {{parent.SSTS_Red.minSlope}} | |
addUserKnob {7 midSlope l "Mid Slope" R 0 2} | |
midSlope {{parent.SSTS_Red.midSlope}} | |
addUserKnob {7 maxSlope l "Max Slope" R 0 2} | |
maxSlope {{parent.SSTS_Red.maxSlope}} | |
addUserKnob {26 ""} | |
addUserKnob {7 expShift l "Exposure Shift" R -3 3} | |
expShift {{parent.SSTS_Red.expShift}} | |
addUserKnob {26 ""} | |
addUserKnob {6 inv l Inverse +STARTLINE} | |
inv {{parent.SSTS_Red.inv}} | |
addUserKnob {20 tConstraints l Constraints} | |
addUserKnob {26 lowlimits l Low T "(min, max)"} | |
addUserKnob {12 lumLow l Luminance} | |
lumLow {{parent.SSTS_Red.lumLow} {parent.SSTS_Red.lumLow}} | |
addUserKnob {12 stopsLow l Stops} | |
stopsLow {{parent.SSTS_Red.stopsLow} {parent.SSTS_Red.stopsLow}} | |
addUserKnob {12 pctsLow l Percent} | |
pctsLow {{parent.SSTS_Red.pctsLow} {parent.SSTS_Red.pctsLow}} | |
addUserKnob {26 div l " " T " "} | |
addUserKnob {26 highlimits l High T "(min, max)"} | |
addUserKnob {12 lumHigh l Luminance} | |
lumHigh {{parent.SSTS_Red.lumHigh} {parent.SSTS_Red.lumHigh}} | |
addUserKnob {12 stopsHigh l Stops} | |
stopsHigh {{parent.SSTS_Red.stopsHigh} {parent.SSTS_Red.stopsHigh}} | |
addUserKnob {12 pctsHigh l Percent} | |
pctsHigh {{parent.SSTS_Red.pctsHigh} {parent.SSTS_Red.pctsHigh}} | |
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 {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 N1388c3b0 [stack 0] | |
Dot { | |
name Dot32 | |
xpos -3929 | |
ypos -1219 | |
} | |
Dot { | |
name Dot31 | |
xpos -3929 | |
ypos 1490 | |
} | |
push $N1388c3b0 | |
Dot { | |
name Dot29 | |
xpos -1267 | |
ypos -1102 | |
} | |
set N13899db0 [stack 0] | |
Shuffle { | |
red blue | |
green blue | |
name blue | |
tile_color 0x55bfffff | |
xpos -1207 | |
ypos -1042 | |
} | |
push $N13899db0 | |
Shuffle { | |
red green | |
blue green | |
alpha white | |
name green | |
tile_color 0xff3fff | |
xpos -1301 | |
ypos -1043 | |
} | |
push $N13899db0 | |
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 N86e1ac70 [stack 0] | |
Dot { | |
name Dot27 | |
xpos -652 | |
ypos -301 | |
} | |
Dot { | |
name Dot8 | |
xpos -652 | |
ypos -261 | |
} | |
set N86e23e50 [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 N86e40da0 [stack 0] | |
Dot { | |
name Dot6 | |
xpos -589 | |
ypos -88 | |
} | |
set N86e45910 [stack 0] | |
Shuffle { | |
red blue | |
green blue | |
alpha blue | |
name inv_indexHighHalf | |
label highlights | |
xpos -623 | |
ypos -46 | |
} | |
push $N86e23e50 | |
Dot { | |
name Dot9 | |
xpos -261 | |
ypos -261 | |
} | |
set N86e5a590 [stack 0] | |
Dot { | |
name Dot10 | |
xpos 26 | |
ypos -261 | |
} | |
set N86e5edb0 [stack 0] | |
Dot { | |
name Dot11 | |
xpos 345 | |
ypos -261 | |
} | |
set N86e636c0 [stack 0] | |
Dot { | |
name Dot15 | |
xpos 345 | |
ypos -223 | |
} | |
set N869fa1b0 [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 $N869fa1b0 | |
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 $N86e40da0 | |
Dot { | |
name Dot7 | |
xpos -722 | |
ypos -88 | |
} | |
set N86a47a10 [stack 0] | |
Shuffle { | |
red green | |
blue green | |
alpha green | |
name inv_indexLowHalf | |
label shadows | |
xpos -756 | |
ypos -47 | |
} | |
push $N86e5edb0 | |
Dot { | |
name Dot13 | |
xpos 26 | |
ypos -243 | |
} | |
set N86a5c3d0 [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 $N86a5c3d0 | |
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 $N86a47a10 | |
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 $N86e5a590 | |
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 $N86e45910 | |
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 $N86e636c0 | |
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 $N86e1ac70 | |
Dot { | |
name Dot1 | |
xpos -3138 | |
ypos -232 | |
} | |
set Ne41b7a80 [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 Ne41d48c0 [stack 0] | |
Dot { | |
name Dot16 | |
xpos -3075 | |
ypos -59 | |
} | |
set Ne41d8f40 [stack 0] | |
Shuffle { | |
red blue | |
green blue | |
alpha blue | |
name indexHighHalf | |
label highlights | |
xpos -3109 | |
ypos -24 | |
} | |
push $Ne41b7a80 | |
Dot { | |
name Dot17 | |
xpos -2747 | |
ypos -232 | |
} | |
set Ne41edb50 [stack 0] | |
Dot { | |
name Dot18 | |
xpos -2460 | |
ypos -232 | |
} | |
set Ne41f2430 [stack 0] | |
Dot { | |
name Dot19 | |
xpos -2141 | |
ypos -232 | |
} | |
set Ne41f6960 [stack 0] | |
Dot { | |
name Dot20 | |
xpos -2141 | |
ypos -193 | |
} | |
set Ne41fb5c0 [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 $Ne41fb5c0 | |
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 $Ne41d48c0 | |
Dot { | |
name Dot21 | |
xpos -3208 | |
ypos -59 | |
} | |
set Nd43c8fd0 [stack 0] | |
Shuffle { | |
red green | |
blue green | |
alpha green | |
name indexLowHalf | |
label shadows | |
xpos -3242 | |
ypos -28 | |
} | |
push $Ne41f2430 | |
Dot { | |
name Dot22 | |
xpos -2460 | |
ypos -207 | |
} | |
set Nd43ddc40 [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 $Nd43ddc40 | |
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 $Nd43c8fd0 | |
Dot { | |
name Dot23 | |
xpos -3321 | |
ypos -59 | |
} | |
Shuffle { | |
green red | |
blue red | |
alpha red | |
name indexLow | |
label "low extension" | |
xpos -3355 | |
ypos -31 | |
} | |
push $Ne41edb50 | |
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 $Ne41d8f40 | |
Dot { | |
name Dot25 | |
xpos -2965 | |
ypos -59 | |
} | |
Shuffle { | |
red alpha | |
green alpha | |
blue alpha | |
name indexHigh | |
label "high extension" | |
xpos -2999 | |
ypos -23 | |
} | |
push $Ne41f6960 | |
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 Nd41c0510 [stack 0] | |
Shuffle { | |
red black | |
green black | |
alpha black | |
name blue1 | |
tile_color 0xffffff | |
xpos -1186 | |
ypos 1376 | |
} | |
push $Nd41c0510 | |
Shuffle { | |
red black | |
blue black | |
alpha black | |
name green1 | |
tile_color 0xff3fff | |
xpos -1269 | |
ypos 1375 | |
} | |
push $Nd41c0510 | |
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 | |
Merge2 { | |
inputs 3+1 | |
operation plus | |
Achannels {rgba.red rgba.green rgba.blue -rgba.alpha} | |
also_merge all | |
name Plus5 | |
xpos -408 | |
ypos 941 | |
} | |
Expression { | |
temp_name0 CINEMA_BLACK | |
temp_expr0 pow(10,log10(0.02)) | |
temp_name1 CINEMA_WHITE | |
temp_expr1 48 | |
expr0 "(r - CINEMA_BLACK) / (CINEMA_WHITE - CINEMA_BLACK)" | |
expr1 "(g - CINEMA_BLACK) / (CINEMA_WHITE - CINEMA_BLACK)" | |
expr2 "(b - CINEMA_BLACK) / (CINEMA_WHITE - CINEMA_BLACK)" | |
name Y_2_linCV | |
label " // Scale luminance to linear code value\n float linearCV\[3];\n linearCV\[0] = Y_2_linCV( rgbPost\[0], CINEMA_WHITE, CINEMA_BLACK);\n linearCV\[1] = Y_2_linCV( rgbPost\[1], CINEMA_WHITE, CINEMA_BLACK);\n linearCV\[2] = Y_2_linCV( rgbPost\[2], CINEMA_WHITE, CINEMA_BLACK);" | |
xpos -408 | |
ypos 1186 | |
} | |
ColorMatrix { | |
matrix { | |
{0.6624541811 0.1340042065 0.156187687} | |
{0.2722287168 0.6740817658 0.0536895174} | |
{0.0055746495 0.0040607335 1.0103391} | |
} | |
name AP1_to_XYZ | |
label " // Rendering space RGB to XYZ\n float XYZ\[3] = mult_f3_f44( linearCV, AP1_2_XYZ_MAT);" | |
xpos -408 | |
ypos 1283 | |
} | |
ColorMatrix { | |
matrix { | |
{2.402741414 -0.8974841639 -0.38805337} | |
{-0.8325796487 1.769231754 0.0237127115} | |
{0.0388233815 -0.0824996856 1.0363686} | |
} | |
name XYZ_to_P3_D60 | |
label " // CIE XYZ to display primaries\n linearCV = mult_f3_f44( XYZ, XYZ_2_DISPLAY_PRI_MAT);" | |
xpos -408 | |
ypos 1549 | |
} | |
Clamp { | |
channels rgb | |
name Clip_Gamut | |
label " // Handle out-of-gamut values\n // Clip values < 0 or > 1 (i.e. projecting outside the display primaries)\n linearCV = clamp_f3( linearCV, 0., 1.);\n " | |
xpos -408 | |
ypos 1599 | |
} | |
Expression { | |
temp_name0 DISPGAMMA | |
temp_expr0 2.6 | |
expr0 "pow( r, 1./ DISPGAMMA)" | |
expr1 "pow( g, 1./ DISPGAMMA)" | |
expr2 "pow( b, 1./ DISPGAMMA)" | |
channel3 {none none none -rgba.alpha} | |
name encode_linCV_with_transfer_function | |
label " // Encode linear code values with transfer function\n float outputCV\[3] = pow_f3( linearCV, 1./ DISPGAMMA);" | |
xpos -408 | |
ypos 1661 | |
} | |
set Ncc3d1c10 [stack 0] | |
push $N854a2a0 | |
Dot { | |
name Dot3 | |
xpos 372 | |
ypos -1244 | |
} | |
Dot { | |
name Dot4 | |
xpos 372 | |
ypos 1726 | |
} | |
Copy { | |
inputs 2 | |
from0 -rgba.alpha | |
to0 -rgba.alpha | |
channels rgb | |
name Copy4 | |
xpos -408 | |
ypos 1832 | |
} | |
Output { | |
name Output1 | |
xpos -408 | |
ypos 2322 | |
} | |
StickyNote { | |
inputs 0 | |
name StickyNote2 | |
label "<l>prevents saturated negative colors from becoming positive in the AP0 to AP1 matrix\n\n," | |
xpos -323 | |
ypos -83 | |
} | |
push $Ncc3d1c10 | |
Viewer { | |
frame_range 1-100 | |
viewerProcess "None (rec709)" | |
name Viewer1 | |
xpos -1077 | |
ypos 2274 | |
} | |
end_group |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment