Skip to content

Instantly share code, notes, and snippets.

@draconiansolo
Last active August 29, 2015 13:57
Show Gist options
  • Save draconiansolo/9683780 to your computer and use it in GitHub Desktop.
Save draconiansolo/9683780 to your computer and use it in GitHub Desktop.
Picky Keyer
set cut_paste_input [stack 0]
version 7.0 v9
push $cut_paste_input
Group {
name PickyKeyer1
help "<i>Of despair</i>\nv0.5(PoC)\n\nAdd several layers of pickers with keyers that merge automatically. Fun!\nProof of concept version.\nBased on a random conversation between Nico and Owen"
tile_color 0xff9fff
selected true
xpos -6049
ypos -895
addUserKnob {20 User}
addUserKnob {41 picker T Expression1.picker}
addUserKnob {7 keyDissolve l IBK/Keylight}
addUserKnob {3 referenceFrame}
referenceFrame 1022
addUserKnob {7 weight l gain}
}
Input {
inputs 0
name pick_from
xpos -448
ypos -730
number 2
}
Expression {
expr0 r
expr1 g
expr2 b
channel3 mask
expr3 hypot((picker.x-x),(picker.y-y))/(width)
name Expression1
xpos -448
ypos -610
addUserKnob {20 User}
addUserKnob {18 pickColor}
pickColor {{"\[sample this red picker.x picker.y]"} {"\[sample this green picker.x picker.y]"} {"\[sample this blue picker.x picker.y]"}}
addUserKnob {12 picker}
picker {1790 228}
}
Multiply {
channels mask
value {{1-parent.weight}}
name Multiply1
xpos -448
ypos -544
}
Input {
inputs 0
name fg
xpos -616
ypos -706
}
ShuffleCopy {
inputs 2
in mask
red red
out mask
name ShuffleCopy2
label "\[value in] to \[value out]"
xpos -616
ypos -496
}
Dot {
name Dot9
xpos -582
ypos -366
}
set Nb20dfa0 [stack 0]
Dot {
name Dot1
xpos -438
ypos -366
}
set N5b88cd30 [stack 0]
Dot {
name Dot11
xpos -222
ypos -366
}
Constant {
inputs 0
channels rgb
color {{parent.Expression1.pickColor} {parent.Expression1.pickColor} {parent.Expression1.pickColor} {parent.Expression1.pickColor}}
name Constant1
xpos -184
ypos -489
}
push 0
AdditiveKeyer_FS {
inputs 3
name AdditiveKeyer_FS1
xpos -184
ypos -226
}
Input {
inputs 0
name Layers
xpos -1144
ypos -34
number 1
}
Constant {
inputs 0
channels mask
color 1
name Constant4
xpos -1048
ypos 33
}
Switch {
inputs 2
which {{"\[exists parent.input1] "}}
name Switch1
xpos -1144
ypos 230
}
Dot {
name Dot2
xpos -1110
ypos 378
}
Dot {
name Dot3
xpos -846
ypos 378
}
set N1f499be0 [stack 0]
Shuffle {
in2 mask
red alpha
green alpha
blue alpha
alpha red2
name Shuffle2
label "\[value in]"
xpos -592
ypos 368
}
Dot {
name Dot8
xpos -414
ypos 378
}
push $Nb20dfa0
Dot {
name Dot10
xpos -750
ypos -366
}
OFXuk.co.thefoundry.keylight.keylight_v201 {
show "Final Result"
unPreMultiply false
screenColour {{parent.Expression1.pickColor x1029 0.03822410107} {parent.Expression1.pickColor x1029 0.07513520122} {parent.Expression1.pickColor x1029 0.3369410038}}
screenGain 1
screenBalance 0.95
alphaBias {0.5 0.5 0.5}
despillBias {0.5 0.5 0.5}
gangBiases true
preBlur 0
"Screen Matte" 0
screenClipMin 0
screenClipMax 1
screenClipRollback 0
screenGrowShrink 0
screenSoftness 0
screenDespotBlack 0
screenDespotWhite 0
screenReplaceMethod "Soft Colour"
screenReplaceColour {0.5 0.5 0.5}
Tuning 0
midPoint 0.5
lowGain 1
midGain 1
highGain 1
"Inside Mask" 0
sourceAlphaHandling Ignore
insideReplaceMethod "Soft Colour"
insideReplaceColour {0.5 0.5 0.5}
Crops 0
SourceXMethod Colour
SourceYMethod Colour
SourceEdgeColour 0
SourceCropL 0
SourceCropR 1
SourceCropB 0
SourceCropT 1
balanceSet false
insideComponent None
outsideComponent None
cacheBreaker true
name Keylight1
xpos -784
ypos -226
}
push $N5b88cd30
IBKGizmoV3 {
name IBKGizmoV3_4
selected false
xpos -472
ypos -226
st pick
colour {{parent.Expression1.pickColor} {parent.Expression1.pickColor} {parent.Expression1.pickColor}}
red_weight 0.115
}
Dot {
name Dot4
xpos -438
ypos -102
}
Dot {
name Dot5
xpos -678
ypos -102
}
Dissolve {
inputs 2
which {{parent.keyDissolve}}
name Dissolve1
xpos -784
ypos -40
}
Dot {
name Dot6
xpos -750
ypos 114
}
set Ndeba1d70 [stack 0]
Dot {
name Dot7
xpos -318
ypos 114
}
Shuffle {
in2 mask
red alpha
green alpha
blue alpha
alpha red2
name Shuffle1
label "\[value in]"
xpos -352
ypos 152
}
Shuffle {
in mask
out alpha
name Shuffle5
label "\[value in]"
xpos -352
ypos 190
}
MergeExpression {
inputs 2
expr0 Ar*(Ba-Aa*Ba)/max(Ba,Aa)+Br*(Aa-Ba*Aa)/max(Ba,Aa)
expr1 Ag*(Ba-Aa*Ba)/max(Ba,Aa)+Bg*(Aa-Ba*Aa)/max(Ba,Aa)
expr2 Ab*(Ba-Aa*Ba)/max(Ba,Aa)+Bb*(Aa-Ba*Aa)/max(Ba,Aa)
expr3 Aa*(Ba-Aa*Ba)/max(Ba,Aa)+Ba*(Aa-Ba*Aa)/max(Ba,Aa)
name MergeExpression27
xpos -352
ypos 494
}
set Nd8992b00 [stack 0]
push $Nd8992b00
push $N1f499be0
Shuffle {
in mask
out alpha
name Shuffle4
label "\[value in]"
xpos -880
ypos 416
}
push $Ndeba1d70
Shuffle {
in mask
out alpha
name Shuffle3
label "\[value in]"
xpos -784
ypos 416
}
MergeExpression {
inputs 2
expr0 Ar*(Ba-Aa*Ba)/max(Ba,Aa)+Br*(Aa-Ba*Aa)/max(Ba,Aa)
expr1 Ag*(Ba-Aa*Ba)/max(Ba,Aa)+Bg*(Aa-Ba*Aa)/max(Ba,Aa)
expr2 Ab*(Ba-Aa*Ba)/max(Ba,Aa)+Bb*(Aa-Ba*Aa)/max(Ba,Aa)
expr3 Aa*(Ba-Aa*Ba)/max(Ba,Aa)+Ba*(Aa-Ba*Aa)/max(Ba,Aa)
name MergeExpression2
xpos -784
ypos 494
}
ShuffleCopy {
inputs 2
alpha red
name ShuffleCopy1
label "\[value in] to \[value out]"
xpos -592
ypos 680
}
ShuffleCopy {
inputs 2
in mask
red red
out mask
name ShuffleCopy3
label "\[value in] to \[value out]"
xpos -592
ypos 776
}
Output {
name Output1
xpos -592
ypos 830
}
end_group
push $cut_paste_input
Group {
name PickyAdditiveKeyer1
help "<i>Of despair</i>\nv0.5(PoC)\n\nAdd several layers of pickers with keyers that merge automatically. Fun!\nProof of concept version.\nBased on a random conversation between Nico and Owen"
tile_color 0xff9fff
selected true
xpos -5931
ypos -893
addUserKnob {20 User}
addUserKnob {41 picker T Expression1.picker}
addUserKnob {7 weight l gain}
weight 1
addUserKnob {20 AdditiveKeyer}
addUserKnob {41 DarkValue T AdditiveKeyer_FS1.DarkValue}
addUserKnob {41 ConstrainDarks T AdditiveKeyer_FS1.ConstrainDarks}
addUserKnob {41 LightValue T AdditiveKeyer_FS1.LightValue}
addUserKnob {41 ConstrainLights T AdditiveKeyer_FS1.ConstrainLights}
addUserKnob {26 ""}
addUserKnob {41 Saturation T AdditiveKeyer_FS1.Saturation}
addUserKnob {41 DarkTint T AdditiveKeyer_FS1.DarkTint}
addUserKnob {41 LightTint T AdditiveKeyer_FS1.LightTint}
}
Input {
inputs 0
name Layers
xpos -1144
ypos -34
number 1
}
Constant {
inputs 0
channels mask
color 1
name Constant4
xpos -1048
ypos 33
}
Switch {
inputs 2
which {{"\[exists parent.input1] "}}
name Switch1
xpos -1144
ypos 230
}
Dot {
name Dot2
xpos -1110
ypos 378
}
Dot {
name Dot3
xpos -846
ypos 378
}
set Nedbd4c70 [stack 0]
Shuffle {
in2 mask
red alpha
green alpha
blue alpha
alpha red2
name Shuffle2
label "\[value in]"
xpos -592
ypos 368
}
Dot {
name Dot8
xpos -414
ypos 378
}
Input {
inputs 0
name pick_from
xpos -448
ypos -730
number 2
}
Input {
inputs 0
name fg
xpos -616
ypos -730
}
set Nb2cb990 [stack 0]
Switch {
inputs 2
which {{"\[exists parent.input2] " x1022 0}}
name Switch3
xpos -448
ypos -658
}
Expression {
expr0 r
expr1 g
expr2 b
channel3 mask
expr3 hypot((picker.x-x),(picker.y-y))/(width*2)
name Expression1
selected true
xpos -448
ypos -610
addUserKnob {20 User}
addUserKnob {18 pickColor}
pickColor {{"\[sample this red picker.x picker.y]"} {"\[sample this green picker.x picker.y]"} {"\[sample this blue picker.x picker.y]"}}
addUserKnob {12 picker}
picker {1193 1112}
}
push $Nb2cb990
Dot {
name Dot9
xpos -582
ypos -366
}
Dot {
name Dot11
xpos -222
ypos -366
}
Constant {
inputs 0
channels rgb
color {{parent.Expression1.pickColor} {parent.Expression1.pickColor} {parent.Expression1.pickColor} {parent.Expression1.pickColor}}
name Constant1
xpos -184
ypos -489
}
Input {
inputs 0
name bg
xpos 32
ypos -466
number 3
}
AdditiveKeyer_FS {
inputs 3
name AdditiveKeyer_FS1
xpos -184
ypos -226
}
ShuffleCopy {
inputs 2
in mask
red red
out mask
name ShuffleCopy2
label "\[value in] to \[value out]"
xpos -448
ypos -112
}
Dot {
name Dot6
xpos -750
ypos 114
}
set N858f27a0 [stack 0]
Dot {
name Dot7
xpos -318
ypos 114
}
Shuffle {
in2 mask
red alpha
green alpha
blue alpha
alpha red2
name Shuffle1
label "\[value in]"
xpos -352
ypos 152
}
Shuffle {
in mask
out alpha
name Shuffle5
label "\[value in]"
xpos -352
ypos 200
}
MergeExpression {
inputs 2
expr0 Ar*(Ba-Aa*Ba)/max(Ba,Aa)+Br*(Aa-Ba*Aa)/max(Ba,Aa)
expr1 Ag*(Ba-Aa*Ba)/max(Ba,Aa)+Bg*(Aa-Ba*Aa)/max(Ba,Aa)
expr2 Ab*(Ba-Aa*Ba)/max(Ba,Aa)+Bb*(Aa-Ba*Aa)/max(Ba,Aa)
expr3 Aa*(Ba-Aa*Ba)/max(Ba,Aa)+Ba*(Aa-Ba*Aa)/max(Ba,Aa)
name MergeExpression27
xpos -352
ypos 542
}
set N2e9fe540 [stack 0]
push $N2e9fe540
push $Nedbd4c70
Shuffle {
in mask
out alpha
name Shuffle4
label "\[value in]"
xpos -880
ypos 440
}
push $N858f27a0
Shuffle {
in mask
out alpha
name Shuffle3
label "\[value in]"
xpos -784
ypos 440
}
MergeExpression {
inputs 2
expr0 Ar*(Ba-Aa*Ba)/max(Ba,Aa)+Br*(Aa-Ba*Aa)/max(Ba,Aa)
expr1 Ag*(Ba-Aa*Ba)/max(Ba,Aa)+Bg*(Aa-Ba*Aa)/max(Ba,Aa)
expr2 Ab*(Ba-Aa*Ba)/max(Ba,Aa)+Bb*(Aa-Ba*Aa)/max(Ba,Aa)
expr3 Aa*(Ba-Aa*Ba)/max(Ba,Aa)+Ba*(Aa-Ba*Aa)/max(Ba,Aa)
name MergeExpression1
xpos -784
ypos 518
}
ShuffleCopy {
inputs 2
alpha red
name ShuffleCopy1
label "\[value in] to \[value out]"
xpos -592
ypos 680
}
ShuffleCopy {
inputs 2
in mask
red red
out mask
name ShuffleCopy3
label "\[value in] to \[value out]"
xpos -592
ypos 776
}
set N43ff1750 [stack 0]
Output {
name Output1
xpos -592
ypos 830
}
push $N43ff1750
push 0
push 0
Viewer {
inputs 3
input_number 2
useGPUForViewer true
useGPUForInputs true
viewerProcess "dracula_viewing (P3)"
name Viewer1
xpos 32
ypos -250
}
Switch {
inputs 0
which {{"\[exists parent.input1] "}}
name Switch2
xpos -631
ypos -270
}
end_group
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment