Last active
February 23, 2021 06:08
-
-
Save KelSolaar/4e52d68329fefba871e288584b3f9481 to your computer and use it in GitHub Desktop.
HSV - Pseudo RRT
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 12.1 v1 | |
push $cut_paste_input | |
Colorspace { | |
illuminant_in ACES | |
primary_in ACES | |
bradford_matrix true | |
name ACES_to_sRGB_Colorspace | |
selected true | |
xpos -193 | |
ypos -394 | |
} | |
Group { | |
name HSV_Pseudo_RRT | |
selected true | |
xpos -193 | |
ypos -366 | |
} | |
Input { | |
inputs 0 | |
name Input | |
xpos -18 | |
ypos -171 | |
} | |
Expression { | |
temp_name0 cmax | |
temp_expr0 max(r,g,b) | |
temp_name1 cmin | |
temp_expr1 min(r,g,b) | |
temp_name2 delta | |
temp_expr2 cmax-cmin | |
expr0 delta==0?0:cmax==r?(((g-b)/delta+6)%6)/6:cmax==g?(((b-r)/delta+2)/6):(((r-g)/delta+4)/6) | |
expr1 "cmax == 0 ? 0 : delta / cmax" | |
expr2 cmax | |
name RGB_to_HSV | |
note_font "Bitstream Vera Sans" | |
xpos -18 | |
ypos -137 | |
} | |
set N6e6c9c00 [stack 0] | |
Shuffle2 { | |
fromInput1 {{0} B} | |
fromInput2 {{0} B} | |
mappings "4 rgba.blue 0 2 rgba.blue 0 2 rgba.alpha 0 3 rgba.alpha 0 3 rgba.blue 0 2 rgba.green 0 1 rgba.blue 0 2 rgba.red 0 0" | |
name ValueExtract_Shuffle | |
xpos 87 | |
ypos -137 | |
} | |
Grade { | |
white 0.7 | |
gamma 1.5 | |
black_clamp false | |
name Grade | |
xpos 87 | |
ypos -93 | |
} | |
OCIOColorSpace { | |
in_colorspace scene_linear | |
out_colorspace "Output - sRGB" | |
name RRT_OCIOColorSpace | |
xpos 87 | |
ypos -45 | |
} | |
Colorspace { | |
colorspace_in sRGB | |
name EOTF_Colorspace | |
xpos 87 | |
ypos -21 | |
} | |
set N6e6c9000 [stack 0] | |
Gamma { | |
value 0.25 | |
name WhiteBias_Gamma | |
xpos 87 | |
ypos 2 | |
} | |
push $N6e6c9000 | |
push $N6e6c9c00 | |
Shuffle2 { | |
inputs 2 | |
fromInput1 {{0} B A} | |
fromInput2 {{1} B A} | |
in2 rgba | |
mappings "4 rgba.red 0 0 rgba.red 0 0 rgba.green 0 1 rgba.green 0 1 rgba.alpha 0 3 rgba.alpha 0 3 rgba.red 1 0 rgba.blue 0 2" | |
name Value_Shuffle | |
xpos -18 | |
ypos -22 | |
} | |
Shuffle2 { | |
inputs 2 | |
fromInput1 {{0} B A} | |
fromInput2 {{1} B A} | |
in2 rgba | |
mappings "4 rgba.red 0 0 rgba.red 0 0 rgba.green 0 1 rgba.green 0 1 rgba.blue 0 2 rgba.blue 0 2 rgba.red 1 0 rgba.alpha 0 3" | |
name WhiteMask_Shuffle | |
xpos -18 | |
ypos 6 | |
} | |
Expression { | |
expr1 "g * (1 - a)" | |
name PathToWhite_Expression | |
xpos -18 | |
ypos 36 | |
} | |
Expression { | |
expr1 "g > a_Floating_Point_Slider ? a_Floating_Point_Slider + b_Floating_Point_Slider * tanh((g - a_Floating_Point_Slider) / b_Floating_Point_Slider) : g" | |
name Compression_Expression | |
xpos -18 | |
ypos 60 | |
addUserKnob {20 User} | |
addUserKnob {7 a_Floating_Point_Slider l a} | |
a_Floating_Point_Slider 0.8 | |
addUserKnob {7 b_Floating_Point_Slider l b} | |
b_Floating_Point_Slider {{"1 - a_Floating_Point_Slider"}} | |
} | |
Expression { | |
expr0 "r % 1" | |
name HueProtect_Expression | |
xpos -18 | |
ypos 84 | |
} | |
Expression { | |
temp_name0 C | |
temp_expr0 b*g | |
temp_name1 X | |
temp_expr1 C*(1-abs((r*6)%2-1)) | |
temp_name2 m | |
temp_expr2 b-C | |
expr0 (r<1/6?C:r<2/6?X:r<3/6?0:r<4/6?0:r<5/6?X:C)+m | |
expr1 (r<1/6?X:r<2/6?C:r<3/6?C:r<4/6?X:r<5/6?0:0)+m | |
expr2 (r<1/6?0:r<2/6?0:r<3/6?X:r<4/6?C:r<5/6?C:X)+m | |
name HSV_to_RGB | |
note_font "Bitstream Vera Sans" | |
xpos -18 | |
ypos 103 | |
} | |
set N6e703400 [stack 0] | |
Output { | |
name Output | |
xpos -18 | |
ypos 203 | |
} | |
push $N6e703400 | |
Viewer { | |
frame 21 | |
frame_range 1-120 | |
name Viewer1 | |
xpos -18 | |
ypos 156 | |
} | |
end_group | |
Colorspace { | |
colorspace_out sRGB | |
name Inverse_EOTF_Colorspace | |
selected true | |
xpos -193 | |
ypos -342 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment